summaryrefslogtreecommitdiffstats
path: root/src/opengl/qglbuffer.h
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2010-03-18 04:28:35 (GMT)
committerRhys Weatherley <rhys.weatherley@nokia.com>2010-03-18 04:28:35 (GMT)
commitb1fe3626c2406e917b6c858c84e45f12368e969a (patch)
tree8c31f0468c5d29f3cf6ae6b1a0153ed4b14ebd15 /src/opengl/qglbuffer.h
parentb72a2bcf8d813ec6b76eb6cc986408c75a1c96bf (diff)
downloadQt-b1fe3626c2406e917b6c858c84e45f12368e969a.zip
Qt-b1fe3626c2406e917b6c858c84e45f12368e969a.tar.gz
Qt-b1fe3626c2406e917b6c858c84e45f12368e969a.tar.bz2
Add a raw bind() function to QGLBuffer.
It is awkward for a Qt application to do the equivalent of glBindBuffer(GL_ARRAY_BUFFER, 0) without knowing the QGLBuffer that was previously bound, or to bind a raw id obtained elsewhere. Resolving the extension is annoying. This change provides a raw low-level version of bind() for directly resolving and calling glBindBuffer() to assist such applications. Reviewed-by: Sarah Smith
Diffstat (limited to 'src/opengl/qglbuffer.h')
-rw-r--r--src/opengl/qglbuffer.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/opengl/qglbuffer.h b/src/opengl/qglbuffer.h
index ecb86e2..a060733 100644
--- a/src/opengl/qglbuffer.h
+++ b/src/opengl/qglbuffer.h
@@ -97,6 +97,8 @@ public:
bool bind() const;
void release() const;
+ static bool bind(QGLBuffer::Type type, uint bufferId);
+
uint bufferId() const;
int size() const;