summaryrefslogtreecommitdiffstats
path: root/src/opengl/qglextensions_p.h
diff options
context:
space:
mode:
authorJani Hautakangas <jani.hautakangas@nokia.com>2010-10-04 07:55:11 (GMT)
committerJani Hautakangas <jani.hautakangas@nokia.com>2010-10-04 08:51:43 (GMT)
commit207d9239dc6b67109b5e8cbdea7e5a589c167e85 (patch)
tree8f4f78085355b1713e132299617aed7231a095be /src/opengl/qglextensions_p.h
parent51d007e0fa699339f072956bbd8bfe33db9b7f70 (diff)
downloadQt-207d9239dc6b67109b5e8cbdea7e5a589c167e85.zip
Qt-207d9239dc6b67109b5e8cbdea7e5a589c167e85.tar.gz
Qt-207d9239dc6b67109b5e8cbdea7e5a589c167e85.tar.bz2
Enable QtOpenGL vector path caching on Symbian/IVE3
IVE3 doesn't support UNSIGNED_INT <type> index values in DrawElements. This patch checks if GL_OES_element_index_uint extensions is supported and determines DrawElement indices type based on that. On desktop environment UNSIGNED_INT is always supported. Task-number: QTBUG-13563 Reviewed-by: Gunnar
Diffstat (limited to 'src/opengl/qglextensions_p.h')
-rw-r--r--src/opengl/qglextensions_p.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/opengl/qglextensions_p.h b/src/opengl/qglextensions_p.h
index 6259cca..e81e849 100644
--- a/src/opengl/qglextensions_p.h
+++ b/src/opengl/qglextensions_p.h
@@ -346,6 +346,17 @@ struct QGLExtensionFuncs
qt_glEGLImageTargetTexture2DOES = 0;
qt_glEGLImageTargetRenderbufferStorageOES = 0;
#endif
+
+ // OES_element_index_uint
+#if !defined(QT_OPENGL_ES)
+ qt_glSupportsElementIndexUint = true;
+#else
+ QString extensions = reinterpret_cast<const char *>(glGetString(GL_EXTENSIONS));
+ if (extensions.contains("GL_OES_element_index_uint"))
+ qt_glSupportsElementIndexUint = true;
+ else
+ qt_glSupportsElementIndexUint = false;
+#endif
}
@@ -473,6 +484,7 @@ struct QGLExtensionFuncs
_glEGLImageTargetRenderbufferStorageOES qt_glEGLImageTargetRenderbufferStorageOES;
#endif
+ bool qt_glSupportsElementIndexUint;
};
@@ -871,6 +883,8 @@ struct QGLExtensionFuncs
#define glEGLImageTargetRenderbufferStorageOES QGLContextPrivate::extensionFuncs(ctx).qt_glEGLImageTargetRenderbufferStorageOES
#endif
+#define glSupportsElementIndexUint QGLContextPrivate::extensionFuncs(ctx).qt_glSupportsElementIndexUint
+
extern bool qt_resolve_framebufferobject_extensions(QGLContext *ctx);
bool qt_resolve_buffer_extensions(QGLContext *ctx);