hedgewars/uRender.pas
changeset 11800 6e6248c43942
parent 11798 984f9c76146d
child 11823 0fba6cb098a1
equal deleted inserted replaced
11799:bb745219d882 11800:6e6248c43942
   255 {$IFDEF GL2}
   255 {$IFDEF GL2}
   256 function CompileShader(shaderFile: string; shaderType: GLenum): GLuint;
   256 function CompileShader(shaderFile: string; shaderType: GLenum): GLuint;
   257 var
   257 var
   258     shader: GLuint;
   258     shader: GLuint;
   259     f: PFSFile;
   259     f: PFSFile;
   260     source, line: AnsiString;
   260     source, line: ansistring;
   261     sourceA: Pchar;
   261     sourceA: Pchar;
   262     lengthA: GLint;
   262     lengthA: GLint;
   263     compileResult: GLint;
   263     compileResult: GLint;
   264     logLength: GLint;
   264     logLength: GLint;
   265     log: PChar;
   265     log: PChar;
   274         source:= source + line + #10;
   274         source:= source + line + #10;
   275     end;
   275     end;
   276 
   276 
   277     pfsClose(f);
   277     pfsClose(f);
   278 
   278 
   279     WriteLnToConsole('Compiling shader: ' + PathPrefix + cPathz[ptShaders] + '/' + shaderFile);
   279     WriteLnToConsole('Compiling shader: ' + cPathz[ptShaders] + '/' + shaderFile);
   280 
   280 
   281     sourceA:=PChar(source);
   281     sourceA:=PChar(source);
   282     lengthA:=Length(source);
   282     lengthA:=Length(source);
   283 
   283 
   284     shader:=glCreateShader(shaderType);
   284     shader:=glCreateShader(shaderType);