hedgewars/uTextures.pas
changeset 11507 bd9a2f1b0080
parent 11487 8e221d2a368e
child 11532 bf86c6cb9341
equal deleted inserted replaced
11506:24bef86e3f3a 11507:bd9a2f1b0080
   237 glGenTextures(1, @Surface2Tex^.id);
   237 glGenTextures(1, @Surface2Tex^.id);
   238 
   238 
   239 glBindTexture(GL_TEXTURE_2D, Surface2Tex^.id);
   239 glBindTexture(GL_TEXTURE_2D, Surface2Tex^.id);
   240 
   240 
   241 if SDL_MustLock(surf) then
   241 if SDL_MustLock(surf) then
   242     SDLTry(SDL_LockSurface(surf) >= 0, 'Lock surface', true);
   242     if SDLCheck(SDL_LockSurface(surf) >= 0, 'Lock surface', true) then
       
   243         exit(nil);
   243 
   244 
   244 fromP4:= Surf^.pixels;
   245 fromP4:= Surf^.pixels;
   245 
   246 
   246 if GrayScale then
   247 if GrayScale then
   247     Surface2GrayScale(Surf);
   248     Surface2GrayScale(Surf);