OpenGL ES 2.0: Detect EXT_blend_minmax

This commit is contained in:
Henrik Rydgard committed 2013-09-30 10:11:34 +02:00
1 parent 040aa497be
commit b7eb60d2b7
2 files changed
+6

No files matched your search

+4
View File
@@ -122,6 +122,7 @@ void CheckGLExtensions() {
gl_extensions.OES_depth24 = strstr(extString, "GL_OES_depth24") != 0;
gl_extensions.OES_depth_texture = strstr(extString, "GL_OES_depth_texture") != 0;
gl_extensions.OES_mapbuffer = strstr(extString, "GL_OES_mapbuffer") != 0;
gl_extensions.EXT_blend_minmax = strstr(extString, "GL_EXT_blend_minmax") != 0;
gl_extensions.EXT_shader_framebuffer_fetch = (strstr(extString, "GL_EXT_shader_framebuffer_fetch") != 0) || (strstr(extString, "GL_NV_shader_framebuffer_fetch") != 0);
#if defined(IOS) || defined(__SYMBIAN32__) || defined(MEEGO_EDITION_HARMATTAN) || defined(MAEMO)
gl_extensions.OES_vertex_array_object = false;
@@ -141,6 +142,9 @@ void CheckGLExtensions() {
}
#endif
#else
// Desktops support minmax
gl_extensions.EXT_blend_minmax = true;
#endif
#if defined(ANDROID) || defined(BLACKBERRY)
+2
View File
@@ -231,6 +231,7 @@ public:
BoolState<GL_BLEND, false> blend;
STATE4(glBlendFuncSeparate, GLenum, GLenum, GLenum, GLenum, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) blendFuncSeparate;
// On OpenGL ES, using minmax blend requires glBlendEquationEXT (in theory at least).
STATE1(glBlendEquation, GLenum, GL_FUNC_ADD) blendEquation;
STATEFLOAT4(glBlendColor, 1.0f) blendColor;
@@ -304,6 +305,7 @@ struct GLExtensions {
bool OES_mapbuffer;
bool OES_vertex_array_object;
bool EXT_shader_framebuffer_fetch;
bool EXT_blend_minmax;
bool ATIClampBug;
// EGL extensions