Get rid of QT_OPENGL_ES*
The QT_OPENGL_ES* macros are leftovers from an earlier, ad hoc configuration system, which has since been replaced by QT_CONFIG. To clean things up in Qt 6, we use the new way instead. Task-number: QTBUG-83467 Change-Id: I578dc7695bff9d5ee303b22e44f60fee22fe0c28 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
parent
009d583eef
commit
ad5aee2e34
@ -541,7 +541,6 @@ qt_feature("angle" PUBLIC
|
|||||||
AUTODETECT QT_FEATURE_opengles2 OR QT_FEATURE_opengl_dynamic
|
AUTODETECT QT_FEATURE_opengles2 OR QT_FEATURE_opengl_dynamic
|
||||||
CONDITION NOT QT_FEATURE_opengl_desktop AND QT_FEATURE_dxguid AND tests.fxc AND ( QT_FEATURE_direct3d9 OR ( WINRT AND QT_FEATURE_direct3d11 AND libs.d3dcompiler ) ) OR FIXME
|
CONDITION NOT QT_FEATURE_opengl_desktop AND QT_FEATURE_dxguid AND tests.fxc AND ( QT_FEATURE_direct3d9 OR ( WINRT AND QT_FEATURE_direct3d11 AND libs.d3dcompiler ) ) OR FIXME
|
||||||
)
|
)
|
||||||
qt_feature_definition("angle" "QT_OPENGL_ES_2_ANGLE")
|
|
||||||
qt_feature("angle_d3d11_qdtd" PRIVATE
|
qt_feature("angle_d3d11_qdtd" PRIVATE
|
||||||
LABEL "D3D11_QUERY_DATA_TIMESTAMP_DISJOINT"
|
LABEL "D3D11_QUERY_DATA_TIMESTAMP_DISJOINT"
|
||||||
CONDITION QT_FEATURE_angle AND TEST_angle_d3d11_qdtd
|
CONDITION QT_FEATURE_angle AND TEST_angle_d3d11_qdtd
|
||||||
@ -710,24 +709,19 @@ qt_feature("opengles2" PUBLIC
|
|||||||
ENABLE INPUT_opengl STREQUAL 'es2' OR INPUT_angle STREQUAL 'yes'
|
ENABLE INPUT_opengl STREQUAL 'es2' OR INPUT_angle STREQUAL 'yes'
|
||||||
DISABLE INPUT_opengl STREQUAL 'desktop' OR INPUT_opengl STREQUAL 'dynamic' OR INPUT_opengl STREQUAL 'no'
|
DISABLE INPUT_opengl STREQUAL 'desktop' OR INPUT_opengl STREQUAL 'dynamic' OR INPUT_opengl STREQUAL 'no'
|
||||||
)
|
)
|
||||||
qt_feature_definition("opengles2" "QT_OPENGL_ES")
|
|
||||||
qt_feature_definition("opengles2" "QT_OPENGL_ES_2")
|
|
||||||
qt_feature_config("opengles2" QMAKE_PUBLIC_QT_CONFIG)
|
qt_feature_config("opengles2" QMAKE_PUBLIC_QT_CONFIG)
|
||||||
qt_feature("opengles3" PUBLIC
|
qt_feature("opengles3" PUBLIC
|
||||||
LABEL "OpenGL ES 3.0"
|
LABEL "OpenGL ES 3.0"
|
||||||
CONDITION QT_FEATURE_opengles2 AND NOT QT_FEATURE_angle AND TEST_opengles3
|
CONDITION QT_FEATURE_opengles2 AND NOT QT_FEATURE_angle AND TEST_opengles3
|
||||||
)
|
)
|
||||||
qt_feature_definition("opengles3" "QT_OPENGL_ES_3")
|
|
||||||
qt_feature("opengles31" PUBLIC
|
qt_feature("opengles31" PUBLIC
|
||||||
LABEL "OpenGL ES 3.1"
|
LABEL "OpenGL ES 3.1"
|
||||||
CONDITION QT_FEATURE_opengles3 AND TEST_opengles31
|
CONDITION QT_FEATURE_opengles3 AND TEST_opengles31
|
||||||
)
|
)
|
||||||
qt_feature_definition("opengles31" "QT_OPENGL_ES_3_1")
|
|
||||||
qt_feature("opengles32" PUBLIC
|
qt_feature("opengles32" PUBLIC
|
||||||
LABEL "OpenGL ES 3.2"
|
LABEL "OpenGL ES 3.2"
|
||||||
CONDITION QT_FEATURE_opengles31 AND TEST_opengles32
|
CONDITION QT_FEATURE_opengles31 AND TEST_opengles32
|
||||||
)
|
)
|
||||||
qt_feature_definition("opengles32" "QT_OPENGL_ES_3_2")
|
|
||||||
qt_feature("opengl-desktop"
|
qt_feature("opengl-desktop"
|
||||||
LABEL "Desktop OpenGL"
|
LABEL "Desktop OpenGL"
|
||||||
CONDITION ( WIN32 AND NOT WINRT AND NOT QT_FEATURE_opengles2 AND ( MSVC OR OpenGL_OpenGL_FOUND ) ) OR ( NOT WATCHOS AND NOT WIN32 AND NOT WASM AND OpenGL_OpenGL_FOUND )
|
CONDITION ( WIN32 AND NOT WINRT AND NOT QT_FEATURE_opengles2 AND ( MSVC OR OpenGL_OpenGL_FOUND ) ) OR ( NOT WATCHOS AND NOT WIN32 AND NOT WASM AND OpenGL_OpenGL_FOUND )
|
||||||
|
@ -1115,7 +1115,6 @@
|
|||||||
"condition": "!features.opengl-desktop && features.dxguid && tests.fxc && (features.direct3d9 || (config.winrt && features.direct3d11 && libs.d3dcompiler))",
|
"condition": "!features.opengl-desktop && features.dxguid && tests.fxc && (features.direct3d9 || (config.winrt && features.direct3d11 && libs.d3dcompiler))",
|
||||||
"output": [
|
"output": [
|
||||||
"publicFeature",
|
"publicFeature",
|
||||||
{ "type": "define", "name": "QT_OPENGL_ES_2_ANGLE" },
|
|
||||||
{ "type": "varAssign", "name": "QMAKE_FXC_LOCATION", "value": "tests.fxc.value" }
|
{ "type": "varAssign", "name": "QMAKE_FXC_LOCATION", "value": "tests.fxc.value" }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -1319,33 +1318,28 @@
|
|||||||
"condition": "(config.win32 && !features.opengl-dynamic) || (!config.watchos && !features.opengl-desktop && libs.opengl_es2)",
|
"condition": "(config.win32 && !features.opengl-dynamic) || (!config.watchos && !features.opengl-desktop && libs.opengl_es2)",
|
||||||
"output": [
|
"output": [
|
||||||
"publicFeature",
|
"publicFeature",
|
||||||
"publicQtConfig",
|
"publicQtConfig"
|
||||||
{ "type": "define", "name": "QT_OPENGL_ES" },
|
|
||||||
{ "type": "define", "name": "QT_OPENGL_ES_2" }
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"opengles3": {
|
"opengles3": {
|
||||||
"label": "OpenGL ES 3.0",
|
"label": "OpenGL ES 3.0",
|
||||||
"condition": "features.opengles2 && !features.angle && tests.opengles3",
|
"condition": "features.opengles2 && !features.angle && tests.opengles3",
|
||||||
"output": [
|
"output": [
|
||||||
"publicFeature",
|
"publicFeature"
|
||||||
{ "type": "define", "name": "QT_OPENGL_ES_3" }
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"opengles31": {
|
"opengles31": {
|
||||||
"label": "OpenGL ES 3.1",
|
"label": "OpenGL ES 3.1",
|
||||||
"condition": "features.opengles3 && tests.opengles31",
|
"condition": "features.opengles3 && tests.opengles31",
|
||||||
"output": [
|
"output": [
|
||||||
"publicFeature",
|
"publicFeature"
|
||||||
{ "type": "define", "name": "QT_OPENGL_ES_3_1" }
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"opengles32": {
|
"opengles32": {
|
||||||
"label": "OpenGL ES 3.2",
|
"label": "OpenGL ES 3.2",
|
||||||
"condition": "features.opengles31 && tests.opengles32",
|
"condition": "features.opengles31 && tests.opengles32",
|
||||||
"output": [
|
"output": [
|
||||||
"publicFeature",
|
"publicFeature"
|
||||||
{ "type": "define", "name": "QT_OPENGL_ES_3_2" }
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"opengl-desktop": {
|
"opengl-desktop": {
|
||||||
|
@ -206,7 +206,7 @@ int QOpenGLContextPrivate::maxTextureSize()
|
|||||||
QOpenGLFunctions *funcs = q->functions();
|
QOpenGLFunctions *funcs = q->functions();
|
||||||
funcs->glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_texture_size);
|
funcs->glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_texture_size);
|
||||||
|
|
||||||
#ifndef QT_OPENGL_ES
|
#if !QT_CONFIG(opengles2)
|
||||||
if (!q->isOpenGLES()) {
|
if (!q->isOpenGLES()) {
|
||||||
GLenum proxy = GL_PROXY_TEXTURE_2D;
|
GLenum proxy = GL_PROXY_TEXTURE_2D;
|
||||||
|
|
||||||
@ -232,7 +232,7 @@ int QOpenGLContextPrivate::maxTextureSize()
|
|||||||
|
|
||||||
max_texture_size = size;
|
max_texture_size = size;
|
||||||
}
|
}
|
||||||
#endif // QT_OPENGL_ES
|
#endif // QT_CONFIG(opengles2)
|
||||||
|
|
||||||
return max_texture_size;
|
return max_texture_size;
|
||||||
}
|
}
|
||||||
@ -957,7 +957,7 @@ QOpenGLContext::OpenGLModuleType QOpenGLContext::openGLModuleType()
|
|||||||
#if defined(QT_OPENGL_DYNAMIC)
|
#if defined(QT_OPENGL_DYNAMIC)
|
||||||
Q_ASSERT(qGuiApp);
|
Q_ASSERT(qGuiApp);
|
||||||
return QGuiApplicationPrivate::instance()->platformIntegration()->openGLModuleType();
|
return QGuiApplicationPrivate::instance()->platformIntegration()->openGLModuleType();
|
||||||
#elif defined(QT_OPENGL_ES_2)
|
#elif QT_CONFIG(opengles2)
|
||||||
return LibGLES;
|
return LibGLES;
|
||||||
#else
|
#else
|
||||||
return LibGL;
|
return LibGL;
|
||||||
|
@ -213,7 +213,7 @@ bool QPlatformGraphicsBufferHelper::bindSWToTexture(const QPlatformGraphicsBuffe
|
|||||||
if (rect.isNull() || rect == QRect(QPoint(0,0),size)) {
|
if (rect.isNull() || rect == QRect(QPoint(0,0),size)) {
|
||||||
funcs->glTexImage2D(GL_TEXTURE_2D, 0, internalFormat, size.width(), size.height(), 0, GL_RGBA, pixelType, image.constBits());
|
funcs->glTexImage2D(GL_TEXTURE_2D, 0, internalFormat, size.width(), size.height(), 0, GL_RGBA, pixelType, image.constBits());
|
||||||
} else {
|
} else {
|
||||||
#ifndef QT_OPENGL_ES_2
|
#if !QT_CONFIG(opengles2)
|
||||||
if (!ctx->isOpenGLES()) {
|
if (!ctx->isOpenGLES()) {
|
||||||
funcs->glPixelStorei(GL_UNPACK_ROW_LENGTH, image.width());
|
funcs->glPixelStorei(GL_UNPACK_ROW_LENGTH, image.width());
|
||||||
funcs->glTexSubImage2D(GL_TEXTURE_2D, 0, rect.x(), rect.y(), rect.width(), rect.height(), GL_RGBA, pixelType,
|
funcs->glTexSubImage2D(GL_TEXTURE_2D, 0, rect.x(), rect.y(), rect.width(), rect.height(), GL_RGBA, pixelType,
|
||||||
|
@ -63,9 +63,9 @@
|
|||||||
// access to additional functionality the drivers may expose but
|
// access to additional functionality the drivers may expose but
|
||||||
// which the system headers do not.
|
// which the system headers do not.
|
||||||
|
|
||||||
#if defined(QT_OPENGL_ES_2)
|
#if QT_CONFIG(opengles2)
|
||||||
# if defined(Q_OS_IOS) || defined(Q_OS_TVOS)
|
# if defined(Q_OS_IOS) || defined(Q_OS_TVOS)
|
||||||
# if defined(QT_OPENGL_ES_3)
|
# if QT_CONFIG(opengles3)
|
||||||
# include <OpenGLES/ES3/gl.h>
|
# include <OpenGLES/ES3/gl.h>
|
||||||
# include <OpenGLES/ES3/glext.h>
|
# include <OpenGLES/ES3/glext.h>
|
||||||
# else
|
# else
|
||||||
@ -83,7 +83,7 @@ typedef void* GLeglImageOES;
|
|||||||
|
|
||||||
# elif !defined(Q_OS_DARWIN) // "uncontrolled" ES2 platforms
|
# elif !defined(Q_OS_DARWIN) // "uncontrolled" ES2 platforms
|
||||||
|
|
||||||
// In "es2" builds (QT_OPENGL_ES_2) additional defines indicate GLES 3.0 or
|
// In "es2" builds (QT_CONFIG(opengles2)) additional defines indicate GLES 3.0 or
|
||||||
// higher is available *at build time*. In this case include the corresponding
|
// higher is available *at build time*. In this case include the corresponding
|
||||||
// header. These are backwards compatible and it should be safe to include
|
// header. These are backwards compatible and it should be safe to include
|
||||||
// headers on top of each other, meaning that applications can include gl2.h
|
// headers on top of each other, meaning that applications can include gl2.h
|
||||||
@ -101,11 +101,11 @@ typedef void* GLeglImageOES;
|
|||||||
# define QGL_TEMP_GLEXT_PROTO
|
# define QGL_TEMP_GLEXT_PROTO
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# if defined(QT_OPENGL_ES_3_2)
|
# if QT_CONFIG(opengles32)
|
||||||
# include <GLES3/gl32.h>
|
# include <GLES3/gl32.h>
|
||||||
# elif defined(QT_OPENGL_ES_3_1)
|
# elif QT_CONFIG(opengles31)
|
||||||
# include <GLES3/gl31.h>
|
# include <GLES3/gl31.h>
|
||||||
# elif defined(QT_OPENGL_ES_3)
|
# elif QT_CONFIG(opengles3)
|
||||||
# include <GLES3/gl3.h>
|
# include <GLES3/gl3.h>
|
||||||
# else
|
# else
|
||||||
# include <GLES2/gl2.h>
|
# include <GLES2/gl2.h>
|
||||||
@ -145,10 +145,10 @@ typedef char GLchar;
|
|||||||
# endif
|
# endif
|
||||||
# include <QtGui/qopenglext.h>
|
# include <QtGui/qopenglext.h>
|
||||||
# endif // Q_OS_MAC
|
# endif // Q_OS_MAC
|
||||||
#endif // QT_OPENGL_ES_2
|
#endif // !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
// Desktops can support OpenGL 4.
|
// Desktops can support OpenGL 4.
|
||||||
#if !defined(QT_OPENGL_ES_2)
|
#if !QT_CONFIG(opengles2)
|
||||||
#define QT_OPENGL_3
|
#define QT_OPENGL_3
|
||||||
#define QT_OPENGL_3_2
|
#define QT_OPENGL_3_2
|
||||||
#define QT_OPENGL_4
|
#define QT_OPENGL_4
|
||||||
@ -162,7 +162,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
|
|
||||||
// When all else fails we provide sensible fallbacks - this is needed to
|
// When all else fails we provide sensible fallbacks - this is needed to
|
||||||
// allow compilation on OS X 10.6
|
// allow compilation on OS X 10.6
|
||||||
#if !defined(QT_OPENGL_ES_2)
|
#if !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
// OS X 10.6 doesn't define these which are needed below
|
// OS X 10.6 doesn't define these which are needed below
|
||||||
// OS X 10.7 and later defien them in gl3.h
|
// OS X 10.7 and later defien them in gl3.h
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// GLES build without having included gl32.h -> GLDEBUGPROC is still need for the protos, define it here
|
// GLES build without having included gl32.h -> GLDEBUGPROC is still need for the protos, define it here
|
||||||
#if defined(QT_OPENGL_ES_2) && !defined(QT_OPENGL_ES_3_2)
|
#if QT_CONFIG(opengles2) && !QT_CONFIG(opengles32)
|
||||||
typedef void (QOPENGLF_APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
|
typedef void (QOPENGLF_APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -2129,7 +2129,7 @@ Func resolve(QOpenGLContext *context, const char *name, Func)
|
|||||||
#define RESOLVE(name) \
|
#define RESOLVE(name) \
|
||||||
resolve(context, "gl"#name, name)
|
resolve(context, "gl"#name, name)
|
||||||
|
|
||||||
#ifndef QT_OPENGL_ES_2
|
#if !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
// some fallback functions
|
// some fallback functions
|
||||||
static void QOPENGLF_APIENTRY qopenglfSpecialClearDepthf(GLclampf depth)
|
static void QOPENGLF_APIENTRY qopenglfSpecialClearDepthf(GLclampf depth)
|
||||||
@ -2167,14 +2167,14 @@ static void QOPENGLF_APIENTRY qopenglfSpecialReleaseShaderCompiler()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // !QT_OPENGL_ES_2
|
#endif // !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
|
|
||||||
QOpenGLFunctionsPrivate::QOpenGLFunctionsPrivate(QOpenGLContext *c)
|
QOpenGLFunctionsPrivate::QOpenGLFunctionsPrivate(QOpenGLContext *c)
|
||||||
{
|
{
|
||||||
init(c);
|
init(c);
|
||||||
|
|
||||||
#ifndef QT_OPENGL_ES_2
|
#if !QT_CONFIG(opengles2)
|
||||||
// setup fallbacks in case some methods couldn't get resolved
|
// setup fallbacks in case some methods couldn't get resolved
|
||||||
bool es = QOpenGLContext::currentContext()->isOpenGLES();
|
bool es = QOpenGLContext::currentContext()->isOpenGLES();
|
||||||
if (!f.ClearDepthf || !es)
|
if (!f.ClearDepthf || !es)
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -190,7 +190,7 @@ bool QOpenGLProgramBinaryCache::setProgramBinary(uint programId, uint blobFormat
|
|||||||
if (error == GL_NO_ERROR || error == GL_CONTEXT_LOST)
|
if (error == GL_NO_ERROR || error == GL_CONTEXT_LOST)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#if defined(QT_OPENGL_ES_2)
|
#if QT_CONFIG(opengles2)
|
||||||
if (context->isOpenGLES() && context->format().majorVersion() < 3) {
|
if (context->isOpenGLES() && context->format().majorVersion() < 3) {
|
||||||
initializeProgramBinaryOES(context);
|
initializeProgramBinaryOES(context);
|
||||||
programBinaryOES(programId, blobFormat, p, blobSize);
|
programBinaryOES(programId, blobFormat, p, blobSize);
|
||||||
@ -412,7 +412,7 @@ void QOpenGLProgramBinaryCache::save(const QByteArray &cacheKey, uint programId)
|
|||||||
*p++ = 0;
|
*p++ = 0;
|
||||||
|
|
||||||
GLint outSize = 0;
|
GLint outSize = 0;
|
||||||
#if defined(QT_OPENGL_ES_2)
|
#if QT_CONFIG(opengles2)
|
||||||
if (context->isOpenGLES() && context->format().majorVersion() < 3) {
|
if (context->isOpenGLES() && context->format().majorVersion() < 3) {
|
||||||
QMutexLocker lock(&m_mutex);
|
QMutexLocker lock(&m_mutex);
|
||||||
initializeProgramBinaryOES(context);
|
initializeProgramBinaryOES(context);
|
||||||
@ -443,7 +443,7 @@ void QOpenGLProgramBinaryCache::save(const QByteArray &cacheKey, uint programId)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(QT_OPENGL_ES_2)
|
#if QT_CONFIG(opengles2)
|
||||||
void QOpenGLProgramBinaryCache::initializeProgramBinaryOES(QOpenGLContext *context)
|
void QOpenGLProgramBinaryCache::initializeProgramBinaryOES(QOpenGLContext *context)
|
||||||
{
|
{
|
||||||
if (m_programBinaryOESInitialized)
|
if (m_programBinaryOESInitialized)
|
||||||
|
@ -103,7 +103,7 @@ private:
|
|||||||
uint format;
|
uint format;
|
||||||
};
|
};
|
||||||
QCache<QByteArray, MemCacheEntry> m_memCache;
|
QCache<QByteArray, MemCacheEntry> m_memCache;
|
||||||
#if defined(QT_OPENGL_ES_2)
|
#if QT_CONFIG(opengles2)
|
||||||
void (QOPENGLF_APIENTRYP programBinaryOES)(GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length);
|
void (QOPENGLF_APIENTRYP programBinaryOES)(GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length);
|
||||||
void (QOPENGLF_APIENTRYP getProgramBinaryOES)(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
|
void (QOPENGLF_APIENTRYP getProgramBinaryOES)(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
|
||||||
void initializeProgramBinaryOES(QOpenGLContext *context);
|
void initializeProgramBinaryOES(QOpenGLContext *context);
|
||||||
|
@ -341,7 +341,7 @@ void QOpenGLBuffer::destroy()
|
|||||||
*/
|
*/
|
||||||
bool QOpenGLBuffer::read(int offset, void *data, int count)
|
bool QOpenGLBuffer::read(int offset, void *data, int count)
|
||||||
{
|
{
|
||||||
#if !defined(QT_OPENGL_ES)
|
#if !QT_CONFIG(opengles2)
|
||||||
Q_D(QOpenGLBuffer);
|
Q_D(QOpenGLBuffer);
|
||||||
if (!d->funcs->hasOpenGLFeature(QOpenGLFunctions::Buffers) || !d->guard->id())
|
if (!d->funcs->hasOpenGLFeature(QOpenGLFunctions::Buffers) || !d->guard->id())
|
||||||
return false;
|
return false;
|
||||||
|
@ -748,7 +748,7 @@ void QOpenGLFramebufferObjectPrivate::initDepthStencilAttachments(QOpenGLContext
|
|||||||
funcs.glBindRenderbuffer(GL_RENDERBUFFER, stencil_buffer);
|
funcs.glBindRenderbuffer(GL_RENDERBUFFER, stencil_buffer);
|
||||||
Q_ASSERT(funcs.glIsRenderbuffer(stencil_buffer));
|
Q_ASSERT(funcs.glIsRenderbuffer(stencil_buffer));
|
||||||
|
|
||||||
#ifdef QT_OPENGL_ES
|
#if QT_CONFIG(opengles2)
|
||||||
GLenum storage = GL_STENCIL_INDEX8;
|
GLenum storage = GL_STENCIL_INDEX8;
|
||||||
#else
|
#else
|
||||||
GLenum storage = ctx->isOpenGLES() ? GL_STENCIL_INDEX8 : GL_STENCIL_INDEX;
|
GLenum storage = ctx->isOpenGLES() ? GL_STENCIL_INDEX8 : GL_STENCIL_INDEX;
|
||||||
@ -875,7 +875,7 @@ void QOpenGLFramebufferObjectPrivate::initDepthStencilAttachments(QOpenGLContext
|
|||||||
static inline GLenum effectiveInternalFormat(GLenum internalFormat)
|
static inline GLenum effectiveInternalFormat(GLenum internalFormat)
|
||||||
{
|
{
|
||||||
if (!internalFormat)
|
if (!internalFormat)
|
||||||
#ifdef QT_OPENGL_ES_2
|
#if QT_CONFIG(opengles2)
|
||||||
internalFormat = GL_RGBA;
|
internalFormat = GL_RGBA;
|
||||||
#else
|
#else
|
||||||
internalFormat = QOpenGLContext::currentContext()->isOpenGLES() ? GL_RGBA : GL_RGBA8;
|
internalFormat = QOpenGLContext::currentContext()->isOpenGLES() ? GL_RGBA : GL_RGBA8;
|
||||||
|
@ -67,7 +67,7 @@ public:
|
|||||||
target(GL_TEXTURE_2D),
|
target(GL_TEXTURE_2D),
|
||||||
mipmap(false)
|
mipmap(false)
|
||||||
{
|
{
|
||||||
#ifndef QT_OPENGL_ES_2
|
#if !QT_CONFIG(opengles2)
|
||||||
// There is nothing that says QOpenGLFramebufferObjectFormat needs a current
|
// There is nothing that says QOpenGLFramebufferObjectFormat needs a current
|
||||||
// context, so we need a fallback just to be safe, even though in pratice there
|
// context, so we need a fallback just to be safe, even though in pratice there
|
||||||
// will usually be a context current.
|
// will usually be a context current.
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
#include <QtOpenGL/qtopenglglobal.h>
|
#include <QtOpenGL/qtopenglglobal.h>
|
||||||
|
|
||||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||||
@ -1925,6 +1925,6 @@ inline void QOpenGLFunctions_1_0::glNewList(GLuint list, GLenum mode)
|
|||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
#include <QtOpenGL/qtopenglglobal.h>
|
#include <QtOpenGL/qtopenglglobal.h>
|
||||||
|
|
||||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||||
@ -2115,6 +2115,6 @@ inline void QOpenGLFunctions_1_1::glArrayElement(GLint i)
|
|||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
#include <QtOpenGL/qtopenglglobal.h>
|
#include <QtOpenGL/qtopenglglobal.h>
|
||||||
|
|
||||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||||
@ -2354,6 +2354,6 @@ inline void QOpenGLFunctions_1_2::glColorTable(GLenum target, GLenum internalfor
|
|||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
#include <QtOpenGL/qtopenglglobal.h>
|
#include <QtOpenGL/qtopenglglobal.h>
|
||||||
|
|
||||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||||
@ -2639,6 +2639,6 @@ inline void QOpenGLFunctions_1_3::glClientActiveTexture(GLenum texture)
|
|||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
#include <QtOpenGL/qtopenglglobal.h>
|
#include <QtOpenGL/qtopenglglobal.h>
|
||||||
|
|
||||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||||
@ -2919,6 +2919,6 @@ inline void QOpenGLFunctions_1_4::glFogCoordf(GLfloat coord)
|
|||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
#include <QtOpenGL/qtopenglglobal.h>
|
#include <QtOpenGL/qtopenglglobal.h>
|
||||||
|
|
||||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||||
@ -3042,6 +3042,6 @@ inline void QOpenGLFunctions_1_5::glFogCoordf(GLfloat coord)
|
|||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
#include <QtOpenGL/qtopenglglobal.h>
|
#include <QtOpenGL/qtopenglglobal.h>
|
||||||
|
|
||||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||||
@ -3610,6 +3610,6 @@ inline void QOpenGLFunctions_2_0::glVertexAttrib1d(GLuint index, GLdouble x)
|
|||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
#include <QtOpenGL/qtopenglglobal.h>
|
#include <QtOpenGL/qtopenglglobal.h>
|
||||||
|
|
||||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||||
@ -3655,6 +3655,6 @@ inline void QOpenGLFunctions_2_1::glVertexAttrib1d(GLuint index, GLdouble x)
|
|||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
#include <QtOpenGL/qtopenglglobal.h>
|
#include <QtOpenGL/qtopenglglobal.h>
|
||||||
|
|
||||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||||
@ -4169,6 +4169,6 @@ inline void QOpenGLFunctions_3_0::glVertexAttribI1i(GLuint index, GLint x)
|
|||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
#include <QtOpenGL/qtopenglglobal.h>
|
#include <QtOpenGL/qtopenglglobal.h>
|
||||||
|
|
||||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||||
@ -1597,6 +1597,6 @@ inline void QOpenGLFunctions_3_1::glDrawArraysInstanced(GLenum mode, GLint first
|
|||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
#include <QtOpenGL/qtopenglglobal.h>
|
#include <QtOpenGL/qtopenglglobal.h>
|
||||||
|
|
||||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||||
@ -4373,6 +4373,6 @@ inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttribI1i(GLuint index,
|
|||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
#include <QtOpenGL/qtopenglglobal.h>
|
#include <QtOpenGL/qtopenglglobal.h>
|
||||||
|
|
||||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||||
@ -1716,6 +1716,6 @@ inline void QOpenGLFunctions_3_2_Core::glGetInteger64i_v(GLenum target, GLuint i
|
|||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
#include <QtOpenGL/qtopenglglobal.h>
|
#include <QtOpenGL/qtopenglglobal.h>
|
||||||
|
|
||||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||||
@ -4730,6 +4730,6 @@ inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttribI1i(GLuint index,
|
|||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
#include <QtOpenGL/qtopenglglobal.h>
|
#include <QtOpenGL/qtopenglglobal.h>
|
||||||
|
|
||||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||||
@ -2137,6 +2137,6 @@ inline void QOpenGLFunctions_3_3_Core::glVertexAttribDivisor(GLuint index, GLuin
|
|||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
#include <QtOpenGL/qtopenglglobal.h>
|
#include <QtOpenGL/qtopenglglobal.h>
|
||||||
|
|
||||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||||
@ -5015,6 +5015,6 @@ inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttribI1i(GLuint index,
|
|||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
#include <QtOpenGL/qtopenglglobal.h>
|
#include <QtOpenGL/qtopenglglobal.h>
|
||||||
|
|
||||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||||
@ -2418,6 +2418,6 @@ inline void QOpenGLFunctions_4_0_Core::glMinSampleShading(GLfloat value)
|
|||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
#include <QtOpenGL/qtopenglglobal.h>
|
#include <QtOpenGL/qtopenglglobal.h>
|
||||||
|
|
||||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||||
@ -5552,6 +5552,6 @@ inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttribI1i(GLuint index,
|
|||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
#include <QtOpenGL/qtopenglglobal.h>
|
#include <QtOpenGL/qtopenglglobal.h>
|
||||||
|
|
||||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||||
@ -2951,6 +2951,6 @@ inline void QOpenGLFunctions_4_1_Core::glReleaseShaderCompiler()
|
|||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
#include <QtOpenGL/qtopenglglobal.h>
|
#include <QtOpenGL/qtopenglglobal.h>
|
||||||
|
|
||||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||||
@ -5643,6 +5643,6 @@ QT_END_NAMESPACE
|
|||||||
#pragma pop_macro("MemoryBarrier")
|
#pragma pop_macro("MemoryBarrier")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
#include <QtOpenGL/qtopenglglobal.h>
|
#include <QtOpenGL/qtopenglglobal.h>
|
||||||
|
|
||||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||||
@ -3038,6 +3038,6 @@ QT_END_NAMESPACE
|
|||||||
#pragma pop_macro("MemoryBarrier")
|
#pragma pop_macro("MemoryBarrier")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
#include <QtOpenGL/qtopenglglobal.h>
|
#include <QtOpenGL/qtopenglglobal.h>
|
||||||
|
|
||||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||||
@ -5850,6 +5850,6 @@ QT_END_NAMESPACE
|
|||||||
#pragma pop_macro("MemoryBarrier")
|
#pragma pop_macro("MemoryBarrier")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
#include <QtOpenGL/qtopenglglobal.h>
|
#include <QtOpenGL/qtopenglglobal.h>
|
||||||
|
|
||||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||||
@ -3242,6 +3242,6 @@ QT_END_NAMESPACE
|
|||||||
#pragma pop_macro("MemoryBarrier")
|
#pragma pop_macro("MemoryBarrier")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
#include <QtOpenGL/qtopenglglobal.h>
|
#include <QtOpenGL/qtopenglglobal.h>
|
||||||
|
|
||||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||||
@ -5972,6 +5972,6 @@ QT_END_NAMESPACE
|
|||||||
#pragma pop_macro("MemoryBarrier")
|
#pragma pop_macro("MemoryBarrier")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
#include <QtOpenGL/qtopenglglobal.h>
|
#include <QtOpenGL/qtopenglglobal.h>
|
||||||
|
|
||||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||||
@ -3426,6 +3426,6 @@ QT_END_NAMESPACE
|
|||||||
#pragma pop_macro("MemoryBarrier")
|
#pragma pop_macro("MemoryBarrier")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
#include <QtOpenGL/qtopenglglobal.h>
|
#include <QtOpenGL/qtopenglglobal.h>
|
||||||
|
|
||||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||||
@ -6690,6 +6690,6 @@ QT_END_NAMESPACE
|
|||||||
#pragma pop_macro("MemoryBarrier")
|
#pragma pop_macro("MemoryBarrier")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
#include <QtOpenGL/qtopenglglobal.h>
|
#include <QtOpenGL/qtopenglglobal.h>
|
||||||
|
|
||||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||||
@ -4068,6 +4068,6 @@ QT_END_NAMESPACE
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
#include <QtOpenGL/qtopenglglobal.h>
|
#include <QtOpenGL/qtopenglglobal.h>
|
||||||
|
|
||||||
#if defined(QT_OPENGL_ES_2) || defined(Q_QDOC)
|
#if QT_CONFIG(opengles2) || defined(Q_QDOC)
|
||||||
|
|
||||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||||
@ -927,6 +927,6 @@ inline void QOpenGLFunctions_ES2::glViewport(GLint x, GLint y, GLsizei width, GL
|
|||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QT_OPENGL_ES_2
|
#endif // QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -682,7 +682,7 @@ void QOpenGL2PaintEngineEx::beginNativePainting()
|
|||||||
for (int i = 0; i < QT_GL_VERTEX_ARRAY_TRACKED_COUNT; ++i)
|
for (int i = 0; i < QT_GL_VERTEX_ARRAY_TRACKED_COUNT; ++i)
|
||||||
d->funcs.glDisableVertexAttribArray(i);
|
d->funcs.glDisableVertexAttribArray(i);
|
||||||
|
|
||||||
#if !defined(QT_OPENGL_ES_2) && !defined(QT_OPENGL_DYNAMIC)
|
#if !QT_CONFIG(opengles2) && !defined(QT_OPENGL_DYNAMIC)
|
||||||
Q_ASSERT(QOpenGLContext::currentContext());
|
Q_ASSERT(QOpenGLContext::currentContext());
|
||||||
const QOpenGLContext *ctx = d->ctx;
|
const QOpenGLContext *ctx = d->ctx;
|
||||||
const QSurfaceFormat &fmt = d->device->context()->format();
|
const QSurfaceFormat &fmt = d->device->context()->format();
|
||||||
@ -712,7 +712,7 @@ void QOpenGL2PaintEngineEx::beginNativePainting()
|
|||||||
glMatrixMode(GL_MODELVIEW);
|
glMatrixMode(GL_MODELVIEW);
|
||||||
glLoadMatrixf(&mv_matrix[0][0]);
|
glLoadMatrixf(&mv_matrix[0][0]);
|
||||||
}
|
}
|
||||||
#endif // QT_OPENGL_ES_2
|
#endif // !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
d->resetGLState();
|
d->resetGLState();
|
||||||
|
|
||||||
@ -1472,7 +1472,7 @@ void QOpenGL2PaintEngineEx::renderHintsChanged()
|
|||||||
{
|
{
|
||||||
state()->renderHintsChanged = true;
|
state()->renderHintsChanged = true;
|
||||||
|
|
||||||
#ifndef QT_OPENGL_ES_2
|
#if !QT_CONFIG(opengles2)
|
||||||
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
|
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
|
||||||
Q_D(QOpenGL2PaintEngineEx);
|
Q_D(QOpenGL2PaintEngineEx);
|
||||||
QT_WARNING_PUSH
|
QT_WARNING_PUSH
|
||||||
@ -1487,7 +1487,7 @@ QT_WARNING_DISABLE_DEPRECATED
|
|||||||
d->funcs.glDisable(GL_MULTISAMPLE);
|
d->funcs.glDisable(GL_MULTISAMPLE);
|
||||||
QT_WARNING_POP
|
QT_WARNING_POP
|
||||||
}
|
}
|
||||||
#endif // QT_OPENGL_ES_2
|
#endif // !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
Q_D(QOpenGL2PaintEngineEx);
|
Q_D(QOpenGL2PaintEngineEx);
|
||||||
|
|
||||||
@ -2248,13 +2248,13 @@ bool QOpenGL2PaintEngineEx::begin(QPaintDevice *pdev)
|
|||||||
|
|
||||||
d->glyphCacheFormat = QFontEngine::Format_A8;
|
d->glyphCacheFormat = QFontEngine::Format_A8;
|
||||||
|
|
||||||
#ifndef QT_OPENGL_ES_2
|
#if !QT_CONFIG(opengles2)
|
||||||
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
|
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
|
||||||
d->funcs.glDisable(GL_MULTISAMPLE);
|
d->funcs.glDisable(GL_MULTISAMPLE);
|
||||||
d->glyphCacheFormat = QFontEngine::Format_A32;
|
d->glyphCacheFormat = QFontEngine::Format_A32;
|
||||||
d->multisamplingAlwaysEnabled = false;
|
d->multisamplingAlwaysEnabled = false;
|
||||||
} else
|
} else
|
||||||
#endif // QT_OPENGL_ES_2
|
#endif // !QT_CONFIG(opengles2)
|
||||||
{
|
{
|
||||||
// OpenGL ES can't switch MSAA off, so if the gl paint device is
|
// OpenGL ES can't switch MSAA off, so if the gl paint device is
|
||||||
// multisampled, it's always multisampled.
|
// multisampled, it's always multisampled.
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
|
|
||||||
#include <QtGui/private/qtguiglobal_p.h>
|
#include <QtGui/private/qtguiglobal_p.h>
|
||||||
|
|
||||||
#if !defined(QT_OPENGL_ES_2)
|
#if !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#include <QtGui/QOpenGLContext>
|
#include <QtGui/QOpenGLContext>
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
#include <QtGui/QColor>
|
#include <QtGui/QColor>
|
||||||
#include <QtGui/QSurfaceFormat>
|
#include <QtGui/QSurfaceFormat>
|
||||||
|
|
||||||
#if !defined(QT_OPENGL_ES_2)
|
#if !QT_CONFIG(opengles2)
|
||||||
#include <QtOpenGL/qopenglfunctions_4_0_core.h>
|
#include <QtOpenGL/qopenglfunctions_4_0_core.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -207,7 +207,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
#define GL_PATCH_DEFAULT_INNER_LEVEL 0x8E73
|
#define GL_PATCH_DEFAULT_INNER_LEVEL 0x8E73
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef QT_OPENGL_ES_2
|
#if !QT_CONFIG(opengles2)
|
||||||
static inline bool isFormatGLES(const QSurfaceFormat &f)
|
static inline bool isFormatGLES(const QSurfaceFormat &f)
|
||||||
{
|
{
|
||||||
return (f.renderableType() == QSurfaceFormat::OpenGLES);
|
return (f.renderableType() == QSurfaceFormat::OpenGLES);
|
||||||
@ -221,7 +221,7 @@ static inline bool supportsGeometry(const QSurfaceFormat &f)
|
|||||||
|
|
||||||
static inline bool supportsCompute(const QSurfaceFormat &f)
|
static inline bool supportsCompute(const QSurfaceFormat &f)
|
||||||
{
|
{
|
||||||
#ifndef QT_OPENGL_ES_2
|
#if !QT_CONFIG(opengles2)
|
||||||
if (!isFormatGLES(f))
|
if (!isFormatGLES(f))
|
||||||
return f.version() >= qMakePair(4, 3);
|
return f.version() >= qMakePair(4, 3);
|
||||||
else
|
else
|
||||||
@ -233,7 +233,7 @@ static inline bool supportsCompute(const QSurfaceFormat &f)
|
|||||||
|
|
||||||
static inline bool supportsTessellation(const QSurfaceFormat &f)
|
static inline bool supportsTessellation(const QSurfaceFormat &f)
|
||||||
{
|
{
|
||||||
#ifndef QT_OPENGL_ES_2
|
#if !QT_CONFIG(opengles2)
|
||||||
if (!isFormatGLES(f))
|
if (!isFormatGLES(f))
|
||||||
return f.version() >= qMakePair(4, 0);
|
return f.version() >= qMakePair(4, 0);
|
||||||
else
|
else
|
||||||
@ -470,7 +470,7 @@ static const char qualifierDefines[] =
|
|||||||
"#define mediump\n"
|
"#define mediump\n"
|
||||||
"#define highp\n";
|
"#define highp\n";
|
||||||
|
|
||||||
#if defined(QT_OPENGL_ES) && !defined(QT_OPENGL_FORCE_SHADER_DEFINES)
|
#if QT_CONFIG(opengles2) && !defined(QT_OPENGL_FORCE_SHADER_DEFINES)
|
||||||
// The "highp" qualifier doesn't exist in fragment shaders
|
// The "highp" qualifier doesn't exist in fragment shaders
|
||||||
// on all ES platforms. When it doesn't exist, use "mediump".
|
// on all ES platforms. When it doesn't exist, use "mediump".
|
||||||
#define QOpenGL_REDEFINE_HIGHP 1
|
#define QOpenGL_REDEFINE_HIGHP 1
|
||||||
@ -787,7 +787,7 @@ public:
|
|||||||
, inited(false)
|
, inited(false)
|
||||||
, removingShaders(false)
|
, removingShaders(false)
|
||||||
, glfuncs(new QOpenGLExtraFunctions)
|
, glfuncs(new QOpenGLExtraFunctions)
|
||||||
#ifndef QT_OPENGL_ES_2
|
#if !QT_CONFIG(opengles2)
|
||||||
, tessellationFuncs(nullptr)
|
, tessellationFuncs(nullptr)
|
||||||
#endif
|
#endif
|
||||||
, linkBinaryRecursion(false)
|
, linkBinaryRecursion(false)
|
||||||
@ -805,7 +805,7 @@ public:
|
|||||||
QList<QOpenGLShader *> anonShaders;
|
QList<QOpenGLShader *> anonShaders;
|
||||||
|
|
||||||
QOpenGLExtraFunctions *glfuncs;
|
QOpenGLExtraFunctions *glfuncs;
|
||||||
#ifndef QT_OPENGL_ES_2
|
#if !QT_CONFIG(opengles2)
|
||||||
// for tessellation features not in GLES 3.2
|
// for tessellation features not in GLES 3.2
|
||||||
QOpenGLFunctions_4_0_Core *tessellationFuncs;
|
QOpenGLFunctions_4_0_Core *tessellationFuncs;
|
||||||
#endif
|
#endif
|
||||||
@ -895,7 +895,7 @@ bool QOpenGLShaderProgram::init()
|
|||||||
return false;
|
return false;
|
||||||
d->glfuncs->initializeOpenGLFunctions();
|
d->glfuncs->initializeOpenGLFunctions();
|
||||||
|
|
||||||
#ifndef QT_OPENGL_ES_2
|
#if !QT_CONFIG(opengles2)
|
||||||
if (!context->isOpenGLES() && context->format().version() >= qMakePair(4, 0)) {
|
if (!context->isOpenGLES() && context->format().version() >= qMakePair(4, 0)) {
|
||||||
d->tessellationFuncs = QOpenGLVersionFunctionsFactory::get<QOpenGLFunctions_4_0_Core>(context);
|
d->tessellationFuncs = QOpenGLVersionFunctionsFactory::get<QOpenGLFunctions_4_0_Core>(context);
|
||||||
d->tessellationFuncs->initializeOpenGLFunctions();
|
d->tessellationFuncs->initializeOpenGLFunctions();
|
||||||
@ -3568,7 +3568,7 @@ int QOpenGLShaderProgram::patchVertexCount() const
|
|||||||
*/
|
*/
|
||||||
void QOpenGLShaderProgram::setDefaultOuterTessellationLevels(const QVector<float> &levels)
|
void QOpenGLShaderProgram::setDefaultOuterTessellationLevels(const QVector<float> &levels)
|
||||||
{
|
{
|
||||||
#ifndef QT_OPENGL_ES_2
|
#if !QT_CONFIG(opengles2)
|
||||||
Q_D(QOpenGLShaderProgram);
|
Q_D(QOpenGLShaderProgram);
|
||||||
if (d->tessellationFuncs) {
|
if (d->tessellationFuncs) {
|
||||||
QVector<float> tessLevels = levels;
|
QVector<float> tessLevels = levels;
|
||||||
@ -3608,7 +3608,7 @@ void QOpenGLShaderProgram::setDefaultOuterTessellationLevels(const QVector<float
|
|||||||
*/
|
*/
|
||||||
QVector<float> QOpenGLShaderProgram::defaultOuterTessellationLevels() const
|
QVector<float> QOpenGLShaderProgram::defaultOuterTessellationLevels() const
|
||||||
{
|
{
|
||||||
#ifndef QT_OPENGL_ES_2
|
#if !QT_CONFIG(opengles2)
|
||||||
QVector<float> tessLevels(4, 1.0f);
|
QVector<float> tessLevels(4, 1.0f);
|
||||||
Q_D(const QOpenGLShaderProgram);
|
Q_D(const QOpenGLShaderProgram);
|
||||||
if (d->tessellationFuncs)
|
if (d->tessellationFuncs)
|
||||||
@ -3641,7 +3641,7 @@ QVector<float> QOpenGLShaderProgram::defaultOuterTessellationLevels() const
|
|||||||
*/
|
*/
|
||||||
void QOpenGLShaderProgram::setDefaultInnerTessellationLevels(const QVector<float> &levels)
|
void QOpenGLShaderProgram::setDefaultInnerTessellationLevels(const QVector<float> &levels)
|
||||||
{
|
{
|
||||||
#ifndef QT_OPENGL_ES_2
|
#if !QT_CONFIG(opengles2)
|
||||||
Q_D(QOpenGLShaderProgram);
|
Q_D(QOpenGLShaderProgram);
|
||||||
if (d->tessellationFuncs) {
|
if (d->tessellationFuncs) {
|
||||||
QVector<float> tessLevels = levels;
|
QVector<float> tessLevels = levels;
|
||||||
@ -3681,7 +3681,7 @@ void QOpenGLShaderProgram::setDefaultInnerTessellationLevels(const QVector<float
|
|||||||
*/
|
*/
|
||||||
QVector<float> QOpenGLShaderProgram::defaultInnerTessellationLevels() const
|
QVector<float> QOpenGLShaderProgram::defaultInnerTessellationLevels() const
|
||||||
{
|
{
|
||||||
#ifndef QT_OPENGL_ES_2
|
#if !QT_CONFIG(opengles2)
|
||||||
QVector<float> tessLevels(2, 1.0f);
|
QVector<float> tessLevels(2, 1.0f);
|
||||||
Q_D(const QOpenGLShaderProgram);
|
Q_D(const QOpenGLShaderProgram);
|
||||||
if (d->tessellationFuncs)
|
if (d->tessellationFuncs)
|
||||||
|
@ -3890,7 +3890,7 @@ bool QOpenGLTexture::hasFeature(Feature feature)
|
|||||||
|
|
||||||
bool supported = false;
|
bool supported = false;
|
||||||
|
|
||||||
#if !defined(QT_OPENGL_ES_2)
|
#if !QT_CONFIG(opengles2)
|
||||||
if (!ctx->isOpenGLES()) {
|
if (!ctx->isOpenGLES()) {
|
||||||
switch (feature) {
|
switch (feature) {
|
||||||
case ImmutableMultisampleStorage:
|
case ImmutableMultisampleStorage:
|
||||||
@ -4242,7 +4242,7 @@ void QOpenGLTexture::generateMipMaps(int baseLevel, bool resetBaseLevel)
|
|||||||
*/
|
*/
|
||||||
void QOpenGLTexture::setSwizzleMask(SwizzleComponent component, SwizzleValue value)
|
void QOpenGLTexture::setSwizzleMask(SwizzleComponent component, SwizzleValue value)
|
||||||
{
|
{
|
||||||
#if !defined(Q_OS_MAC) && !defined(QT_OPENGL_ES_2)
|
#if !defined(Q_OS_MAC) && !QT_CONFIG(opengles2)
|
||||||
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
|
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
|
||||||
Q_D(QOpenGLTexture);
|
Q_D(QOpenGLTexture);
|
||||||
d->create();
|
d->create();
|
||||||
@ -4271,7 +4271,7 @@ void QOpenGLTexture::setSwizzleMask(SwizzleComponent component, SwizzleValue val
|
|||||||
void QOpenGLTexture::setSwizzleMask(SwizzleValue r, SwizzleValue g,
|
void QOpenGLTexture::setSwizzleMask(SwizzleValue r, SwizzleValue g,
|
||||||
SwizzleValue b, SwizzleValue a)
|
SwizzleValue b, SwizzleValue a)
|
||||||
{
|
{
|
||||||
#if !defined(Q_OS_MAC) && !defined(QT_OPENGL_ES_2)
|
#if !defined(Q_OS_MAC) && !QT_CONFIG(opengles2)
|
||||||
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
|
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
|
||||||
Q_D(QOpenGLTexture);
|
Q_D(QOpenGLTexture);
|
||||||
d->create();
|
d->create();
|
||||||
@ -4331,7 +4331,7 @@ QOpenGLTexture::SwizzleValue QOpenGLTexture::swizzleMask(SwizzleComponent compon
|
|||||||
*/
|
*/
|
||||||
void QOpenGLTexture::setDepthStencilMode(QOpenGLTexture::DepthStencilMode mode)
|
void QOpenGLTexture::setDepthStencilMode(QOpenGLTexture::DepthStencilMode mode)
|
||||||
{
|
{
|
||||||
#if !defined(Q_OS_MAC) && !defined(QT_OPENGL_ES_2)
|
#if !defined(Q_OS_MAC) && !QT_CONFIG(opengles2)
|
||||||
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
|
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
|
||||||
Q_D(QOpenGLTexture);
|
Q_D(QOpenGLTexture);
|
||||||
d->create();
|
d->create();
|
||||||
@ -4628,7 +4628,7 @@ void QOpenGLTexture::setBorderColor(const QColor &color)
|
|||||||
*/
|
*/
|
||||||
void QOpenGLTexture::setBorderColor(float r, float g, float b, float a)
|
void QOpenGLTexture::setBorderColor(float r, float g, float b, float a)
|
||||||
{
|
{
|
||||||
#if !defined(QT_OPENGL_ES_2)
|
#if !QT_CONFIG(opengles2)
|
||||||
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
|
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
|
||||||
Q_D(QOpenGLTexture);
|
Q_D(QOpenGLTexture);
|
||||||
d->create();
|
d->create();
|
||||||
@ -4661,7 +4661,7 @@ void QOpenGLTexture::setBorderColor(float r, float g, float b, float a)
|
|||||||
*/
|
*/
|
||||||
void QOpenGLTexture::setBorderColor(int r, int g, int b, int a)
|
void QOpenGLTexture::setBorderColor(int r, int g, int b, int a)
|
||||||
{
|
{
|
||||||
#if !defined(QT_OPENGL_ES_2)
|
#if !QT_CONFIG(opengles2)
|
||||||
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
|
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
|
||||||
Q_D(QOpenGLTexture);
|
Q_D(QOpenGLTexture);
|
||||||
d->create();
|
d->create();
|
||||||
@ -4696,7 +4696,7 @@ void QOpenGLTexture::setBorderColor(int r, int g, int b, int a)
|
|||||||
*/
|
*/
|
||||||
void QOpenGLTexture::setBorderColor(uint r, uint g, uint b, uint a)
|
void QOpenGLTexture::setBorderColor(uint r, uint g, uint b, uint a)
|
||||||
{
|
{
|
||||||
#if !defined(QT_OPENGL_ES_2)
|
#if !QT_CONFIG(opengles2)
|
||||||
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
|
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
|
||||||
Q_D(QOpenGLTexture);
|
Q_D(QOpenGLTexture);
|
||||||
d->create();
|
d->create();
|
||||||
@ -4808,7 +4808,7 @@ void QOpenGLTexture::borderColor(unsigned int *border) const
|
|||||||
*/
|
*/
|
||||||
void QOpenGLTexture::setMinimumLevelOfDetail(float value)
|
void QOpenGLTexture::setMinimumLevelOfDetail(float value)
|
||||||
{
|
{
|
||||||
#if !defined(QT_OPENGL_ES_2)
|
#if !QT_CONFIG(opengles2)
|
||||||
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
|
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
|
||||||
Q_D(QOpenGLTexture);
|
Q_D(QOpenGLTexture);
|
||||||
d->create();
|
d->create();
|
||||||
@ -4845,7 +4845,7 @@ float QOpenGLTexture::minimumLevelOfDetail() const
|
|||||||
*/
|
*/
|
||||||
void QOpenGLTexture::setMaximumLevelOfDetail(float value)
|
void QOpenGLTexture::setMaximumLevelOfDetail(float value)
|
||||||
{
|
{
|
||||||
#if !defined(QT_OPENGL_ES_2)
|
#if !QT_CONFIG(opengles2)
|
||||||
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
|
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
|
||||||
Q_D(QOpenGLTexture);
|
Q_D(QOpenGLTexture);
|
||||||
d->create();
|
d->create();
|
||||||
@ -4881,7 +4881,7 @@ float QOpenGLTexture::maximumLevelOfDetail() const
|
|||||||
*/
|
*/
|
||||||
void QOpenGLTexture::setLevelOfDetailRange(float min, float max)
|
void QOpenGLTexture::setLevelOfDetailRange(float min, float max)
|
||||||
{
|
{
|
||||||
#if !defined(QT_OPENGL_ES_2)
|
#if !QT_CONFIG(opengles2)
|
||||||
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
|
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
|
||||||
Q_D(QOpenGLTexture);
|
Q_D(QOpenGLTexture);
|
||||||
d->create();
|
d->create();
|
||||||
@ -4923,7 +4923,7 @@ QPair<float, float> QOpenGLTexture::levelOfDetailRange() const
|
|||||||
*/
|
*/
|
||||||
void QOpenGLTexture::setLevelofDetailBias(float bias)
|
void QOpenGLTexture::setLevelofDetailBias(float bias)
|
||||||
{
|
{
|
||||||
#if !defined(QT_OPENGL_ES_2)
|
#if !QT_CONFIG(opengles2)
|
||||||
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
|
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
|
||||||
Q_D(QOpenGLTexture);
|
Q_D(QOpenGLTexture);
|
||||||
d->create();
|
d->create();
|
||||||
|
@ -92,7 +92,7 @@ QOpenGLTextureGlyphCache::~QOpenGLTextureGlyphCache()
|
|||||||
clear();
|
clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(QT_OPENGL_ES_2)
|
#if !QT_CONFIG(opengles2)
|
||||||
static inline bool isCoreProfile()
|
static inline bool isCoreProfile()
|
||||||
{
|
{
|
||||||
return QOpenGLContext::currentContext()->format().profile() == QSurfaceFormat::CoreProfile;
|
return QOpenGLContext::currentContext()->format().profile() == QSurfaceFormat::CoreProfile;
|
||||||
@ -143,7 +143,7 @@ void QOpenGLTextureGlyphCache::createTextureData(int width, int height)
|
|||||||
QVarLengthArray<uchar> data(width * height);
|
QVarLengthArray<uchar> data(width * height);
|
||||||
for (int i = 0; i < data.size(); ++i)
|
for (int i = 0; i < data.size(); ++i)
|
||||||
data[i] = 0;
|
data[i] = 0;
|
||||||
#if !defined(QT_OPENGL_ES_2)
|
#if !QT_CONFIG(opengles2)
|
||||||
const GLint internalFormat = isCoreProfile() ? GL_R8 : GL_ALPHA;
|
const GLint internalFormat = isCoreProfile() ? GL_R8 : GL_ALPHA;
|
||||||
const GLenum format = isCoreProfile() ? GL_RED : GL_ALPHA;
|
const GLenum format = isCoreProfile() ? GL_RED : GL_ALPHA;
|
||||||
#else
|
#else
|
||||||
@ -233,11 +233,11 @@ static void load_glyph_image_to_texture(QOpenGLContext *ctx,
|
|||||||
|
|
||||||
funcs->glBindTexture(GL_TEXTURE_2D, texture);
|
funcs->glBindTexture(GL_TEXTURE_2D, texture);
|
||||||
if (img.depth() == 32) {
|
if (img.depth() == 32) {
|
||||||
#ifdef QT_OPENGL_ES_2
|
#if QT_CONFIG(opengles2)
|
||||||
GLenum fmt = GL_RGBA;
|
GLenum fmt = GL_RGBA;
|
||||||
#else
|
#else
|
||||||
GLenum fmt = ctx->isOpenGLES() ? GL_RGBA : GL_BGRA;
|
GLenum fmt = ctx->isOpenGLES() ? GL_RGBA : GL_BGRA;
|
||||||
#endif // QT_OPENGL_ES_2
|
#endif // QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
|
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
|
||||||
fmt = GL_RGBA;
|
fmt = GL_RGBA;
|
||||||
@ -246,7 +246,7 @@ static void load_glyph_image_to_texture(QOpenGLContext *ctx,
|
|||||||
} else {
|
} else {
|
||||||
// The scanlines in image are 32-bit aligned, even for mono or 8-bit formats. This
|
// The scanlines in image are 32-bit aligned, even for mono or 8-bit formats. This
|
||||||
// is good because it matches the default of 4 bytes for GL_UNPACK_ALIGNMENT.
|
// is good because it matches the default of 4 bytes for GL_UNPACK_ALIGNMENT.
|
||||||
#if !defined(QT_OPENGL_ES_2)
|
#if !QT_CONFIG(opengles2)
|
||||||
const GLenum format = isCoreProfile() ? GL_RED : GL_ALPHA;
|
const GLenum format = isCoreProfile() ? GL_RED : GL_ALPHA;
|
||||||
#else
|
#else
|
||||||
const GLenum format = GL_ALPHA;
|
const GLenum format = GL_ALPHA;
|
||||||
|
@ -143,7 +143,7 @@ QOpenGLTextureHelper::QOpenGLTextureHelper(QOpenGLContext *context)
|
|||||||
TextureImage2DMultisample = &QOpenGLTextureHelper::qt_TextureImage2DMultisample;
|
TextureImage2DMultisample = &QOpenGLTextureHelper::qt_TextureImage2DMultisample;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(QT_OPENGL_ES_2)
|
#if QT_CONFIG(opengles2)
|
||||||
// Here we are targeting OpenGL ES 2.0+ only. This is likely using EGL, where,
|
// Here we are targeting OpenGL ES 2.0+ only. This is likely using EGL, where,
|
||||||
// similarly to WGL, non-extension functions (i.e. any function that is part of the
|
// similarly to WGL, non-extension functions (i.e. any function that is part of the
|
||||||
// GLES spec) *may* not be queried via eglGetProcAddress.
|
// GLES spec) *may* not be queried via eglGetProcAddress.
|
||||||
@ -221,7 +221,7 @@ QOpenGLTextureHelper::QOpenGLTextureHelper(QOpenGLContext *context)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef QT_OPENGL_ES_2
|
#if !QT_CONFIG(opengles2)
|
||||||
// OpenGL 1.0 and 1.1
|
// OpenGL 1.0 and 1.1
|
||||||
TexImage1D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLint , GLsizei , GLint , GLenum , GLenum , const GLvoid *)>(context->getProcAddress("glTexImage1D"));
|
TexImage1D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLint , GLsizei , GLint , GLenum , GLenum , const GLvoid *)>(context->getProcAddress("glTexImage1D"));
|
||||||
TexSubImage1D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLint , GLsizei , GLenum , GLenum , const GLvoid *)>(context->getProcAddress("glTexSubImage1D"));\
|
TexSubImage1D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLint , GLsizei , GLenum , GLenum , const GLvoid *)>(context->getProcAddress("glTexSubImage1D"));\
|
||||||
|
@ -628,7 +628,7 @@ public:
|
|||||||
int val = 0;
|
int val = 0;
|
||||||
functions->glGetIntegerv(GL_UNPACK_ALIGNMENT, &val);
|
functions->glGetIntegerv(GL_UNPACK_ALIGNMENT, &val);
|
||||||
options.setAlignment(val);
|
options.setAlignment(val);
|
||||||
#if !defined(QT_OPENGL_ES_2)
|
#if !QT_CONFIG(opengles2)
|
||||||
functions->glGetIntegerv(GL_UNPACK_SKIP_IMAGES, &val);
|
functions->glGetIntegerv(GL_UNPACK_SKIP_IMAGES, &val);
|
||||||
options.setSkipImages(val);
|
options.setSkipImages(val);
|
||||||
functions->glGetIntegerv(GL_UNPACK_SKIP_ROWS, &val);
|
functions->glGetIntegerv(GL_UNPACK_SKIP_ROWS, &val);
|
||||||
@ -651,7 +651,7 @@ public:
|
|||||||
inline void setPixelUploadOptions(const QOpenGLPixelTransferOptions &options)
|
inline void setPixelUploadOptions(const QOpenGLPixelTransferOptions &options)
|
||||||
{
|
{
|
||||||
functions->glPixelStorei(GL_UNPACK_ALIGNMENT, options.alignment());
|
functions->glPixelStorei(GL_UNPACK_ALIGNMENT, options.alignment());
|
||||||
#if !defined(QT_OPENGL_ES_2)
|
#if !QT_CONFIG(opengles2)
|
||||||
functions->glPixelStorei(GL_UNPACK_SKIP_IMAGES, options.skipImages());
|
functions->glPixelStorei(GL_UNPACK_SKIP_IMAGES, options.skipImages());
|
||||||
functions->glPixelStorei(GL_UNPACK_SKIP_ROWS, options.skipRows());
|
functions->glPixelStorei(GL_UNPACK_SKIP_ROWS, options.skipRows());
|
||||||
functions->glPixelStorei(GL_UNPACK_SKIP_PIXELS, options.skipPixels());
|
functions->glPixelStorei(GL_UNPACK_SKIP_PIXELS, options.skipPixels());
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
#include <QtOpenGL/qtopenglglobal.h>
|
#include <QtOpenGL/qtopenglglobal.h>
|
||||||
|
|
||||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#include <QtCore/QObject>
|
#include <QtCore/QObject>
|
||||||
#include <QtGui/qopengl.h>
|
#include <QtGui/qopengl.h>
|
||||||
|
@ -103,7 +103,7 @@ QOpenGLVersionFunctionsStorage::QOpenGLVersionFunctionsStorage()
|
|||||||
|
|
||||||
QOpenGLVersionFunctionsStorage::~QOpenGLVersionFunctionsStorage()
|
QOpenGLVersionFunctionsStorage::~QOpenGLVersionFunctionsStorage()
|
||||||
{
|
{
|
||||||
#ifndef QT_OPENGL_ES
|
#if !QT_CONFIG(opengles2)
|
||||||
if (backends) {
|
if (backends) {
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
@ -122,7 +122,7 @@ QOpenGLVersionFunctionsStorage::~QOpenGLVersionFunctionsStorage()
|
|||||||
|
|
||||||
QOpenGLVersionFunctionsBackend *QOpenGLVersionFunctionsStorage::backend(QOpenGLContext *context, QOpenGLVersionFunctionsBackend::Version v)
|
QOpenGLVersionFunctionsBackend *QOpenGLVersionFunctionsStorage::backend(QOpenGLContext *context, QOpenGLVersionFunctionsBackend::Version v)
|
||||||
{
|
{
|
||||||
#ifdef QT_OPENGL_ES
|
#if QT_CONFIG(opengles2)
|
||||||
Q_UNUSED(context);
|
Q_UNUSED(context);
|
||||||
Q_UNUSED(v);
|
Q_UNUSED(v);
|
||||||
return 0;
|
return 0;
|
||||||
@ -339,7 +339,7 @@ QOpenGLContext *QAbstractOpenGLFunctions::owningContext() const
|
|||||||
return d->owningContext;
|
return d->owningContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(QT_OPENGL_ES_2)
|
#if !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
QT_OPENGL_IMPLEMENT(QOpenGLFunctions_1_0_CoreBackend, QT_OPENGL_1_0_FUNCTIONS)
|
QT_OPENGL_IMPLEMENT(QOpenGLFunctions_1_0_CoreBackend, QT_OPENGL_1_0_FUNCTIONS)
|
||||||
QT_OPENGL_IMPLEMENT(QOpenGLFunctions_1_1_CoreBackend, QT_OPENGL_1_1_FUNCTIONS)
|
QT_OPENGL_IMPLEMENT(QOpenGLFunctions_1_1_CoreBackend, QT_OPENGL_1_1_FUNCTIONS)
|
||||||
@ -376,6 +376,6 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctions_4_5_DeprecatedBackend, QT_OPENGL_4_5_DEPREC
|
|||||||
|
|
||||||
// No backends for OpenGL ES 2
|
// No backends for OpenGL ES 2
|
||||||
|
|
||||||
#endif // !QT_OPENGL_ES_2
|
#endif // !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
@ -240,7 +240,7 @@ inline QAbstractOpenGLFunctionsPrivate *QAbstractOpenGLFunctionsPrivate::get(QAb
|
|||||||
return q->d_func();
|
return q->d_func();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(QT_OPENGL_ES_2)
|
#if !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
class QOpenGLFunctions_1_0_CoreBackend : public QOpenGLVersionFunctionsBackend
|
class QOpenGLFunctions_1_0_CoreBackend : public QOpenGLVersionFunctionsBackend
|
||||||
{
|
{
|
||||||
@ -1894,7 +1894,7 @@ public:
|
|||||||
// No need for backend classes with function pointers with ES2.
|
// No need for backend classes with function pointers with ES2.
|
||||||
// All function addresses are independent of context and display.
|
// All function addresses are independent of context and display.
|
||||||
|
|
||||||
#endif // !QT_OPENGL_ES_2
|
#endif // !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#undef QT_OPENGL_DECLARE_FUNCTIONS
|
#undef QT_OPENGL_DECLARE_FUNCTIONS
|
||||||
#undef QT_OPENGL_COUNT_FUNCTIONS
|
#undef QT_OPENGL_COUNT_FUNCTIONS
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
#include "qopenglversionfunctionsfactory.h"
|
#include "qopenglversionfunctionsfactory.h"
|
||||||
#include "qopenglversionfunctions_p.h"
|
#include "qopenglversionfunctions_p.h"
|
||||||
|
|
||||||
#if !defined(QT_OPENGL_ES_2)
|
#if !QT_CONFIG(opengles2)
|
||||||
#include "qopenglfunctions_4_5_core.h"
|
#include "qopenglfunctions_4_5_core.h"
|
||||||
#include "qopenglfunctions_4_5_compatibility.h"
|
#include "qopenglfunctions_4_5_compatibility.h"
|
||||||
#include "qopenglfunctions_4_4_core.h"
|
#include "qopenglfunctions_4_4_core.h"
|
||||||
@ -84,7 +84,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
|
|
||||||
static QAbstractOpenGLFunctions *createFunctions(const QOpenGLVersionProfile &versionProfile)
|
static QAbstractOpenGLFunctions *createFunctions(const QOpenGLVersionProfile &versionProfile)
|
||||||
{
|
{
|
||||||
#if !defined(QT_OPENGL_ES_2)
|
#if !QT_CONFIG(opengles2)
|
||||||
const int major = versionProfile.version().first;
|
const int major = versionProfile.version().first;
|
||||||
const int minor = versionProfile.version().second;
|
const int minor = versionProfile.version().second;
|
||||||
|
|
||||||
@ -231,12 +231,12 @@ QAbstractOpenGLFunctions *QOpenGLVersionFunctionsFactory::get(const QOpenGLVersi
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef QT_OPENGL_ES_2
|
#if !QT_CONFIG(opengles2)
|
||||||
if (context->isOpenGLES()) {
|
if (context->isOpenGLES()) {
|
||||||
qWarning("versionFunctions: Not supported on OpenGL ES");
|
qWarning("versionFunctions: Not supported on OpenGL ES");
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
#endif // QT_OPENGL_ES_2
|
#endif // !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
const QSurfaceFormat f = context->format();
|
const QSurfaceFormat f = context->format();
|
||||||
|
|
||||||
|
@ -171,7 +171,7 @@ bool QOpenGLVertexArrayObjectPrivate::create()
|
|||||||
vaoFuncs.core_3_0 = nullptr;
|
vaoFuncs.core_3_0 = nullptr;
|
||||||
vaoFuncsType = NotSupported;
|
vaoFuncsType = NotSupported;
|
||||||
QSurfaceFormat format = ctx->format();
|
QSurfaceFormat format = ctx->format();
|
||||||
#ifndef QT_OPENGL_ES_2
|
#if !QT_CONFIG(opengles2)
|
||||||
if (format.version() >= qMakePair<int, int>(3,2)) {
|
if (format.version() >= qMakePair<int, int>(3,2)) {
|
||||||
vaoFuncs.core_3_2 = QOpenGLVersionFunctionsFactory::get<QOpenGLFunctions_3_2_Core>(ctx);
|
vaoFuncs.core_3_2 = QOpenGLVersionFunctionsFactory::get<QOpenGLFunctions_3_2_Core>(ctx);
|
||||||
vaoFuncsType = Core_3_2;
|
vaoFuncsType = Core_3_2;
|
||||||
@ -236,7 +236,7 @@ void QOpenGLVertexArrayObjectPrivate::destroy()
|
|||||||
|
|
||||||
if (vao && ctx) {
|
if (vao && ctx) {
|
||||||
switch (vaoFuncsType) {
|
switch (vaoFuncsType) {
|
||||||
#ifndef QT_OPENGL_ES_2
|
#if !QT_CONFIG(opengles2)
|
||||||
case Core_3_2:
|
case Core_3_2:
|
||||||
vaoFuncs.core_3_2->glDeleteVertexArrays(1, &vao);
|
vaoFuncs.core_3_2->glDeleteVertexArrays(1, &vao);
|
||||||
break;
|
break;
|
||||||
@ -273,7 +273,7 @@ void QOpenGLVertexArrayObjectPrivate::_q_contextAboutToBeDestroyed()
|
|||||||
void QOpenGLVertexArrayObjectPrivate::bind()
|
void QOpenGLVertexArrayObjectPrivate::bind()
|
||||||
{
|
{
|
||||||
switch (vaoFuncsType) {
|
switch (vaoFuncsType) {
|
||||||
#ifndef QT_OPENGL_ES_2
|
#if !QT_CONFIG(opengles2)
|
||||||
case Core_3_2:
|
case Core_3_2:
|
||||||
vaoFuncs.core_3_2->glBindVertexArray(vao);
|
vaoFuncs.core_3_2->glBindVertexArray(vao);
|
||||||
break;
|
break;
|
||||||
@ -294,7 +294,7 @@ void QOpenGLVertexArrayObjectPrivate::bind()
|
|||||||
void QOpenGLVertexArrayObjectPrivate::release()
|
void QOpenGLVertexArrayObjectPrivate::release()
|
||||||
{
|
{
|
||||||
switch (vaoFuncsType) {
|
switch (vaoFuncsType) {
|
||||||
#ifndef QT_OPENGL_ES_2
|
#if !QT_CONFIG(opengles2)
|
||||||
case Core_3_2:
|
case Core_3_2:
|
||||||
vaoFuncs.core_3_2->glBindVertexArray(0);
|
vaoFuncs.core_3_2->glBindVertexArray(0);
|
||||||
break;
|
break;
|
||||||
|
@ -87,7 +87,7 @@ bool QAbstractOpenGLExtension::isInitialized() const
|
|||||||
return d->initialized;
|
return d->initialized;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(QT_OPENGL_ES_2)
|
#if !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
QOpenGLExtension_3DFX_tbuffer::QOpenGLExtension_3DFX_tbuffer()
|
QOpenGLExtension_3DFX_tbuffer::QOpenGLExtension_3DFX_tbuffer()
|
||||||
: QAbstractOpenGLExtension(*(new QOpenGLExtension_3DFX_tbufferPrivate))
|
: QAbstractOpenGLExtension(*(new QOpenGLExtension_3DFX_tbufferPrivate))
|
||||||
|
@ -107,7 +107,7 @@ protected:
|
|||||||
QAbstractOpenGLExtensionPrivate *d_ptr;
|
QAbstractOpenGLExtensionPrivate *d_ptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
#if !defined(QT_OPENGL_ES_2)
|
#if !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
class QOpenGLExtension_3DFX_tbufferPrivate : public QAbstractOpenGLExtensionPrivate
|
class QOpenGLExtension_3DFX_tbufferPrivate : public QAbstractOpenGLExtensionPrivate
|
||||||
{
|
{
|
||||||
|
@ -466,7 +466,7 @@ QFunctionPointer QEGLPlatformContext::getProcAddress(const char *procName)
|
|||||||
const char *name;
|
const char *name;
|
||||||
QFunctionPointer func;
|
QFunctionPointer func;
|
||||||
} standardFuncs[] = {
|
} standardFuncs[] = {
|
||||||
#ifdef QT_OPENGL_ES_2
|
#if QT_CONFIG(opengles2)
|
||||||
{ "glBindTexture", (QFunctionPointer) ::glBindTexture },
|
{ "glBindTexture", (QFunctionPointer) ::glBindTexture },
|
||||||
{ "glBlendFunc", (QFunctionPointer) ::glBlendFunc },
|
{ "glBlendFunc", (QFunctionPointer) ::glBlendFunc },
|
||||||
{ "glClear", (QFunctionPointer) ::glClear },
|
{ "glClear", (QFunctionPointer) ::glClear },
|
||||||
@ -611,9 +611,9 @@ QFunctionPointer QEGLPlatformContext::getProcAddress(const char *procName)
|
|||||||
|
|
||||||
{ "glClearDepthf", (QFunctionPointer) ::glClearDepthf },
|
{ "glClearDepthf", (QFunctionPointer) ::glClearDepthf },
|
||||||
{ "glDepthRangef", (QFunctionPointer) ::glDepthRangef },
|
{ "glDepthRangef", (QFunctionPointer) ::glDepthRangef },
|
||||||
#endif // QT_OPENGL_ES_2
|
#endif // QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#ifdef QT_OPENGL_ES_3
|
#if QT_CONFIG(opengles3)
|
||||||
{ "glBeginQuery", (QFunctionPointer) ::glBeginQuery },
|
{ "glBeginQuery", (QFunctionPointer) ::glBeginQuery },
|
||||||
{ "glBeginTransformFeedback", (QFunctionPointer) ::glBeginTransformFeedback },
|
{ "glBeginTransformFeedback", (QFunctionPointer) ::glBeginTransformFeedback },
|
||||||
{ "glBindBufferBase", (QFunctionPointer) ::glBindBufferBase },
|
{ "glBindBufferBase", (QFunctionPointer) ::glBindBufferBase },
|
||||||
@ -718,9 +718,9 @@ QFunctionPointer QEGLPlatformContext::getProcAddress(const char *procName)
|
|||||||
{ "glVertexAttribI4uiv", (QFunctionPointer) ::glVertexAttribI4uiv },
|
{ "glVertexAttribI4uiv", (QFunctionPointer) ::glVertexAttribI4uiv },
|
||||||
{ "glVertexAttribIPointer", (QFunctionPointer) ::glVertexAttribIPointer },
|
{ "glVertexAttribIPointer", (QFunctionPointer) ::glVertexAttribIPointer },
|
||||||
{ "glWaitSync", (QFunctionPointer) ::glWaitSync },
|
{ "glWaitSync", (QFunctionPointer) ::glWaitSync },
|
||||||
#endif // QT_OPENGL_ES_3
|
#endif // QT_CONFIG(opengles3)
|
||||||
|
|
||||||
#ifdef QT_OPENGL_ES_3_1
|
#if QT_CONFIG(opengles31)
|
||||||
{ "glActiveShaderProgram", (QFunctionPointer) ::glActiveShaderProgram },
|
{ "glActiveShaderProgram", (QFunctionPointer) ::glActiveShaderProgram },
|
||||||
{ "glBindImageTexture", (QFunctionPointer) ::glBindImageTexture },
|
{ "glBindImageTexture", (QFunctionPointer) ::glBindImageTexture },
|
||||||
{ "glBindProgramPipeline", (QFunctionPointer) ::glBindProgramPipeline },
|
{ "glBindProgramPipeline", (QFunctionPointer) ::glBindProgramPipeline },
|
||||||
@ -789,9 +789,9 @@ QFunctionPointer QEGLPlatformContext::getProcAddress(const char *procName)
|
|||||||
{ "glVertexAttribFormat", (QFunctionPointer) ::glVertexAttribFormat },
|
{ "glVertexAttribFormat", (QFunctionPointer) ::glVertexAttribFormat },
|
||||||
{ "glVertexAttribIFormat", (QFunctionPointer) ::glVertexAttribIFormat },
|
{ "glVertexAttribIFormat", (QFunctionPointer) ::glVertexAttribIFormat },
|
||||||
{ "glVertexBindingDivisor", (QFunctionPointer) ::glVertexBindingDivisor },
|
{ "glVertexBindingDivisor", (QFunctionPointer) ::glVertexBindingDivisor },
|
||||||
#endif // QT_OPENGL_ES_3_1
|
#endif // QT_CONFIG(opengles31)
|
||||||
|
|
||||||
#ifdef QT_OPENGL_ES_3_2
|
#if QT_CONFIG(opengles32)
|
||||||
{ "glBlendBarrier", (QFunctionPointer) ::glBlendBarrier },
|
{ "glBlendBarrier", (QFunctionPointer) ::glBlendBarrier },
|
||||||
{ "glCopyImageSubData", (QFunctionPointer) ::glCopyImageSubData },
|
{ "glCopyImageSubData", (QFunctionPointer) ::glCopyImageSubData },
|
||||||
{ "glDebugMessageControl", (QFunctionPointer) ::glDebugMessageControl },
|
{ "glDebugMessageControl", (QFunctionPointer) ::glDebugMessageControl },
|
||||||
@ -836,7 +836,7 @@ QFunctionPointer QEGLPlatformContext::getProcAddress(const char *procName)
|
|||||||
{ "glTexBuffer", (QFunctionPointer) ::glTexBuffer },
|
{ "glTexBuffer", (QFunctionPointer) ::glTexBuffer },
|
||||||
{ "glTexBufferRange", (QFunctionPointer) ::glTexBufferRange },
|
{ "glTexBufferRange", (QFunctionPointer) ::glTexBufferRange },
|
||||||
{ "glTexStorage3DMultisample", (QFunctionPointer) ::glTexStorage3DMultisample },
|
{ "glTexStorage3DMultisample", (QFunctionPointer) ::glTexStorage3DMultisample },
|
||||||
#endif // QT_OPENGL_ES_3_2
|
#endif // QT_CONFIG(opengles32)
|
||||||
};
|
};
|
||||||
|
|
||||||
for (size_t i = 0; i < sizeof(standardFuncs) / sizeof(StdFunc); ++i) {
|
for (size_t i = 0; i < sizeof(standardFuncs) / sizeof(StdFunc); ++i) {
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
#include <QtCore/qdebug.h>
|
#include <QtCore/qdebug.h>
|
||||||
#include <QtGui/qopenglcontext.h>
|
#include <QtGui/qopenglcontext.h>
|
||||||
|
|
||||||
#if defined(QT_OPENGL_ES_2_ANGLE) || defined(QT_OPENGL_DYNAMIC)
|
#if QT_CONFIG(angle) || defined(QT_OPENGL_DYNAMIC)
|
||||||
# include <EGL/eglext.h>
|
# include <EGL/eglext.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -84,10 +84,10 @@
|
|||||||
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
#if defined(QT_OPENGL_ES_2) || defined(QT_OPENGL_DYNAMIC)
|
#if QT_CONFIG(opengles2) || defined(QT_OPENGL_DYNAMIC)
|
||||||
# include "qwindowseglcontext.h"
|
# include "qwindowseglcontext.h"
|
||||||
#endif
|
#endif
|
||||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
|
||||||
# include "qwindowsglcontext.h"
|
# include "qwindowsglcontext.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -455,7 +455,7 @@ QWindowsStaticOpenGLContext *QWindowsStaticOpenGLContext::doCreate()
|
|||||||
return eglCtx;
|
return eglCtx;
|
||||||
}
|
}
|
||||||
return QOpenGLStaticContext::create(true);
|
return QOpenGLStaticContext::create(true);
|
||||||
#elif defined(QT_OPENGL_ES_2)
|
#elif QT_CONFIG(opengles2)
|
||||||
QWindowsOpenGLTester::Renderers glesRenderers = QWindowsOpenGLTester::requestedGlesRenderer();
|
QWindowsOpenGLTester::Renderers glesRenderers = QWindowsOpenGLTester::requestedGlesRenderer();
|
||||||
if (glesRenderers == QWindowsOpenGLTester::InvalidRenderer)
|
if (glesRenderers == QWindowsOpenGLTester::InvalidRenderer)
|
||||||
glesRenderers = QWindowsOpenGLTester::supportedRenderers(QWindowsOpenGLTester::AngleRendererD3d11);
|
glesRenderers = QWindowsOpenGLTester::supportedRenderers(QWindowsOpenGLTester::AngleRendererD3d11);
|
||||||
@ -483,7 +483,7 @@ QPlatformOpenGLContext *QWindowsIntegration::createPlatformOpenGLContext(QOpenGL
|
|||||||
|
|
||||||
QOpenGLContext::OpenGLModuleType QWindowsIntegration::openGLModuleType()
|
QOpenGLContext::OpenGLModuleType QWindowsIntegration::openGLModuleType()
|
||||||
{
|
{
|
||||||
#if defined(QT_OPENGL_ES_2)
|
#if QT_CONFIG(opengles2)
|
||||||
return QOpenGLContext::LibGLES;
|
return QOpenGLContext::LibGLES;
|
||||||
#elif !defined(QT_OPENGL_DYNAMIC)
|
#elif !defined(QT_OPENGL_DYNAMIC)
|
||||||
return QOpenGLContext::LibGL;
|
return QOpenGLContext::LibGL;
|
||||||
|
@ -241,7 +241,7 @@ QGLXContext::QGLXContext(QXcbScreen *screen, const QSurfaceFormat &format, QPlat
|
|||||||
void QGLXContext::init(QXcbScreen *screen, QPlatformOpenGLContext *share)
|
void QGLXContext::init(QXcbScreen *screen, QPlatformOpenGLContext *share)
|
||||||
{
|
{
|
||||||
if (m_format.renderableType() == QSurfaceFormat::DefaultRenderableType)
|
if (m_format.renderableType() == QSurfaceFormat::DefaultRenderableType)
|
||||||
#if defined(QT_OPENGL_ES_2)
|
#if QT_CONFIG(opengles2)
|
||||||
m_format.setRenderableType(QSurfaceFormat::OpenGLES);
|
m_format.setRenderableType(QSurfaceFormat::OpenGLES);
|
||||||
#else
|
#else
|
||||||
m_format.setRenderableType(QSurfaceFormat::OpenGL);
|
m_format.setRenderableType(QSurfaceFormat::OpenGL);
|
||||||
|
@ -10447,7 +10447,7 @@ void QWidget::setParent(QWidget *parent, Qt::WindowFlags f)
|
|||||||
// (f & Qt::MSWindowsOwnDC) clause (which is set on QGLWidgets on all
|
// (f & Qt::MSWindowsOwnDC) clause (which is set on QGLWidgets on all
|
||||||
// platforms).
|
// platforms).
|
||||||
if (newParent
|
if (newParent
|
||||||
#if defined(QT_OPENGL_ES)
|
#if QT_CONFIG(opengles2)
|
||||||
|| (f & Qt::MSWindowsOwnDC)
|
|| (f & Qt::MSWindowsOwnDC)
|
||||||
#endif
|
#endif
|
||||||
) {
|
) {
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
#if defined(QT_OPENGL_ES_2)
|
#if QT_CONFIG(opengles2)
|
||||||
QOpenGLExtension_OES_vertex_array_object obj;
|
QOpenGLExtension_OES_vertex_array_object obj;
|
||||||
#else
|
#else
|
||||||
QOpenGLExtension_ARB_draw_buffers obj;
|
QOpenGLExtension_ARB_draw_buffers obj;
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
#include <QtPlatformHeaders/QGLXNativeContext>
|
#include <QtPlatformHeaders/QGLXNativeContext>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(Q_OS_WIN32) && !defined(QT_OPENGL_ES_2)
|
#if defined(Q_OS_WIN32) && !QT_CONFIG(opengles2)
|
||||||
#include <QtPlatformHeaders/QWGLNativeContext>
|
#include <QtPlatformHeaders/QWGLNativeContext>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -107,7 +107,7 @@ private slots:
|
|||||||
void glxContextWrap();
|
void glxContextWrap();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(Q_OS_WIN32) && !defined(QT_OPENGL_ES_2)
|
#if defined(Q_OS_WIN32) && !QT_CONFIG(opengles2)
|
||||||
void wglContextWrap();
|
void wglContextWrap();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -633,7 +633,7 @@ static bool supportsInternalFboFormat(QOpenGLContext *ctx, int glFormat)
|
|||||||
{
|
{
|
||||||
if (ctx->format().majorVersion() < 3)
|
if (ctx->format().majorVersion() < 3)
|
||||||
return false;
|
return false;
|
||||||
#ifndef QT_OPENGL_ES_2
|
#if !QT_CONFIG(opengles2)
|
||||||
if (!ctx->isOpenGLES() && ctx->format().majorVersion() >= 4) {
|
if (!ctx->isOpenGLES() && ctx->format().majorVersion() >= 4) {
|
||||||
GLint value = -1;
|
GLint value = -1;
|
||||||
auto *vFuncs = QOpenGLVersionFunctionsFactory::get<QOpenGLFunctions_4_2_Core>(ctx);
|
auto *vFuncs = QOpenGLVersionFunctionsFactory::get<QOpenGLFunctions_4_2_Core>(ctx);
|
||||||
@ -1519,7 +1519,7 @@ void tst_QOpenGL::glxContextWrap()
|
|||||||
}
|
}
|
||||||
#endif // USE_GLX
|
#endif // USE_GLX
|
||||||
|
|
||||||
#if defined(Q_OS_WIN32) && !defined(QT_OPENGL_ES_2)
|
#if defined(Q_OS_WIN32) && !QT_CONFIG(opengles2)
|
||||||
void tst_QOpenGL::wglContextWrap()
|
void tst_QOpenGL::wglContextWrap()
|
||||||
{
|
{
|
||||||
QScopedPointer<QOpenGLContext> ctx(new QOpenGLContext);
|
QScopedPointer<QOpenGLContext> ctx(new QOpenGLContext);
|
||||||
@ -1572,7 +1572,7 @@ void tst_QOpenGL::wglContextWrap()
|
|||||||
QVERIFY(adopted->makeCurrent(window.data()));
|
QVERIFY(adopted->makeCurrent(window.data()));
|
||||||
adopted->doneCurrent();
|
adopted->doneCurrent();
|
||||||
}
|
}
|
||||||
#endif // Q_OS_WIN32 && !QT_OPENGL_ES_2
|
#endif // Q_OS_WIN32 && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
void tst_QOpenGL::vaoCreate()
|
void tst_QOpenGL::vaoCreate()
|
||||||
{
|
{
|
||||||
|
@ -747,14 +747,14 @@ void tst_QGL::openGLVersionCheck()
|
|||||||
// However, the complicated parts are in openGLVersionFlags(const QString &versionString)
|
// However, the complicated parts are in openGLVersionFlags(const QString &versionString)
|
||||||
// tested above
|
// tested above
|
||||||
|
|
||||||
#if defined(QT_OPENGL_ES_2)
|
#if QT_CONFIG(opengles2)
|
||||||
QVERIFY(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_ES_Version_2_0);
|
QVERIFY(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_ES_Version_2_0);
|
||||||
#else
|
#else
|
||||||
if (QOpenGLContext::currentContext()->isOpenGLES())
|
if (QOpenGLContext::currentContext()->isOpenGLES())
|
||||||
QVERIFY(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_ES_Version_2_0);
|
QVERIFY(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_ES_Version_2_0);
|
||||||
else
|
else
|
||||||
QVERIFY(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_Version_1_1);
|
QVERIFY(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_Version_1_1);
|
||||||
#endif //defined(QT_OPENGL_ES_2)
|
#endif //QT_CONFIG(opengles2)
|
||||||
}
|
}
|
||||||
#endif //QT_BUILD_INTERNAL
|
#endif //QT_BUILD_INTERNAL
|
||||||
|
|
||||||
@ -1639,7 +1639,7 @@ void tst_QGL::fboFormat()
|
|||||||
QCOMPARE(format1.attachment(), QGLFramebufferObject::NoAttachment);
|
QCOMPARE(format1.attachment(), QGLFramebufferObject::NoAttachment);
|
||||||
QCOMPARE(int(format1.textureTarget()), int(GL_TEXTURE_2D));
|
QCOMPARE(int(format1.textureTarget()), int(GL_TEXTURE_2D));
|
||||||
int expectedFormat =
|
int expectedFormat =
|
||||||
#ifdef QT_OPENGL_ES_2
|
#if QT_CONFIG(opengles2)
|
||||||
GL_RGBA;
|
GL_RGBA;
|
||||||
#else
|
#else
|
||||||
QOpenGLContext::openGLModuleType() != QOpenGLContext::LibGL ? GL_RGBA : GL_RGBA8;
|
QOpenGLContext::openGLModuleType() != QOpenGLContext::LibGL ? GL_RGBA : GL_RGBA8;
|
||||||
@ -1716,7 +1716,7 @@ void tst_QGL::fboFormat()
|
|||||||
QCOMPARE(format1c, format3c);
|
QCOMPARE(format1c, format3c);
|
||||||
QVERIFY(!(format1c != format3c));
|
QVERIFY(!(format1c != format3c));
|
||||||
format3c.setInternalTextureFormat(
|
format3c.setInternalTextureFormat(
|
||||||
#ifdef QT_OPENGL_ES_2
|
#if QT_CONFIG(opengles2)
|
||||||
GL_RGBA
|
GL_RGBA
|
||||||
#else
|
#else
|
||||||
QOpenGLContext::openGLModuleType() != QOpenGLContext::LibGL ? GL_RGBA : GL_RGBA8
|
QOpenGLContext::openGLModuleType() != QOpenGLContext::LibGL ? GL_RGBA : GL_RGBA8
|
||||||
@ -1729,7 +1729,7 @@ void tst_QGL::fboFormat()
|
|||||||
QCOMPARE(format1c, format4c);
|
QCOMPARE(format1c, format4c);
|
||||||
QVERIFY(!(format1c != format4c));
|
QVERIFY(!(format1c != format4c));
|
||||||
format4c.setInternalTextureFormat(
|
format4c.setInternalTextureFormat(
|
||||||
#ifdef QT_OPENGL_ES_2
|
#if QT_CONFIG(opengles2)
|
||||||
GL_RGBA
|
GL_RGBA
|
||||||
#else
|
#else
|
||||||
QOpenGLContext::openGLModuleType() != QOpenGLContext::LibGL ? GL_RGBA : GL_RGBA8
|
QOpenGLContext::openGLModuleType() != QOpenGLContext::LibGL ? GL_RGBA : GL_RGBA8
|
||||||
|
@ -187,7 +187,7 @@ void CodeGenerator::writeCoreFactoryImplementation(const QString &fileName) cons
|
|||||||
std::sort(versions.begin(), versions.end(), std::greater<Version>());
|
std::sort(versions.begin(), versions.end(), std::greater<Version>());
|
||||||
|
|
||||||
// Outout the #include statements
|
// Outout the #include statements
|
||||||
stream << QStringLiteral("#if !defined(QT_OPENGL_ES_2)") << Qt::endl;
|
stream << QStringLiteral("#if !QT_CONFIG(opengles2)") << Qt::endl;
|
||||||
Q_FOREACH (const Version &classVersion, versions) {
|
Q_FOREACH (const Version &classVersion, versions) {
|
||||||
if (!versionHasProfiles(classVersion)) {
|
if (!versionHasProfiles(classVersion)) {
|
||||||
stream << QString(QStringLiteral("#include \"qopenglfunctions_%1_%2.h\""))
|
stream << QString(QStringLiteral("#include \"qopenglfunctions_%1_%2.h\""))
|
||||||
@ -217,7 +217,7 @@ void CodeGenerator::writeCoreFactoryImplementation(const QString &fileName) cons
|
|||||||
stream << QStringLiteral("QT_BEGIN_NAMESPACE") << Qt::endl << Qt::endl;
|
stream << QStringLiteral("QT_BEGIN_NAMESPACE") << Qt::endl << Qt::endl;
|
||||||
stream << QStringLiteral("QAbstractOpenGLFunctions *QOpenGLVersionFunctionsFactory::create(const QOpenGLVersionProfile &versionProfile)") << Qt::endl;
|
stream << QStringLiteral("QAbstractOpenGLFunctions *QOpenGLVersionFunctionsFactory::create(const QOpenGLVersionProfile &versionProfile)") << Qt::endl;
|
||||||
stream << QStringLiteral("{") << Qt::endl;
|
stream << QStringLiteral("{") << Qt::endl;
|
||||||
stream << QStringLiteral("#if !defined(QT_OPENGL_ES_2)") << Qt::endl;
|
stream << QStringLiteral("#if !QT_CONFIG(opengles2)") << Qt::endl;
|
||||||
stream << QStringLiteral(" const int major = versionProfile.version().first;") << Qt::endl;
|
stream << QStringLiteral(" const int major = versionProfile.version().first;") << Qt::endl;
|
||||||
stream << QStringLiteral(" const int minor = versionProfile.version().second;") << Qt::endl << Qt::endl;
|
stream << QStringLiteral(" const int minor = versionProfile.version().second;") << Qt::endl << Qt::endl;
|
||||||
|
|
||||||
|
@ -81,5 +81,4 @@ bool QAbstractOpenGLExtension::isInitialized() const
|
|||||||
return d->initialized;
|
return d->initialized;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(QT_OPENGL_ES_2)
|
#if !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
|
@ -101,5 +101,4 @@ protected:
|
|||||||
QAbstractOpenGLExtensionPrivate *d_ptr;
|
QAbstractOpenGLExtensionPrivate *d_ptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
#if !defined(QT_OPENGL_ES_2)
|
#if !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
|
|
||||||
// No backends for OpenGL ES 2
|
// No backends for OpenGL ES 2
|
||||||
|
|
||||||
#endif // !QT_OPENGL_ES_2
|
#endif // !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
@ -203,5 +203,5 @@ QOpenGLContext *QAbstractOpenGLFunctions::owningContext() const
|
|||||||
return d->owningContext;
|
return d->owningContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(QT_OPENGL_ES_2)
|
#if !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
// No need for backend classes with function pointers with ES2.
|
// No need for backend classes with function pointers with ES2.
|
||||||
// All function addresses are independent of context and display.
|
// All function addresses are independent of context and display.
|
||||||
|
|
||||||
#endif // !QT_OPENGL_ES_2
|
#endif // !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
@ -147,5 +147,5 @@ protected:
|
|||||||
friend class QOpenGLContext;
|
friend class QOpenGLContext;
|
||||||
};
|
};
|
||||||
|
|
||||||
#if !defined(QT_OPENGL_ES_2)
|
#if !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
#include <QtCore/qglobal.h>
|
#include <QtCore/qglobal.h>
|
||||||
|
|
||||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
|
||||||
|
|
||||||
#include <QtGui/QOpenGLVersionFunctions>
|
#include <QtGui/QOpenGLVersionFunctions>
|
||||||
#include <QtGui/qopenglcontext.h>
|
#include <QtGui/qopenglcontext.h>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user