Check if OES_texture_npot is present on OpenGL ES 2.
Unless the OES_texture_npot extension is present, non-power- of-two textures have some restrictions on OpenGL ES 2. Reviewed-by: Samuel
This commit is contained in:
parent
fda40e37df
commit
7fce0a73cc
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user