hedgewars/uMisc.pas
changeset 2575 d06e0e829828
parent 2568 e654cbfb23ba
child 2576 2eb7ce1c1f19
equal deleted inserted replaced
2574:2f3e5c57359c 2575:d06e0e829828
   394 Surface2Tex^.h:= surf^.h;
   394 Surface2Tex^.h:= surf^.h;
   395 
   395 
   396 if (surf^.format^.BytesPerPixel = 3) then
   396 if (surf^.format^.BytesPerPixel = 3) then
   397 	begin
   397 	begin
   398 		modeIntFormat:= GL_RGB;
   398 		modeIntFormat:= GL_RGB;
   399 		modeFormat:= modeIntFormat;
   399 		modeFormat:= GL_RGB;
   400 	end
   400 	end
   401 else
   401 else
   402 if (surf^.format^.BytesPerPixel = 4) then
   402 if (surf^.format^.BytesPerPixel = 4) then
   403 	begin
   403 	begin
   404 		modeIntFormat:= GL_RGBA;
   404 		modeIntFormat:= GL_RGBA;
   405 		modeFormat:= modeIntFormat;
   405 		modeFormat:= GL_RGBA;
   406 	end
   406 	end
   407 else
   407 else
   408    begin
   408    begin
   409    TryDo(false, 'Surface2Tex: BytesPerPixel not in [3, 4]', true);
   409    TryDo(false, 'Surface2Tex: BytesPerPixel not in [3, 4]', true);
   410    Surface2Tex^.id:= 0;
   410    Surface2Tex^.id:= 0;