Improve the NPOT check

This commit is contained in:
Henrik Rydgård 2022-08-07 11:50:23 +02:00
parent 4ff8f85110
commit 1dabb54df5

View file

@ -555,7 +555,10 @@ OpenGLContext::OpenGLContext() {
caps_.clipDistanceSupported = gl_extensions.VersionGEThan(3, 0);
caps_.cullDistanceSupported = gl_extensions.ARB_cull_distance;
}
caps_.textureNPOTFullySupported = gl_extensions.IsCoreContext || gl_extensions.GLES3 || gl_extensions.ARB_texture_non_power_of_two || gl_extensions.OES_texture_npot;
caps_.textureNPOTFullySupported =
(!gl_extensions.IsGLES && gl_extensions.VersionGEThan(2, 0, 0)) ||
gl_extensions.IsCoreContext || gl_extensions.GLES3 ||
gl_extensions.ARB_texture_non_power_of_two || gl_extensions.OES_texture_npot;
// Interesting potential hack for emulating GL_DEPTH_CLAMP (use a separate varying, force depth in fragment shader):
// This will induce a performance penalty on many architectures though so a blanket enable of this