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,19 +211,23 @@ QGLFunctions::QGLFunctions(const QGLContext *context)
static int qt_gl_resolve_features()
{
#if defined(QT_OPENGL_ES_2)
return QGLFunctions::Multitexture |
QGLFunctions::Shaders |
QGLFunctions::Buffers |
QGLFunctions::Framebuffers |
QGLFunctions::BlendColor |
QGLFunctions::BlendEquation |
QGLFunctions::BlendEquationSeparate |
QGLFunctions::BlendFuncSeparate |
QGLFunctions::BlendSubtract |
QGLFunctions::CompressedTextures |
QGLFunctions::Multisample |
QGLFunctions::StencilSeparate |
QGLFunctions::NPOTTextures;
int features = QGLFunctions::Multitexture |
QGLFunctions::Shaders |
QGLFunctions::Buffers |
QGLFunctions::Framebuffers |
QGLFunctions::BlendColor |
QGLFunctions::BlendEquation |
QGLFunctions::BlendEquationSeparate |
QGLFunctions::BlendFuncSeparate |
QGLFunctions::BlendSubtract |
QGLFunctions::CompressedTextures |
QGLFunctions::Multisample |
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;