summaryrefslogtreecommitdiffstats
path: root/src/opengl/qglframebufferobject.cpp
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-10-21 12:31:43 +0200
committerQt by Nokia <qt-info@nokia.com>2011-10-28 12:14:10 +0200
commit77d30df7e546fecbefaccb6435f8ee9d53639cac (patch)
treeaa998a1d34d27456f5ad87efa513679ed3aead7e /src/opengl/qglframebufferobject.cpp
parent0b77a19394725373bb8d23e9b240c85a4714ed1d (diff)
Get rid of legacy glTexParameterf calls.
ES 1.0 didn't have glTexParameteri, which is why we sometimes used glTexParameterf. However, we shouldn't use glTexParameterf because that's treating integer values as floating point, which is not type safe. ES 1.1+ and ES 2.x have glTexParameteri, and we don't really care about supporting ES 1.0 in any case in Qt 5. Change-Id: I6b586b31ddc418ba319c4cc88f6bb3978fdbd040 Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
Diffstat (limited to 'src/opengl/qglframebufferobject.cpp')
-rw-r--r--src/opengl/qglframebufferobject.cpp7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp
index 60104c68c5..d0d2b2773f 100644
--- a/src/opengl/qglframebufferobject.cpp
+++ b/src/opengl/qglframebufferobject.cpp
@@ -456,17 +456,10 @@ void QGLFramebufferObjectPrivate::init(QGLFramebufferObject *q, const QSize &sz,
GL_RGBA, GL_UNSIGNED_BYTE, NULL);
if (mipmap)
glGenerateMipmap(GL_TEXTURE_2D);
-#ifndef QT_OPENGL_ES
glTexParameteri(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(target, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-#else
- glTexParameterf(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameterf(target, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexParameterf(target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameterf(target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-#endif
glFramebufferTexture2D(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT,
target, texture, 0);