Include the ES3 headers on iOS

The config test correctly recognizes if GLES 3.0 is
available, however qopengl.h still includes the ES2
headers. This causes issues for the new GLES3 support
patches.

Change-Id: Ia97f556cc207f7d828918f493fe1adab93cf31ec
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
This commit is contained in:
Laszlo Agocs 2014-06-20 20:37:20 +02:00
parent 186354ee51
commit ee88ed8fab
4 changed files with 21 additions and 2 deletions

View File

@ -67,8 +67,13 @@
#if defined(QT_OPENGL_ES_2)
# if defined(Q_OS_MAC) // iOS
# include <OpenGLES/ES2/gl.h>
# include <OpenGLES/ES2/glext.h>
# if defined(QT_OPENGL_ES_3)
# include <OpenGLES/ES3/gl.h>
# include <OpenGLES/ES3/glext.h>
# else
# include <OpenGLES/ES2/gl.h>
# include <OpenGLES/ES2/glext.h>
# endif
/*
OES_EGL_image_external is not included in the Apple provided

View File

@ -88,6 +88,10 @@ QT_BEGIN_NAMESPACE
#define GL_DEPTH_COMPONENT24 0x81A6
#endif
#ifndef GL_DEPTH_COMPONENT24_OES
#define GL_DEPTH_COMPONENT24_OES 0x81A6
#endif
#ifndef GL_READ_FRAMEBUFFER
#define GL_READ_FRAMEBUFFER 0x8CA8
#endif

View File

@ -370,6 +370,12 @@ static int qt_gl_resolve_extensions()
if (ctx->isOpenGLES()) {
if (format.majorVersion() >= 2)
extensions |= QOpenGLExtensions::GenerateMipmap;
if (format.majorVersion() >= 3)
extensions |= QOpenGLExtensions::PackedDepthStencil
| QOpenGLExtensions::Depth24
| QOpenGLExtensions::ElementIndexUint;
if (extensionMatcher.match("GL_OES_mapbuffer"))
extensions |= QOpenGLExtensions::MapBuffer;
if (extensionMatcher.match("GL_OES_packed_depth_stencil"))

View File

@ -94,6 +94,10 @@ extern QImage qt_gl_read_frame_buffer(const QSize&, bool, bool);
#define GL_DEPTH_COMPONENT24 0x81A6
#endif
#ifndef GL_DEPTH_COMPONENT24_OES
#define GL_DEPTH_COMPONENT24_OES 0x81A6
#endif
#ifndef GL_READ_FRAMEBUFFER
#define GL_READ_FRAMEBUFFER 0x8CA8
#endif