hedgewars/uTextures.pas
branchsdl2transition
changeset 9682 aa2431ed87b2
parent 9655 e154ccca4dad
child 11362 ed5a6478e710
equal deleted inserted replaced
9679:dfaa39674e1e 9682:aa2431ed87b2
   152 glGenTextures(1, @Surface2Tex^.id);
   152 glGenTextures(1, @Surface2Tex^.id);
   153 
   153 
   154 glBindTexture(GL_TEXTURE_2D, Surface2Tex^.id);
   154 glBindTexture(GL_TEXTURE_2D, Surface2Tex^.id);
   155 
   155 
   156 if SDL_MustLock(surf) then
   156 if SDL_MustLock(surf) then
   157     SDLTry(SDL_LockSurface(surf) >= 0, true);
   157     SDLTry(SDL_LockSurface(surf) >= 0, 'Lock surface', true);
   158 
   158 
   159 fromP4:= Surf^.pixels;
   159 fromP4:= Surf^.pixels;
   160 
   160 
   161 if GrayScale then
   161 if GrayScale then
   162     Surface2GrayScale(Surf);
   162     Surface2GrayScale(Surf);