Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging

* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  Check if OES_texture_npot is present on OpenGL ES 2.
This commit is contained in:
Qt Continuous Integration System 2011-05-11 20:41:00 +10:00
commit eb5ad10b2c

View File

@ -211,7 +211,7 @@ QGLFunctions::QGLFunctions(const QGLContext *context)
static int qt_gl_resolve_features()
{
#if defined(QT_OPENGL_ES_2)
return QGLFunctions::Multitexture |
int features = QGLFunctions::Multitexture |
QGLFunctions::Shaders |
QGLFunctions::Buffers |
QGLFunctions::Framebuffers |
@ -222,8 +222,12 @@ static int qt_gl_resolve_features()
QGLFunctions::BlendSubtract |
QGLFunctions::CompressedTextures |
QGLFunctions::Multisample |
QGLFunctions::StencilSeparate |
QGLFunctions::NPOTTextures;
QGLFunctions::StencilSeparate;
if (extensions.match("GL_OES_texture_npot"))
features |= QGLFunctions::NPOTTextures;
if (extensions.match("GL_IMG_texture_npot"))
features |= QGLFunctions::NPOTTextures;
return features;
#elif defined(QT_OPENGL_ES)
int features = QGLFunctions::Multitexture |
QGLFunctions::Buffers |
@ -240,6 +244,8 @@ static int qt_gl_resolve_features()
features |= QGLFunctions::BlendSubtract;
if (extensions.match("GL_OES_texture_npot"))
features |= QGLFunctions::NPOTTextures;
if (extensions.match("GL_IMG_texture_npot"))
features |= QGLFunctions::NPOTTextures;
return features;
#else
int features = 0;