From: DeaDDooMER Date: Sun, 24 Jun 2018 10:54:25 +0000 (+0300) Subject: Added check for support NPOT textures with OpenGL ES. Legacy mode is still bugged. X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=34e5fdc66d48884265f09ee95eb7a097afa03dc6;p=d2df-sdl.git Added check for support NPOT textures with OpenGL ES. Legacy mode is still bugged. --- diff --git a/src/game/g_window.pas b/src/game/g_window.pas index e57defe..b83cdad 100644 --- a/src/game/g_window.pas +++ b/src/game/g_window.pas @@ -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}