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
|
||||
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
|
||||
LABEL "D3D11_QUERY_DATA_TIMESTAMP_DISJOINT"
|
||||
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'
|
||||
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("opengles3" PUBLIC
|
||||
LABEL "OpenGL ES 3.0"
|
||||
CONDITION QT_FEATURE_opengles2 AND NOT QT_FEATURE_angle AND TEST_opengles3
|
||||
)
|
||||
qt_feature_definition("opengles3" "QT_OPENGL_ES_3")
|
||||
qt_feature("opengles31" PUBLIC
|
||||
LABEL "OpenGL ES 3.1"
|
||||
CONDITION QT_FEATURE_opengles3 AND TEST_opengles31
|
||||
)
|
||||
qt_feature_definition("opengles31" "QT_OPENGL_ES_3_1")
|
||||
qt_feature("opengles32" PUBLIC
|
||||
LABEL "OpenGL ES 3.2"
|
||||
CONDITION QT_FEATURE_opengles31 AND TEST_opengles32
|
||||
)
|
||||
qt_feature_definition("opengles32" "QT_OPENGL_ES_3_2")
|
||||
qt_feature("opengl-desktop"
|
||||
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 )
|
||||
|
@ -1115,7 +1115,6 @@
|
||||
"condition": "!features.opengl-desktop && features.dxguid && tests.fxc && (features.direct3d9 || (config.winrt && features.direct3d11 && libs.d3dcompiler))",
|
||||
"output": [
|
||||
"publicFeature",
|
||||
{ "type": "define", "name": "QT_OPENGL_ES_2_ANGLE" },
|
||||
{ "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)",
|
||||
"output": [
|
||||
"publicFeature",
|
||||
"publicQtConfig",
|
||||
{ "type": "define", "name": "QT_OPENGL_ES" },
|
||||
{ "type": "define", "name": "QT_OPENGL_ES_2" }
|
||||
"publicQtConfig"
|
||||
]
|
||||
},
|
||||
"opengles3": {
|
||||
"label": "OpenGL ES 3.0",
|
||||
"condition": "features.opengles2 && !features.angle && tests.opengles3",
|
||||
"output": [
|
||||
"publicFeature",
|
||||
{ "type": "define", "name": "QT_OPENGL_ES_3" }
|
||||
"publicFeature"
|
||||
]
|
||||
},
|
||||
"opengles31": {
|
||||
"label": "OpenGL ES 3.1",
|
||||
"condition": "features.opengles3 && tests.opengles31",
|
||||
"output": [
|
||||
"publicFeature",
|
||||
{ "type": "define", "name": "QT_OPENGL_ES_3_1" }
|
||||
"publicFeature"
|
||||
]
|
||||
},
|
||||
"opengles32": {
|
||||
"label": "OpenGL ES 3.2",
|
||||
"condition": "features.opengles31 && tests.opengles32",
|
||||
"output": [
|
||||
"publicFeature",
|
||||
{ "type": "define", "name": "QT_OPENGL_ES_3_2" }
|
||||
"publicFeature"
|
||||
]
|
||||
},
|
||||
"opengl-desktop": {
|
||||
|
@ -206,7 +206,7 @@ int QOpenGLContextPrivate::maxTextureSize()
|
||||
QOpenGLFunctions *funcs = q->functions();
|
||||
funcs->glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_texture_size);
|
||||
|
||||
#ifndef QT_OPENGL_ES
|
||||
#if !QT_CONFIG(opengles2)
|
||||
if (!q->isOpenGLES()) {
|
||||
GLenum proxy = GL_PROXY_TEXTURE_2D;
|
||||
|
||||
@ -232,7 +232,7 @@ int QOpenGLContextPrivate::maxTextureSize()
|
||||
|
||||
max_texture_size = size;
|
||||
}
|
||||
#endif // QT_OPENGL_ES
|
||||
#endif // QT_CONFIG(opengles2)
|
||||
|
||||
return max_texture_size;
|
||||
}
|
||||
@ -957,7 +957,7 @@ QOpenGLContext::OpenGLModuleType QOpenGLContext::openGLModuleType()
|
||||
#if defined(QT_OPENGL_DYNAMIC)
|
||||
Q_ASSERT(qGuiApp);
|
||||
return QGuiApplicationPrivate::instance()->platformIntegration()->openGLModuleType();
|
||||
#elif defined(QT_OPENGL_ES_2)
|
||||
#elif QT_CONFIG(opengles2)
|
||||
return LibGLES;
|
||||
#else
|
||||
return LibGL;
|
||||
|
@ -213,7 +213,7 @@ bool QPlatformGraphicsBufferHelper::bindSWToTexture(const QPlatformGraphicsBuffe
|
||||
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());
|
||||
} else {
|
||||
#ifndef QT_OPENGL_ES_2
|
||||
#if !QT_CONFIG(opengles2)
|
||||
if (!ctx->isOpenGLES()) {
|
||||
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,
|
||||
|
@ -63,9 +63,9 @@
|
||||
// access to additional functionality the drivers may expose but
|
||||
// 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(QT_OPENGL_ES_3)
|
||||
# if QT_CONFIG(opengles3)
|
||||
# include <OpenGLES/ES3/gl.h>
|
||||
# include <OpenGLES/ES3/glext.h>
|
||||
# else
|
||||
@ -83,7 +83,7 @@ typedef void* GLeglImageOES;
|
||||
|
||||
# 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
|
||||
// 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
|
||||
@ -101,11 +101,11 @@ typedef void* GLeglImageOES;
|
||||
# define QGL_TEMP_GLEXT_PROTO
|
||||
# endif
|
||||
|
||||
# if defined(QT_OPENGL_ES_3_2)
|
||||
# if QT_CONFIG(opengles32)
|
||||
# include <GLES3/gl32.h>
|
||||
# elif defined(QT_OPENGL_ES_3_1)
|
||||
# elif QT_CONFIG(opengles31)
|
||||
# include <GLES3/gl31.h>
|
||||
# elif defined(QT_OPENGL_ES_3)
|
||||
# elif QT_CONFIG(opengles3)
|
||||
# include <GLES3/gl3.h>
|
||||
# else
|
||||
# include <GLES2/gl2.h>
|
||||
@ -145,10 +145,10 @@ typedef char GLchar;
|
||||
# endif
|
||||
# include <QtGui/qopenglext.h>
|
||||
# endif // Q_OS_MAC
|
||||
#endif // QT_OPENGL_ES_2
|
||||
#endif // !QT_CONFIG(opengles2)
|
||||
|
||||
// Desktops can support OpenGL 4.
|
||||
#if !defined(QT_OPENGL_ES_2)
|
||||
#if !QT_CONFIG(opengles2)
|
||||
#define QT_OPENGL_3
|
||||
#define QT_OPENGL_3_2
|
||||
#define QT_OPENGL_4
|
||||
@ -162,7 +162,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
// When all else fails we provide sensible fallbacks - this is needed to
|
||||
// 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.7 and later defien them in gl3.h
|
||||
|
@ -53,7 +53,7 @@
|
||||
#endif
|
||||
|
||||
// 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);
|
||||
#endif
|
||||
|
||||
|
@ -2129,7 +2129,7 @@ Func resolve(QOpenGLContext *context, const char *name, Func)
|
||||
#define RESOLVE(name) \
|
||||
resolve(context, "gl"#name, name)
|
||||
|
||||
#ifndef QT_OPENGL_ES_2
|
||||
#if !QT_CONFIG(opengles2)
|
||||
|
||||
// some fallback functions
|
||||
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)
|
||||
{
|
||||
init(c);
|
||||
|
||||
#ifndef QT_OPENGL_ES_2
|
||||
#if !QT_CONFIG(opengles2)
|
||||
// setup fallbacks in case some methods couldn't get resolved
|
||||
bool es = QOpenGLContext::currentContext()->isOpenGLES();
|
||||
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)
|
||||
break;
|
||||
}
|
||||
#if defined(QT_OPENGL_ES_2)
|
||||
#if QT_CONFIG(opengles2)
|
||||
if (context->isOpenGLES() && context->format().majorVersion() < 3) {
|
||||
initializeProgramBinaryOES(context);
|
||||
programBinaryOES(programId, blobFormat, p, blobSize);
|
||||
@ -412,7 +412,7 @@ void QOpenGLProgramBinaryCache::save(const QByteArray &cacheKey, uint programId)
|
||||
*p++ = 0;
|
||||
|
||||
GLint outSize = 0;
|
||||
#if defined(QT_OPENGL_ES_2)
|
||||
#if QT_CONFIG(opengles2)
|
||||
if (context->isOpenGLES() && context->format().majorVersion() < 3) {
|
||||
QMutexLocker lock(&m_mutex);
|
||||
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)
|
||||
{
|
||||
if (m_programBinaryOESInitialized)
|
||||
|
@ -103,7 +103,7 @@ private:
|
||||
uint format;
|
||||
};
|
||||
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 getProgramBinaryOES)(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
|
||||
void initializeProgramBinaryOES(QOpenGLContext *context);
|
||||
|
@ -341,7 +341,7 @@ void QOpenGLBuffer::destroy()
|
||||
*/
|
||||
bool QOpenGLBuffer::read(int offset, void *data, int count)
|
||||
{
|
||||
#if !defined(QT_OPENGL_ES)
|
||||
#if !QT_CONFIG(opengles2)
|
||||
Q_D(QOpenGLBuffer);
|
||||
if (!d->funcs->hasOpenGLFeature(QOpenGLFunctions::Buffers) || !d->guard->id())
|
||||
return false;
|
||||
|
@ -748,7 +748,7 @@ void QOpenGLFramebufferObjectPrivate::initDepthStencilAttachments(QOpenGLContext
|
||||
funcs.glBindRenderbuffer(GL_RENDERBUFFER, stencil_buffer);
|
||||
Q_ASSERT(funcs.glIsRenderbuffer(stencil_buffer));
|
||||
|
||||
#ifdef QT_OPENGL_ES
|
||||
#if QT_CONFIG(opengles2)
|
||||
GLenum storage = GL_STENCIL_INDEX8;
|
||||
#else
|
||||
GLenum storage = ctx->isOpenGLES() ? GL_STENCIL_INDEX8 : GL_STENCIL_INDEX;
|
||||
@ -875,7 +875,7 @@ void QOpenGLFramebufferObjectPrivate::initDepthStencilAttachments(QOpenGLContext
|
||||
static inline GLenum effectiveInternalFormat(GLenum internalFormat)
|
||||
{
|
||||
if (!internalFormat)
|
||||
#ifdef QT_OPENGL_ES_2
|
||||
#if QT_CONFIG(opengles2)
|
||||
internalFormat = GL_RGBA;
|
||||
#else
|
||||
internalFormat = QOpenGLContext::currentContext()->isOpenGLES() ? GL_RGBA : GL_RGBA8;
|
||||
|
@ -67,7 +67,7 @@ public:
|
||||
target(GL_TEXTURE_2D),
|
||||
mipmap(false)
|
||||
{
|
||||
#ifndef QT_OPENGL_ES_2
|
||||
#if !QT_CONFIG(opengles2)
|
||||
// There is nothing that says QOpenGLFramebufferObjectFormat needs a current
|
||||
// context, so we need a fallback just to be safe, even though in pratice there
|
||||
// will usually be a context current.
|
||||
|
@ -52,7 +52,7 @@
|
||||
|
||||
#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/QOpenGLVersionFunctions>
|
||||
@ -1925,6 +1925,6 @@ inline void QOpenGLFunctions_1_0::glNewList(GLuint list, GLenum mode)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
||||
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||
|
||||
#endif
|
||||
|
@ -52,7 +52,7 @@
|
||||
|
||||
#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/QOpenGLVersionFunctions>
|
||||
@ -2115,6 +2115,6 @@ inline void QOpenGLFunctions_1_1::glArrayElement(GLint i)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
||||
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||
|
||||
#endif
|
||||
|
@ -52,7 +52,7 @@
|
||||
|
||||
#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/QOpenGLVersionFunctions>
|
||||
@ -2354,6 +2354,6 @@ inline void QOpenGLFunctions_1_2::glColorTable(GLenum target, GLenum internalfor
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
||||
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||
|
||||
#endif
|
||||
|
@ -52,7 +52,7 @@
|
||||
|
||||
#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/QOpenGLVersionFunctions>
|
||||
@ -2639,6 +2639,6 @@ inline void QOpenGLFunctions_1_3::glClientActiveTexture(GLenum texture)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
||||
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||
|
||||
#endif
|
||||
|
@ -52,7 +52,7 @@
|
||||
|
||||
#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/QOpenGLVersionFunctions>
|
||||
@ -2919,6 +2919,6 @@ inline void QOpenGLFunctions_1_4::glFogCoordf(GLfloat coord)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
||||
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||
|
||||
#endif
|
||||
|
@ -52,7 +52,7 @@
|
||||
|
||||
#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/QOpenGLVersionFunctions>
|
||||
@ -3042,6 +3042,6 @@ inline void QOpenGLFunctions_1_5::glFogCoordf(GLfloat coord)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
||||
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||
|
||||
#endif
|
||||
|
@ -52,7 +52,7 @@
|
||||
|
||||
#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/QOpenGLVersionFunctions>
|
||||
@ -3610,6 +3610,6 @@ inline void QOpenGLFunctions_2_0::glVertexAttrib1d(GLuint index, GLdouble x)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
||||
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||
|
||||
#endif
|
||||
|
@ -52,7 +52,7 @@
|
||||
|
||||
#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/QOpenGLVersionFunctions>
|
||||
@ -3655,6 +3655,6 @@ inline void QOpenGLFunctions_2_1::glVertexAttrib1d(GLuint index, GLdouble x)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
||||
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||
|
||||
#endif
|
||||
|
@ -52,7 +52,7 @@
|
||||
|
||||
#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/QOpenGLVersionFunctions>
|
||||
@ -4169,6 +4169,6 @@ inline void QOpenGLFunctions_3_0::glVertexAttribI1i(GLuint index, GLint x)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
||||
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||
|
||||
#endif
|
||||
|
@ -52,7 +52,7 @@
|
||||
|
||||
#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/QOpenGLVersionFunctions>
|
||||
@ -1597,6 +1597,6 @@ inline void QOpenGLFunctions_3_1::glDrawArraysInstanced(GLenum mode, GLint first
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
||||
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||
|
||||
#endif
|
||||
|
@ -52,7 +52,7 @@
|
||||
|
||||
#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/QOpenGLVersionFunctions>
|
||||
@ -4373,6 +4373,6 @@ inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttribI1i(GLuint index,
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
||||
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||
|
||||
#endif
|
||||
|
@ -52,7 +52,7 @@
|
||||
|
||||
#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/QOpenGLVersionFunctions>
|
||||
@ -1716,6 +1716,6 @@ inline void QOpenGLFunctions_3_2_Core::glGetInteger64i_v(GLenum target, GLuint i
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
||||
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||
|
||||
#endif
|
||||
|
@ -52,7 +52,7 @@
|
||||
|
||||
#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/QOpenGLVersionFunctions>
|
||||
@ -4730,6 +4730,6 @@ inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttribI1i(GLuint index,
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
||||
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||
|
||||
#endif
|
||||
|
@ -52,7 +52,7 @@
|
||||
|
||||
#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/QOpenGLVersionFunctions>
|
||||
@ -2137,6 +2137,6 @@ inline void QOpenGLFunctions_3_3_Core::glVertexAttribDivisor(GLuint index, GLuin
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
||||
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||
|
||||
#endif
|
||||
|
@ -52,7 +52,7 @@
|
||||
|
||||
#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/QOpenGLVersionFunctions>
|
||||
@ -5015,6 +5015,6 @@ inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttribI1i(GLuint index,
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
||||
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||
|
||||
#endif
|
||||
|
@ -52,7 +52,7 @@
|
||||
|
||||
#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/QOpenGLVersionFunctions>
|
||||
@ -2418,6 +2418,6 @@ inline void QOpenGLFunctions_4_0_Core::glMinSampleShading(GLfloat value)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
||||
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||
|
||||
#endif
|
||||
|
@ -52,7 +52,7 @@
|
||||
|
||||
#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/QOpenGLVersionFunctions>
|
||||
@ -5552,6 +5552,6 @@ inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttribI1i(GLuint index,
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
||||
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||
|
||||
#endif
|
||||
|
@ -52,7 +52,7 @@
|
||||
|
||||
#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/QOpenGLVersionFunctions>
|
||||
@ -2951,6 +2951,6 @@ inline void QOpenGLFunctions_4_1_Core::glReleaseShaderCompiler()
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
||||
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||
|
||||
#endif
|
||||
|
@ -52,7 +52,7 @@
|
||||
|
||||
#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/QOpenGLVersionFunctions>
|
||||
@ -5643,6 +5643,6 @@ QT_END_NAMESPACE
|
||||
#pragma pop_macro("MemoryBarrier")
|
||||
#endif
|
||||
|
||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
||||
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||
|
||||
#endif
|
||||
|
@ -52,7 +52,7 @@
|
||||
|
||||
#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/QOpenGLVersionFunctions>
|
||||
@ -3038,6 +3038,6 @@ QT_END_NAMESPACE
|
||||
#pragma pop_macro("MemoryBarrier")
|
||||
#endif
|
||||
|
||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
||||
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||
|
||||
#endif
|
||||
|
@ -52,7 +52,7 @@
|
||||
|
||||
#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/QOpenGLVersionFunctions>
|
||||
@ -5850,6 +5850,6 @@ QT_END_NAMESPACE
|
||||
#pragma pop_macro("MemoryBarrier")
|
||||
#endif
|
||||
|
||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
||||
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||
|
||||
#endif
|
||||
|
@ -52,7 +52,7 @@
|
||||
|
||||
#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/QOpenGLVersionFunctions>
|
||||
@ -3242,6 +3242,6 @@ QT_END_NAMESPACE
|
||||
#pragma pop_macro("MemoryBarrier")
|
||||
#endif
|
||||
|
||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
||||
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||
|
||||
#endif
|
||||
|
@ -52,7 +52,7 @@
|
||||
|
||||
#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/QOpenGLVersionFunctions>
|
||||
@ -5972,6 +5972,6 @@ QT_END_NAMESPACE
|
||||
#pragma pop_macro("MemoryBarrier")
|
||||
#endif
|
||||
|
||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
||||
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||
|
||||
#endif
|
||||
|
@ -52,7 +52,7 @@
|
||||
|
||||
#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/QOpenGLVersionFunctions>
|
||||
@ -3426,6 +3426,6 @@ QT_END_NAMESPACE
|
||||
#pragma pop_macro("MemoryBarrier")
|
||||
#endif
|
||||
|
||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
||||
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||
|
||||
#endif
|
||||
|
@ -52,7 +52,7 @@
|
||||
|
||||
#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/QOpenGLVersionFunctions>
|
||||
@ -6690,6 +6690,6 @@ QT_END_NAMESPACE
|
||||
#pragma pop_macro("MemoryBarrier")
|
||||
#endif
|
||||
|
||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
||||
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||
|
||||
#endif
|
||||
|
@ -52,7 +52,7 @@
|
||||
|
||||
#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/QOpenGLVersionFunctions>
|
||||
@ -4068,6 +4068,6 @@ QT_END_NAMESPACE
|
||||
#endif
|
||||
|
||||
|
||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
||||
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||
|
||||
#endif
|
||||
|
@ -42,7 +42,7 @@
|
||||
|
||||
#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/QOpenGLVersionFunctions>
|
||||
@ -927,6 +927,6 @@ inline void QOpenGLFunctions_ES2::glViewport(GLint x, GLint y, GLsizei width, GL
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_OPENGL_ES_2
|
||||
#endif // QT_CONFIG(opengles2)
|
||||
|
||||
#endif
|
||||
|
@ -682,7 +682,7 @@ void QOpenGL2PaintEngineEx::beginNativePainting()
|
||||
for (int i = 0; i < QT_GL_VERTEX_ARRAY_TRACKED_COUNT; ++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());
|
||||
const QOpenGLContext *ctx = d->ctx;
|
||||
const QSurfaceFormat &fmt = d->device->context()->format();
|
||||
@ -712,7 +712,7 @@ void QOpenGL2PaintEngineEx::beginNativePainting()
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glLoadMatrixf(&mv_matrix[0][0]);
|
||||
}
|
||||
#endif // QT_OPENGL_ES_2
|
||||
#endif // !QT_CONFIG(opengles2)
|
||||
|
||||
d->resetGLState();
|
||||
|
||||
@ -1472,7 +1472,7 @@ void QOpenGL2PaintEngineEx::renderHintsChanged()
|
||||
{
|
||||
state()->renderHintsChanged = true;
|
||||
|
||||
#ifndef QT_OPENGL_ES_2
|
||||
#if !QT_CONFIG(opengles2)
|
||||
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
|
||||
Q_D(QOpenGL2PaintEngineEx);
|
||||
QT_WARNING_PUSH
|
||||
@ -1487,7 +1487,7 @@ QT_WARNING_DISABLE_DEPRECATED
|
||||
d->funcs.glDisable(GL_MULTISAMPLE);
|
||||
QT_WARNING_POP
|
||||
}
|
||||
#endif // QT_OPENGL_ES_2
|
||||
#endif // !QT_CONFIG(opengles2)
|
||||
|
||||
Q_D(QOpenGL2PaintEngineEx);
|
||||
|
||||
@ -2248,13 +2248,13 @@ bool QOpenGL2PaintEngineEx::begin(QPaintDevice *pdev)
|
||||
|
||||
d->glyphCacheFormat = QFontEngine::Format_A8;
|
||||
|
||||
#ifndef QT_OPENGL_ES_2
|
||||
#if !QT_CONFIG(opengles2)
|
||||
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
|
||||
d->funcs.glDisable(GL_MULTISAMPLE);
|
||||
d->glyphCacheFormat = QFontEngine::Format_A32;
|
||||
d->multisamplingAlwaysEnabled = false;
|
||||
} else
|
||||
#endif // QT_OPENGL_ES_2
|
||||
#endif // !QT_CONFIG(opengles2)
|
||||
{
|
||||
// OpenGL ES can't switch MSAA off, so if the gl paint device is
|
||||
// multisampled, it's always multisampled.
|
||||
|
@ -53,7 +53,7 @@
|
||||
|
||||
#include <QtGui/private/qtguiglobal_p.h>
|
||||
|
||||
#if !defined(QT_OPENGL_ES_2)
|
||||
#if !QT_CONFIG(opengles2)
|
||||
|
||||
#include <QtGui/QOpenGLContext>
|
||||
|
||||
|
@ -52,7 +52,7 @@
|
||||
#include <QtGui/QColor>
|
||||
#include <QtGui/QSurfaceFormat>
|
||||
|
||||
#if !defined(QT_OPENGL_ES_2)
|
||||
#if !QT_CONFIG(opengles2)
|
||||
#include <QtOpenGL/qopenglfunctions_4_0_core.h>
|
||||
#endif
|
||||
|
||||
@ -207,7 +207,7 @@ QT_BEGIN_NAMESPACE
|
||||
#define GL_PATCH_DEFAULT_INNER_LEVEL 0x8E73
|
||||
#endif
|
||||
|
||||
#ifndef QT_OPENGL_ES_2
|
||||
#if !QT_CONFIG(opengles2)
|
||||
static inline bool isFormatGLES(const QSurfaceFormat &f)
|
||||
{
|
||||
return (f.renderableType() == QSurfaceFormat::OpenGLES);
|
||||
@ -221,7 +221,7 @@ static inline bool supportsGeometry(const QSurfaceFormat &f)
|
||||
|
||||
static inline bool supportsCompute(const QSurfaceFormat &f)
|
||||
{
|
||||
#ifndef QT_OPENGL_ES_2
|
||||
#if !QT_CONFIG(opengles2)
|
||||
if (!isFormatGLES(f))
|
||||
return f.version() >= qMakePair(4, 3);
|
||||
else
|
||||
@ -233,7 +233,7 @@ static inline bool supportsCompute(const QSurfaceFormat &f)
|
||||
|
||||
static inline bool supportsTessellation(const QSurfaceFormat &f)
|
||||
{
|
||||
#ifndef QT_OPENGL_ES_2
|
||||
#if !QT_CONFIG(opengles2)
|
||||
if (!isFormatGLES(f))
|
||||
return f.version() >= qMakePair(4, 0);
|
||||
else
|
||||
@ -470,7 +470,7 @@ static const char qualifierDefines[] =
|
||||
"#define mediump\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
|
||||
// on all ES platforms. When it doesn't exist, use "mediump".
|
||||
#define QOpenGL_REDEFINE_HIGHP 1
|
||||
@ -787,7 +787,7 @@ public:
|
||||
, inited(false)
|
||||
, removingShaders(false)
|
||||
, glfuncs(new QOpenGLExtraFunctions)
|
||||
#ifndef QT_OPENGL_ES_2
|
||||
#if !QT_CONFIG(opengles2)
|
||||
, tessellationFuncs(nullptr)
|
||||
#endif
|
||||
, linkBinaryRecursion(false)
|
||||
@ -805,7 +805,7 @@ public:
|
||||
QList<QOpenGLShader *> anonShaders;
|
||||
|
||||
QOpenGLExtraFunctions *glfuncs;
|
||||
#ifndef QT_OPENGL_ES_2
|
||||
#if !QT_CONFIG(opengles2)
|
||||
// for tessellation features not in GLES 3.2
|
||||
QOpenGLFunctions_4_0_Core *tessellationFuncs;
|
||||
#endif
|
||||
@ -895,7 +895,7 @@ bool QOpenGLShaderProgram::init()
|
||||
return false;
|
||||
d->glfuncs->initializeOpenGLFunctions();
|
||||
|
||||
#ifndef QT_OPENGL_ES_2
|
||||
#if !QT_CONFIG(opengles2)
|
||||
if (!context->isOpenGLES() && context->format().version() >= qMakePair(4, 0)) {
|
||||
d->tessellationFuncs = QOpenGLVersionFunctionsFactory::get<QOpenGLFunctions_4_0_Core>(context);
|
||||
d->tessellationFuncs->initializeOpenGLFunctions();
|
||||
@ -3568,7 +3568,7 @@ int QOpenGLShaderProgram::patchVertexCount() const
|
||||
*/
|
||||
void QOpenGLShaderProgram::setDefaultOuterTessellationLevels(const QVector<float> &levels)
|
||||
{
|
||||
#ifndef QT_OPENGL_ES_2
|
||||
#if !QT_CONFIG(opengles2)
|
||||
Q_D(QOpenGLShaderProgram);
|
||||
if (d->tessellationFuncs) {
|
||||
QVector<float> tessLevels = levels;
|
||||
@ -3608,7 +3608,7 @@ void QOpenGLShaderProgram::setDefaultOuterTessellationLevels(const QVector<float
|
||||
*/
|
||||
QVector<float> QOpenGLShaderProgram::defaultOuterTessellationLevels() const
|
||||
{
|
||||
#ifndef QT_OPENGL_ES_2
|
||||
#if !QT_CONFIG(opengles2)
|
||||
QVector<float> tessLevels(4, 1.0f);
|
||||
Q_D(const QOpenGLShaderProgram);
|
||||
if (d->tessellationFuncs)
|
||||
@ -3641,7 +3641,7 @@ QVector<float> QOpenGLShaderProgram::defaultOuterTessellationLevels() const
|
||||
*/
|
||||
void QOpenGLShaderProgram::setDefaultInnerTessellationLevels(const QVector<float> &levels)
|
||||
{
|
||||
#ifndef QT_OPENGL_ES_2
|
||||
#if !QT_CONFIG(opengles2)
|
||||
Q_D(QOpenGLShaderProgram);
|
||||
if (d->tessellationFuncs) {
|
||||
QVector<float> tessLevels = levels;
|
||||
@ -3681,7 +3681,7 @@ void QOpenGLShaderProgram::setDefaultInnerTessellationLevels(const QVector<float
|
||||
*/
|
||||
QVector<float> QOpenGLShaderProgram::defaultInnerTessellationLevels() const
|
||||
{
|
||||
#ifndef QT_OPENGL_ES_2
|
||||
#if !QT_CONFIG(opengles2)
|
||||
QVector<float> tessLevels(2, 1.0f);
|
||||
Q_D(const QOpenGLShaderProgram);
|
||||
if (d->tessellationFuncs)
|
||||
|
@ -3890,7 +3890,7 @@ bool QOpenGLTexture::hasFeature(Feature feature)
|
||||
|
||||
bool supported = false;
|
||||
|
||||
#if !defined(QT_OPENGL_ES_2)
|
||||
#if !QT_CONFIG(opengles2)
|
||||
if (!ctx->isOpenGLES()) {
|
||||
switch (feature) {
|
||||
case ImmutableMultisampleStorage:
|
||||
@ -4242,7 +4242,7 @@ void QOpenGLTexture::generateMipMaps(int baseLevel, bool resetBaseLevel)
|
||||
*/
|
||||
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()) {
|
||||
Q_D(QOpenGLTexture);
|
||||
d->create();
|
||||
@ -4271,7 +4271,7 @@ void QOpenGLTexture::setSwizzleMask(SwizzleComponent component, SwizzleValue val
|
||||
void QOpenGLTexture::setSwizzleMask(SwizzleValue r, SwizzleValue g,
|
||||
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()) {
|
||||
Q_D(QOpenGLTexture);
|
||||
d->create();
|
||||
@ -4331,7 +4331,7 @@ QOpenGLTexture::SwizzleValue QOpenGLTexture::swizzleMask(SwizzleComponent compon
|
||||
*/
|
||||
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()) {
|
||||
Q_D(QOpenGLTexture);
|
||||
d->create();
|
||||
@ -4628,7 +4628,7 @@ void QOpenGLTexture::setBorderColor(const QColor &color)
|
||||
*/
|
||||
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()) {
|
||||
Q_D(QOpenGLTexture);
|
||||
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)
|
||||
{
|
||||
#if !defined(QT_OPENGL_ES_2)
|
||||
#if !QT_CONFIG(opengles2)
|
||||
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
|
||||
Q_D(QOpenGLTexture);
|
||||
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)
|
||||
{
|
||||
#if !defined(QT_OPENGL_ES_2)
|
||||
#if !QT_CONFIG(opengles2)
|
||||
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
|
||||
Q_D(QOpenGLTexture);
|
||||
d->create();
|
||||
@ -4808,7 +4808,7 @@ void QOpenGLTexture::borderColor(unsigned int *border) const
|
||||
*/
|
||||
void QOpenGLTexture::setMinimumLevelOfDetail(float value)
|
||||
{
|
||||
#if !defined(QT_OPENGL_ES_2)
|
||||
#if !QT_CONFIG(opengles2)
|
||||
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
|
||||
Q_D(QOpenGLTexture);
|
||||
d->create();
|
||||
@ -4845,7 +4845,7 @@ float QOpenGLTexture::minimumLevelOfDetail() const
|
||||
*/
|
||||
void QOpenGLTexture::setMaximumLevelOfDetail(float value)
|
||||
{
|
||||
#if !defined(QT_OPENGL_ES_2)
|
||||
#if !QT_CONFIG(opengles2)
|
||||
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
|
||||
Q_D(QOpenGLTexture);
|
||||
d->create();
|
||||
@ -4881,7 +4881,7 @@ float QOpenGLTexture::maximumLevelOfDetail() const
|
||||
*/
|
||||
void QOpenGLTexture::setLevelOfDetailRange(float min, float max)
|
||||
{
|
||||
#if !defined(QT_OPENGL_ES_2)
|
||||
#if !QT_CONFIG(opengles2)
|
||||
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
|
||||
Q_D(QOpenGLTexture);
|
||||
d->create();
|
||||
@ -4923,7 +4923,7 @@ QPair<float, float> QOpenGLTexture::levelOfDetailRange() const
|
||||
*/
|
||||
void QOpenGLTexture::setLevelofDetailBias(float bias)
|
||||
{
|
||||
#if !defined(QT_OPENGL_ES_2)
|
||||
#if !QT_CONFIG(opengles2)
|
||||
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
|
||||
Q_D(QOpenGLTexture);
|
||||
d->create();
|
||||
|
@ -92,7 +92,7 @@ QOpenGLTextureGlyphCache::~QOpenGLTextureGlyphCache()
|
||||
clear();
|
||||
}
|
||||
|
||||
#if !defined(QT_OPENGL_ES_2)
|
||||
#if !QT_CONFIG(opengles2)
|
||||
static inline bool isCoreProfile()
|
||||
{
|
||||
return QOpenGLContext::currentContext()->format().profile() == QSurfaceFormat::CoreProfile;
|
||||
@ -143,7 +143,7 @@ void QOpenGLTextureGlyphCache::createTextureData(int width, int height)
|
||||
QVarLengthArray<uchar> data(width * height);
|
||||
for (int i = 0; i < data.size(); ++i)
|
||||
data[i] = 0;
|
||||
#if !defined(QT_OPENGL_ES_2)
|
||||
#if !QT_CONFIG(opengles2)
|
||||
const GLint internalFormat = isCoreProfile() ? GL_R8 : GL_ALPHA;
|
||||
const GLenum format = isCoreProfile() ? GL_RED : GL_ALPHA;
|
||||
#else
|
||||
@ -233,11 +233,11 @@ static void load_glyph_image_to_texture(QOpenGLContext *ctx,
|
||||
|
||||
funcs->glBindTexture(GL_TEXTURE_2D, texture);
|
||||
if (img.depth() == 32) {
|
||||
#ifdef QT_OPENGL_ES_2
|
||||
#if QT_CONFIG(opengles2)
|
||||
GLenum fmt = GL_RGBA;
|
||||
#else
|
||||
GLenum fmt = ctx->isOpenGLES() ? GL_RGBA : GL_BGRA;
|
||||
#endif // QT_OPENGL_ES_2
|
||||
#endif // QT_CONFIG(opengles2)
|
||||
|
||||
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
|
||||
fmt = GL_RGBA;
|
||||
@ -246,7 +246,7 @@ static void load_glyph_image_to_texture(QOpenGLContext *ctx,
|
||||
} else {
|
||||
// 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.
|
||||
#if !defined(QT_OPENGL_ES_2)
|
||||
#if !QT_CONFIG(opengles2)
|
||||
const GLenum format = isCoreProfile() ? GL_RED : GL_ALPHA;
|
||||
#else
|
||||
const GLenum format = GL_ALPHA;
|
||||
|
@ -143,7 +143,7 @@ QOpenGLTextureHelper::QOpenGLTextureHelper(QOpenGLContext *context)
|
||||
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,
|
||||
// similarly to WGL, non-extension functions (i.e. any function that is part of the
|
||||
// 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
|
||||
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"));\
|
||||
|
@ -628,7 +628,7 @@ public:
|
||||
int val = 0;
|
||||
functions->glGetIntegerv(GL_UNPACK_ALIGNMENT, &val);
|
||||
options.setAlignment(val);
|
||||
#if !defined(QT_OPENGL_ES_2)
|
||||
#if !QT_CONFIG(opengles2)
|
||||
functions->glGetIntegerv(GL_UNPACK_SKIP_IMAGES, &val);
|
||||
options.setSkipImages(val);
|
||||
functions->glGetIntegerv(GL_UNPACK_SKIP_ROWS, &val);
|
||||
@ -651,7 +651,7 @@ public:
|
||||
inline void setPixelUploadOptions(const QOpenGLPixelTransferOptions &options)
|
||||
{
|
||||
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_ROWS, options.skipRows());
|
||||
functions->glPixelStorei(GL_UNPACK_SKIP_PIXELS, options.skipPixels());
|
||||
|
@ -42,7 +42,7 @@
|
||||
|
||||
#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 <QtGui/qopengl.h>
|
||||
|
@ -103,7 +103,7 @@ QOpenGLVersionFunctionsStorage::QOpenGLVersionFunctionsStorage()
|
||||
|
||||
QOpenGLVersionFunctionsStorage::~QOpenGLVersionFunctionsStorage()
|
||||
{
|
||||
#ifndef QT_OPENGL_ES
|
||||
#if !QT_CONFIG(opengles2)
|
||||
if (backends) {
|
||||
|
||||
int i = 0;
|
||||
@ -122,7 +122,7 @@ QOpenGLVersionFunctionsStorage::~QOpenGLVersionFunctionsStorage()
|
||||
|
||||
QOpenGLVersionFunctionsBackend *QOpenGLVersionFunctionsStorage::backend(QOpenGLContext *context, QOpenGLVersionFunctionsBackend::Version v)
|
||||
{
|
||||
#ifdef QT_OPENGL_ES
|
||||
#if QT_CONFIG(opengles2)
|
||||
Q_UNUSED(context);
|
||||
Q_UNUSED(v);
|
||||
return 0;
|
||||
@ -339,7 +339,7 @@ QOpenGLContext *QAbstractOpenGLFunctions::owningContext() const
|
||||
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_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
|
||||
|
||||
#endif // !QT_OPENGL_ES_2
|
||||
#endif // !QT_CONFIG(opengles2)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -240,7 +240,7 @@ inline QAbstractOpenGLFunctionsPrivate *QAbstractOpenGLFunctionsPrivate::get(QAb
|
||||
return q->d_func();
|
||||
}
|
||||
|
||||
#if !defined(QT_OPENGL_ES_2)
|
||||
#if !QT_CONFIG(opengles2)
|
||||
|
||||
class QOpenGLFunctions_1_0_CoreBackend : public QOpenGLVersionFunctionsBackend
|
||||
{
|
||||
@ -1894,7 +1894,7 @@ public:
|
||||
// No need for backend classes with function pointers with ES2.
|
||||
// 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_COUNT_FUNCTIONS
|
||||
|
@ -49,7 +49,7 @@
|
||||
#include "qopenglversionfunctionsfactory.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_compatibility.h"
|
||||
#include "qopenglfunctions_4_4_core.h"
|
||||
@ -84,7 +84,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
static QAbstractOpenGLFunctions *createFunctions(const QOpenGLVersionProfile &versionProfile)
|
||||
{
|
||||
#if !defined(QT_OPENGL_ES_2)
|
||||
#if !QT_CONFIG(opengles2)
|
||||
const int major = versionProfile.version().first;
|
||||
const int minor = versionProfile.version().second;
|
||||
|
||||
@ -231,12 +231,12 @@ QAbstractOpenGLFunctions *QOpenGLVersionFunctionsFactory::get(const QOpenGLVersi
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
#ifndef QT_OPENGL_ES_2
|
||||
#if !QT_CONFIG(opengles2)
|
||||
if (context->isOpenGLES()) {
|
||||
qWarning("versionFunctions: Not supported on OpenGL ES");
|
||||
return nullptr;
|
||||
}
|
||||
#endif // QT_OPENGL_ES_2
|
||||
#endif // !QT_CONFIG(opengles2)
|
||||
|
||||
const QSurfaceFormat f = context->format();
|
||||
|
||||
|
@ -171,7 +171,7 @@ bool QOpenGLVertexArrayObjectPrivate::create()
|
||||
vaoFuncs.core_3_0 = nullptr;
|
||||
vaoFuncsType = NotSupported;
|
||||
QSurfaceFormat format = ctx->format();
|
||||
#ifndef QT_OPENGL_ES_2
|
||||
#if !QT_CONFIG(opengles2)
|
||||
if (format.version() >= qMakePair<int, int>(3,2)) {
|
||||
vaoFuncs.core_3_2 = QOpenGLVersionFunctionsFactory::get<QOpenGLFunctions_3_2_Core>(ctx);
|
||||
vaoFuncsType = Core_3_2;
|
||||
@ -236,7 +236,7 @@ void QOpenGLVertexArrayObjectPrivate::destroy()
|
||||
|
||||
if (vao && ctx) {
|
||||
switch (vaoFuncsType) {
|
||||
#ifndef QT_OPENGL_ES_2
|
||||
#if !QT_CONFIG(opengles2)
|
||||
case Core_3_2:
|
||||
vaoFuncs.core_3_2->glDeleteVertexArrays(1, &vao);
|
||||
break;
|
||||
@ -273,7 +273,7 @@ void QOpenGLVertexArrayObjectPrivate::_q_contextAboutToBeDestroyed()
|
||||
void QOpenGLVertexArrayObjectPrivate::bind()
|
||||
{
|
||||
switch (vaoFuncsType) {
|
||||
#ifndef QT_OPENGL_ES_2
|
||||
#if !QT_CONFIG(opengles2)
|
||||
case Core_3_2:
|
||||
vaoFuncs.core_3_2->glBindVertexArray(vao);
|
||||
break;
|
||||
@ -294,7 +294,7 @@ void QOpenGLVertexArrayObjectPrivate::bind()
|
||||
void QOpenGLVertexArrayObjectPrivate::release()
|
||||
{
|
||||
switch (vaoFuncsType) {
|
||||
#ifndef QT_OPENGL_ES_2
|
||||
#if !QT_CONFIG(opengles2)
|
||||
case Core_3_2:
|
||||
vaoFuncs.core_3_2->glBindVertexArray(0);
|
||||
break;
|
||||
|
@ -87,7 +87,7 @@ bool QAbstractOpenGLExtension::isInitialized() const
|
||||
return d->initialized;
|
||||
}
|
||||
|
||||
#if !defined(QT_OPENGL_ES_2)
|
||||
#if !QT_CONFIG(opengles2)
|
||||
|
||||
QOpenGLExtension_3DFX_tbuffer::QOpenGLExtension_3DFX_tbuffer()
|
||||
: QAbstractOpenGLExtension(*(new QOpenGLExtension_3DFX_tbufferPrivate))
|
||||
|
@ -107,7 +107,7 @@ protected:
|
||||
QAbstractOpenGLExtensionPrivate *d_ptr;
|
||||
};
|
||||
|
||||
#if !defined(QT_OPENGL_ES_2)
|
||||
#if !QT_CONFIG(opengles2)
|
||||
|
||||
class QOpenGLExtension_3DFX_tbufferPrivate : public QAbstractOpenGLExtensionPrivate
|
||||
{
|
||||
|
@ -466,7 +466,7 @@ QFunctionPointer QEGLPlatformContext::getProcAddress(const char *procName)
|
||||
const char *name;
|
||||
QFunctionPointer func;
|
||||
} standardFuncs[] = {
|
||||
#ifdef QT_OPENGL_ES_2
|
||||
#if QT_CONFIG(opengles2)
|
||||
{ "glBindTexture", (QFunctionPointer) ::glBindTexture },
|
||||
{ "glBlendFunc", (QFunctionPointer) ::glBlendFunc },
|
||||
{ "glClear", (QFunctionPointer) ::glClear },
|
||||
@ -611,9 +611,9 @@ QFunctionPointer QEGLPlatformContext::getProcAddress(const char *procName)
|
||||
|
||||
{ "glClearDepthf", (QFunctionPointer) ::glClearDepthf },
|
||||
{ "glDepthRangef", (QFunctionPointer) ::glDepthRangef },
|
||||
#endif // QT_OPENGL_ES_2
|
||||
#endif // QT_CONFIG(opengles2)
|
||||
|
||||
#ifdef QT_OPENGL_ES_3
|
||||
#if QT_CONFIG(opengles3)
|
||||
{ "glBeginQuery", (QFunctionPointer) ::glBeginQuery },
|
||||
{ "glBeginTransformFeedback", (QFunctionPointer) ::glBeginTransformFeedback },
|
||||
{ "glBindBufferBase", (QFunctionPointer) ::glBindBufferBase },
|
||||
@ -718,9 +718,9 @@ QFunctionPointer QEGLPlatformContext::getProcAddress(const char *procName)
|
||||
{ "glVertexAttribI4uiv", (QFunctionPointer) ::glVertexAttribI4uiv },
|
||||
{ "glVertexAttribIPointer", (QFunctionPointer) ::glVertexAttribIPointer },
|
||||
{ "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 },
|
||||
{ "glBindImageTexture", (QFunctionPointer) ::glBindImageTexture },
|
||||
{ "glBindProgramPipeline", (QFunctionPointer) ::glBindProgramPipeline },
|
||||
@ -789,9 +789,9 @@ QFunctionPointer QEGLPlatformContext::getProcAddress(const char *procName)
|
||||
{ "glVertexAttribFormat", (QFunctionPointer) ::glVertexAttribFormat },
|
||||
{ "glVertexAttribIFormat", (QFunctionPointer) ::glVertexAttribIFormat },
|
||||
{ "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 },
|
||||
{ "glCopyImageSubData", (QFunctionPointer) ::glCopyImageSubData },
|
||||
{ "glDebugMessageControl", (QFunctionPointer) ::glDebugMessageControl },
|
||||
@ -836,7 +836,7 @@ QFunctionPointer QEGLPlatformContext::getProcAddress(const char *procName)
|
||||
{ "glTexBuffer", (QFunctionPointer) ::glTexBuffer },
|
||||
{ "glTexBufferRange", (QFunctionPointer) ::glTexBufferRange },
|
||||
{ "glTexStorage3DMultisample", (QFunctionPointer) ::glTexStorage3DMultisample },
|
||||
#endif // QT_OPENGL_ES_3_2
|
||||
#endif // QT_CONFIG(opengles32)
|
||||
};
|
||||
|
||||
for (size_t i = 0; i < sizeof(standardFuncs) / sizeof(StdFunc); ++i) {
|
||||
|
@ -44,7 +44,7 @@
|
||||
#include <QtCore/qdebug.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>
|
||||
#endif
|
||||
|
||||
|
@ -84,10 +84,10 @@
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
#if defined(QT_OPENGL_ES_2) || defined(QT_OPENGL_DYNAMIC)
|
||||
#if QT_CONFIG(opengles2) || defined(QT_OPENGL_DYNAMIC)
|
||||
# include "qwindowseglcontext.h"
|
||||
#endif
|
||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
||||
#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
|
||||
# include "qwindowsglcontext.h"
|
||||
#endif
|
||||
|
||||
@ -455,7 +455,7 @@ QWindowsStaticOpenGLContext *QWindowsStaticOpenGLContext::doCreate()
|
||||
return eglCtx;
|
||||
}
|
||||
return QOpenGLStaticContext::create(true);
|
||||
#elif defined(QT_OPENGL_ES_2)
|
||||
#elif QT_CONFIG(opengles2)
|
||||
QWindowsOpenGLTester::Renderers glesRenderers = QWindowsOpenGLTester::requestedGlesRenderer();
|
||||
if (glesRenderers == QWindowsOpenGLTester::InvalidRenderer)
|
||||
glesRenderers = QWindowsOpenGLTester::supportedRenderers(QWindowsOpenGLTester::AngleRendererD3d11);
|
||||
@ -483,7 +483,7 @@ QPlatformOpenGLContext *QWindowsIntegration::createPlatformOpenGLContext(QOpenGL
|
||||
|
||||
QOpenGLContext::OpenGLModuleType QWindowsIntegration::openGLModuleType()
|
||||
{
|
||||
#if defined(QT_OPENGL_ES_2)
|
||||
#if QT_CONFIG(opengles2)
|
||||
return QOpenGLContext::LibGLES;
|
||||
#elif !defined(QT_OPENGL_DYNAMIC)
|
||||
return QOpenGLContext::LibGL;
|
||||
|
@ -241,7 +241,7 @@ QGLXContext::QGLXContext(QXcbScreen *screen, const QSurfaceFormat &format, QPlat
|
||||
void QGLXContext::init(QXcbScreen *screen, QPlatformOpenGLContext *share)
|
||||
{
|
||||
if (m_format.renderableType() == QSurfaceFormat::DefaultRenderableType)
|
||||
#if defined(QT_OPENGL_ES_2)
|
||||
#if QT_CONFIG(opengles2)
|
||||
m_format.setRenderableType(QSurfaceFormat::OpenGLES);
|
||||
#else
|
||||
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
|
||||
// platforms).
|
||||
if (newParent
|
||||
#if defined(QT_OPENGL_ES)
|
||||
#if QT_CONFIG(opengles2)
|
||||
|| (f & Qt::MSWindowsOwnDC)
|
||||
#endif
|
||||
) {
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
#if defined(QT_OPENGL_ES_2)
|
||||
#if QT_CONFIG(opengles2)
|
||||
QOpenGLExtension_OES_vertex_array_object obj;
|
||||
#else
|
||||
QOpenGLExtension_ARB_draw_buffers obj;
|
||||
|
@ -57,7 +57,7 @@
|
||||
#include <QtPlatformHeaders/QGLXNativeContext>
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_WIN32) && !defined(QT_OPENGL_ES_2)
|
||||
#if defined(Q_OS_WIN32) && !QT_CONFIG(opengles2)
|
||||
#include <QtPlatformHeaders/QWGLNativeContext>
|
||||
#endif
|
||||
|
||||
@ -107,7 +107,7 @@ private slots:
|
||||
void glxContextWrap();
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_WIN32) && !defined(QT_OPENGL_ES_2)
|
||||
#if defined(Q_OS_WIN32) && !QT_CONFIG(opengles2)
|
||||
void wglContextWrap();
|
||||
#endif
|
||||
|
||||
@ -633,7 +633,7 @@ static bool supportsInternalFboFormat(QOpenGLContext *ctx, int glFormat)
|
||||
{
|
||||
if (ctx->format().majorVersion() < 3)
|
||||
return false;
|
||||
#ifndef QT_OPENGL_ES_2
|
||||
#if !QT_CONFIG(opengles2)
|
||||
if (!ctx->isOpenGLES() && ctx->format().majorVersion() >= 4) {
|
||||
GLint value = -1;
|
||||
auto *vFuncs = QOpenGLVersionFunctionsFactory::get<QOpenGLFunctions_4_2_Core>(ctx);
|
||||
@ -1519,7 +1519,7 @@ void tst_QOpenGL::glxContextWrap()
|
||||
}
|
||||
#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()
|
||||
{
|
||||
QScopedPointer<QOpenGLContext> ctx(new QOpenGLContext);
|
||||
@ -1572,7 +1572,7 @@ void tst_QOpenGL::wglContextWrap()
|
||||
QVERIFY(adopted->makeCurrent(window.data()));
|
||||
adopted->doneCurrent();
|
||||
}
|
||||
#endif // Q_OS_WIN32 && !QT_OPENGL_ES_2
|
||||
#endif // Q_OS_WIN32 && !QT_CONFIG(opengles2)
|
||||
|
||||
void tst_QOpenGL::vaoCreate()
|
||||
{
|
||||
|
@ -747,14 +747,14 @@ void tst_QGL::openGLVersionCheck()
|
||||
// However, the complicated parts are in openGLVersionFlags(const QString &versionString)
|
||||
// tested above
|
||||
|
||||
#if defined(QT_OPENGL_ES_2)
|
||||
#if QT_CONFIG(opengles2)
|
||||
QVERIFY(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_ES_Version_2_0);
|
||||
#else
|
||||
if (QOpenGLContext::currentContext()->isOpenGLES())
|
||||
QVERIFY(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_ES_Version_2_0);
|
||||
else
|
||||
QVERIFY(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_Version_1_1);
|
||||
#endif //defined(QT_OPENGL_ES_2)
|
||||
#endif //QT_CONFIG(opengles2)
|
||||
}
|
||||
#endif //QT_BUILD_INTERNAL
|
||||
|
||||
@ -1639,7 +1639,7 @@ void tst_QGL::fboFormat()
|
||||
QCOMPARE(format1.attachment(), QGLFramebufferObject::NoAttachment);
|
||||
QCOMPARE(int(format1.textureTarget()), int(GL_TEXTURE_2D));
|
||||
int expectedFormat =
|
||||
#ifdef QT_OPENGL_ES_2
|
||||
#if QT_CONFIG(opengles2)
|
||||
GL_RGBA;
|
||||
#else
|
||||
QOpenGLContext::openGLModuleType() != QOpenGLContext::LibGL ? GL_RGBA : GL_RGBA8;
|
||||
@ -1716,7 +1716,7 @@ void tst_QGL::fboFormat()
|
||||
QCOMPARE(format1c, format3c);
|
||||
QVERIFY(!(format1c != format3c));
|
||||
format3c.setInternalTextureFormat(
|
||||
#ifdef QT_OPENGL_ES_2
|
||||
#if QT_CONFIG(opengles2)
|
||||
GL_RGBA
|
||||
#else
|
||||
QOpenGLContext::openGLModuleType() != QOpenGLContext::LibGL ? GL_RGBA : GL_RGBA8
|
||||
@ -1729,7 +1729,7 @@ void tst_QGL::fboFormat()
|
||||
QCOMPARE(format1c, format4c);
|
||||
QVERIFY(!(format1c != format4c));
|
||||
format4c.setInternalTextureFormat(
|
||||
#ifdef QT_OPENGL_ES_2
|
||||
#if QT_CONFIG(opengles2)
|
||||
GL_RGBA
|
||||
#else
|
||||
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>());
|
||||
|
||||
// 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) {
|
||||
if (!versionHasProfiles(classVersion)) {
|
||||
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("QAbstractOpenGLFunctions *QOpenGLVersionFunctionsFactory::create(const QOpenGLVersionProfile &versionProfile)") << 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 minor = versionProfile.version().second;") << Qt::endl << Qt::endl;
|
||||
|
||||
|
@ -81,5 +81,4 @@ bool QAbstractOpenGLExtension::isInitialized() const
|
||||
return d->initialized;
|
||||
}
|
||||
|
||||
#if !defined(QT_OPENGL_ES_2)
|
||||
|
||||
#if !QT_CONFIG(opengles2)
|
||||
|
@ -101,5 +101,4 @@ protected:
|
||||
QAbstractOpenGLExtensionPrivate *d_ptr;
|
||||
};
|
||||
|
||||
#if !defined(QT_OPENGL_ES_2)
|
||||
|
||||
#if !QT_CONFIG(opengles2)
|
||||
|
@ -3,6 +3,6 @@
|
||||
|
||||
// No backends for OpenGL ES 2
|
||||
|
||||
#endif // !QT_OPENGL_ES_2
|
||||
#endif // !QT_CONFIG(opengles2)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -203,5 +203,5 @@ QOpenGLContext *QAbstractOpenGLFunctions::owningContext() const
|
||||
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.
|
||||
// All function addresses are independent of context and display.
|
||||
|
||||
#endif // !QT_OPENGL_ES_2
|
||||
#endif // !QT_CONFIG(opengles2)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
@ -147,5 +147,5 @@ protected:
|
||||
friend class QOpenGLContext;
|
||||
};
|
||||
|
||||
#if !defined(QT_OPENGL_ES_2)
|
||||
#if !QT_CONFIG(opengles2)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
|
||||
#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
|
||||
|
||||
#endif
|
||||
|
@ -40,7 +40,7 @@
|
||||
|
||||
#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/qopenglcontext.h>
|
||||
|
Loading…
x
Reference in New Issue
Block a user