DEADSOFTWARE

Added check for support NPOT textures with OpenGL ES. Legacy mode is still bugged.
authorDeaDDooMER <deaddoomer@deadsoftware.ru>
Sun, 24 Jun 2018 10:54:25 +0000 (13:54 +0300)
committerDeaDDooMER <deaddoomer@deadsoftware.ru>
Sun, 24 Jun 2018 10:57:21 +0000 (13:57 +0300)
src/game/g_window.pas

index e57defe11cf4067a739f8f8c986dba9fef8f763b..b83cdad7a0a97f93a48d80f4bd0f2d95b091c13c 100644 (file)
@@ -1011,15 +1011,16 @@ begin
   e_LogWritefln('stencil buffer size: %s', [ltmp]);
   gwin_has_stencil := (ltmp > 0);
 
-  if not glHasExtension('GL_ARB_texture_non_power_of_two') then
+  if glHasExtension('GL_ARB_texture_non_power_of_two') or
+     glHasExtension('GL_OES_texture_npot') then
   begin
-    e_WriteLog('NPOT textures: NO', TMsgType.Warning);
-    glLegacyNPOT := true;
+    e_WriteLog('NPOT textures: YES', TMsgType.Notify);
+    glLegacyNPOT := false;
   end
   else
   begin
-    e_WriteLog('NPOT textures: YES', TMsgType.Notify);
-    glLegacyNPOT := false;
+    e_WriteLog('NPOT textures: NO', TMsgType.Warning);
+    glLegacyNPOT := true;
   end;
   gwin_dump_extensions := false;
 {$ENDIF}