hedgewars/uStore.pas
changeset 10869 f23763bbac1b
parent 10735 42af3bfc832c
child 10870 5efea5942475
equal deleted inserted replaced
10868:acb03a9712c3 10869:f23763bbac1b
   559                 FreeAndNilTexture(TeamsArray[t]^.Hedgehogs[i].HealthTagTex);
   559                 FreeAndNilTexture(TeamsArray[t]^.Hedgehogs[i].HealthTagTex);
   560                 FreeAndNilTexture(TeamsArray[t]^.Hedgehogs[i].HatTex);
   560                 FreeAndNilTexture(TeamsArray[t]^.Hedgehogs[i].HatTex);
   561                 end;
   561                 end;
   562             end;
   562             end;
   563         end;
   563         end;
   564 {$IFNDEF PAS2C}
   564 
   565 {$IFDEF USE_VIDEO_RECORDING}
   565 RendererCleanup();
   566     if defaultFrame <> 0 then
       
   567         DeleteFramebuffer(defaultFrame, depthv, texv);
       
   568 {$ENDIF}
       
   569 {$IFDEF USE_S3D_RENDERING}
       
   570     if (cStereoMode = smHorizontal) or (cStereoMode = smVertical) then
       
   571         begin
       
   572         DeleteFramebuffer(framel, depthl, texl);
       
   573         DeleteFramebuffer(framer, depthr, texr);
       
   574         end
       
   575 {$ENDIF}
       
   576 {$ENDIF}
       
   577 end;
   566 end;
   578 
   567 
   579 
   568 
   580 procedure RenderHealth(var Hedgehog: THedgehog);
   569 procedure RenderHealth(var Hedgehog: THedgehog);
   581 var s: shortstring;
   570 var s: shortstring;
   754 {$ELSE}
   743 {$ELSE}
   755     buf[0]:= char(0); // avoid compiler hint
   744     buf[0]:= char(0); // avoid compiler hint
   756     AddFileLog('Setting up OpenGL (using driver: ' + shortstring(SDL_VideoDriverName(buf, sizeof(buf))) + ')');
   745     AddFileLog('Setting up OpenGL (using driver: ' + shortstring(SDL_VideoDriverName(buf, sizeof(buf))) + ')');
   757 {$ENDIF}
   746 {$ENDIF}
   758 
   747 
   759 {$IFDEF MOBILE}
   748     RendererSetup();
   760     // TODO: this function creates an opengles1.1 context
       
   761     // un-comment below and add proper logic to support opengles2.0
       
   762     //SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2);
       
   763     //SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);
       
   764     if SDLGLcontext = nil then
       
   765         SDLGLcontext:= SDL_GL_CreateContext(SDLwindow);
       
   766     SDLTry(SDLGLcontext <> nil, true);
       
   767     SDL_GL_SetSwapInterval(1);
       
   768 {$ENDIF}
       
   769 
       
   770     RenderSetup();
       
   771 end;
   749 end;
   772 
   750 
   773 (*
   751 (*
   774 procedure UpdateProjection;
   752 procedure UpdateProjection;
   775 var
   753 var