From 46eff02e5dc36f26d7f10bbc74e04875a9fb7220 Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Mon, 28 Sep 2009 14:09:42 +1000 Subject: Suppress some compiler warnings that occur under OpenGL/ES 2.0 Reviewed-by: trustme --- src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 4 ++++ src/opengl/qwindowsurface_gl.cpp | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index b8a5711..119c89d 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -758,6 +758,8 @@ void QGL2PaintEngineEx::beginNativePainting() glMatrixMode(GL_MODELVIEW); glLoadMatrixf(&mv_matrix[0][0]); +#else + Q_UNUSED(ctx); #endif d->lastTexture = GLuint(-1); @@ -1207,7 +1209,9 @@ void QGL2PaintEngineEx::drawTexture(const QRectF &dest, GLuint textureId, const ensureActive(); d->transferMode(ImageDrawingMode); +#ifndef QT_OPENGL_ES_2 QGLContext *ctx = d->ctx; +#endif glActiveTexture(GL_TEXTURE0 + QT_IMAGE_TEXTURE_UNIT); glBindTexture(GL_TEXTURE_2D, textureId); diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp index 525c877..3a348bc 100644 --- a/src/opengl/qwindowsurface_gl.cpp +++ b/src/opengl/qwindowsurface_gl.cpp @@ -606,6 +606,8 @@ void QGLWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint & #else // OpenGL/ES 2.0 version of the fbo blit. else if (d_ptr->fbo) { + Q_UNUSED(target); + GLuint texture = d_ptr->fbo->texture(); glDisable(GL_DEPTH_TEST); -- cgit v0.12