summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl/qopenglpaintengine.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@digia.com>2014-02-28 17:03:57 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-04 15:59:05 +0100
commit4b2f35d04ca3c2e037b4d0edd8b2350051cc572c (patch)
treeb6cf33e9cba3e55b11be748fa37fd44b09021b54 /src/gui/opengl/qopenglpaintengine.cpp
parentfe2ce05d23a52d27e50270d22eb9fff9ab091dd4 (diff)
Dynamic GL: remove exporting symbols
Remove the opengl proxy for now. Later it will either be moved into a separate library or replaced by a QOpenGLFunctions-based approach. This means that the -opengl dynamic configuration is not usable for the time being. The rest of the enablers remain in place. The convenience function QOpenGLFunctions::isES() is now moved to QOpenGLContext and is changed to check the renderable type. This is extremely useful since besides supporting dynamic GL it solves also the problem of GL_ARB_ES2_compatibility (i.e. it triggers the real ES path when creating an ES-compatible context with a desktop OpenGL implementation). Task-number: QTBUG-36483 Task-number: QTBUG-37172 Change-Id: I045be3fc16e9043e1528cf48e6bf0903da4fa7ca Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Diffstat (limited to 'src/gui/opengl/qopenglpaintengine.cpp')
-rw-r--r--src/gui/opengl/qopenglpaintengine.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/opengl/qopenglpaintengine.cpp b/src/gui/opengl/qopenglpaintengine.cpp
index 63127668a5..7fa80c5343 100644
--- a/src/gui/opengl/qopenglpaintengine.cpp
+++ b/src/gui/opengl/qopenglpaintengine.cpp
@@ -221,7 +221,7 @@ void QOpenGL2PaintEngineExPrivate::updateBrushTexture()
currentBrushPixmap = currentBrushPixmap.scaled(max_texture_size, max_texture_size, Qt::KeepAspectRatio);
GLuint wrapMode = GL_REPEAT;
- if (QOpenGLFunctions::isES()) {
+ if (QOpenGLContext::currentContext()->isES()) {
// OpenGL ES does not support GL_REPEAT wrap modes for NPOT textures. So instead,
// we emulate GL_REPEAT by only taking the fractional part of the texture coords
// in the qopenglslTextureBrushSrcFragmentShader program.
@@ -542,7 +542,7 @@ void QOpenGL2PaintEngineEx::beginNativePainting()
d->funcs.glDisableVertexAttribArray(i);
#ifndef QT_OPENGL_ES_2
- if (!QOpenGLFunctions::isES()) {
+ if (!QOpenGLContext::currentContext()->isES()) {
Q_ASSERT(QOpenGLContext::currentContext());
const QOpenGLContext *ctx = d->ctx;
const QSurfaceFormat &fmt = d->device->context()->format();
@@ -600,7 +600,7 @@ void QOpenGL2PaintEngineExPrivate::resetGLState()
setVertexAttribArrayEnabled(QT_TEXTURE_COORDS_ATTR, false);
setVertexAttribArrayEnabled(QT_VERTEX_COORDS_ATTR, false);
setVertexAttribArrayEnabled(QT_OPACITY_ATTR, false);
- if (!QOpenGLFunctions::isES()) {
+ if (!QOpenGLContext::currentContext()->isES()) {
// gl_Color, corresponding to vertex attribute 3, may have been changed
float color[] = { 1.0f, 1.0f, 1.0f, 1.0f };
funcs.glVertexAttrib4fv(3, color);
@@ -1335,7 +1335,7 @@ void QOpenGL2PaintEngineEx::renderHintsChanged()
state()->renderHintsChanged = true;
#ifndef QT_OPENGL_ES_2
- if (!QOpenGLFunctions::isES()) {
+ if (!QOpenGLContext::currentContext()->isES()) {
if ((state()->renderHints & QPainter::Antialiasing)
|| (state()->renderHints & QPainter::HighQualityAntialiasing))
glEnable(GL_MULTISAMPLE);
@@ -2012,7 +2012,7 @@ bool QOpenGL2PaintEngineEx::begin(QPaintDevice *pdev)
d->glyphCacheFormat = QFontEngine::Format_A8;
#ifndef QT_OPENGL_ES_2
- if (!QOpenGLFunctions::isES()) {
+ if (!QOpenGLContext::currentContext()->isES()) {
glDisable(GL_MULTISAMPLE);
d->glyphCacheFormat = QFontEngine::Format_A32;
d->multisamplingAlwaysEnabled = false;