hedgewars/uRender.pas
changeset 10306 4fca8bcfaff0
parent 10304 7e40820b7ed6
child 10309 e338ccbbe100
equal deleted inserted replaced
10305:17f3ca06e39a 10306:4fca8bcfaff0
   157     filemode:= 0; // readonly
   157     filemode:= 0; // readonly
   158     Reset(f);
   158     Reset(f);
   159     if IOResult <> 0 then
   159     if IOResult <> 0 then
   160     begin
   160     begin
   161         AddFileLog('Unable to load ' + shaderFile);
   161         AddFileLog('Unable to load ' + shaderFile);
   162         halt(-1);
   162         halt(HaltStartupError);
   163     end;
   163     end;
   164 
   164 
   165     source:='';
   165     source:='';
   166     while not eof(f) do
   166     while not eof(f) do
   167     begin
   167     begin
   193     end;
   193     end;
   194 
   194 
   195     if compileResult <> GL_TRUE then
   195     if compileResult <> GL_TRUE then
   196     begin
   196     begin
   197         WriteLnToConsole('Shader compilation failed, halting');
   197         WriteLnToConsole('Shader compilation failed, halting');
   198         halt(-1);
   198         halt(HaltStartupError);
   199     end;
   199     end;
   200 
   200 
   201     CompileShader:= shader;
   201     CompileShader:= shader;
   202 end;
   202 end;
   203 
   203 
   237     end;
   237     end;
   238 
   238 
   239     if linkResult <> GL_TRUE then
   239     if linkResult <> GL_TRUE then
   240     begin
   240     begin
   241         WriteLnToConsole('Linking program failed, halting');
   241         WriteLnToConsole('Linking program failed, halting');
   242         halt(-1);
   242         halt(HaltStartupError);
   243     end;
   243     end;
   244 
   244 
   245     CompileProgram:= program_;
   245     CompileProgram:= program_;
   246 end;
   246 end;
   247 {$ENDIF}
   247 {$ENDIF}
   331 {$IFDEF PAS2C}
   331 {$IFDEF PAS2C}
   332     err := glewInit();
   332     err := glewInit();
   333     if err <> GLEW_OK then
   333     if err <> GLEW_OK then
   334     begin
   334     begin
   335         WriteLnToConsole('Failed to initialize GLEW.');
   335         WriteLnToConsole('Failed to initialize GLEW.');
   336         halt;
   336         halt(HaltStartupError);
   337     end;
   337     end;
   338 {$ENDIF}
   338 {$ENDIF}
   339 
   339 
   340 {$IFNDEF PAS2C}
   340 {$IFNDEF PAS2C}
   341     if not Load_GL_VERSION_2_0 then
   341     if not Load_GL_VERSION_2_0 then