diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2011-08-29 10:22:28 +0200 |
---|---|---|
committer | Gunnar Sletta <gunnar.sletta@nokia.com> | 2011-08-29 10:42:42 +0200 |
commit | e35a83b293e6b38f6060895262b5494d36515e6e (patch) | |
tree | 42e0b0a9d4d9ca997959f399c208c25697dcaf77 /src/gui/opengl/qopenglbuffer.cpp | |
parent | 6e28e8441b698c3397c2c78125c877f2e9867cb1 (diff) |
Clean up legacy defines in gui/opengl.
Change-Id: I14d477c3f7a98cecca2c0a240ff13ea8ec64a154
Reviewed-on: http://codereview.qt.nokia.com/3716
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Diffstat (limited to 'src/gui/opengl/qopenglbuffer.cpp')
-rw-r--r-- | src/gui/opengl/qopenglbuffer.cpp | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/src/gui/opengl/qopenglbuffer.cpp b/src/gui/opengl/qopenglbuffer.cpp index 612938df16..4da0942e71 100644 --- a/src/gui/opengl/qopenglbuffer.cpp +++ b/src/gui/opengl/qopenglbuffer.cpp @@ -186,8 +186,6 @@ QOpenGLBuffer::QOpenGLBuffer(const QOpenGLBuffer &other) d_ptr->ref.ref(); } -#define ctx QOpenGLContext::currentContext(); - /*! Destroys this buffer object, including the storage being used in the GL server. @@ -250,8 +248,6 @@ void QOpenGLBuffer::setUsagePattern(QOpenGLBuffer::UsagePattern value) d->usagePattern = d->actualUsagePattern = value; } -#undef ctx - namespace { void freeBufferFunc(QOpenGLFunctions *funcs, GLuint id) { @@ -294,8 +290,6 @@ bool QOpenGLBuffer::create() return false; } -#define ctx QOpenGLContext::currentContext() - /*! Returns true if this buffer has been created; false otherwise. @@ -455,8 +449,6 @@ void QOpenGLBuffer::release() d->funcs->glBindBuffer(d->type, 0); } -#undef ctx - /*! Releases the buffer associated with \a type in the current QOpenGLContext. @@ -473,13 +465,10 @@ void QOpenGLBuffer::release() void QOpenGLBuffer::release(QOpenGLBuffer::Type type) { QOpenGLContext *ctx = QOpenGLContext::currentContext(); - if (ctx) { - QOpenGLFunctions(ctx).glBindBuffer(GLenum(type), 0); - } + if (ctx) + ctx->functions()->glBindBuffer(GLenum(type), 0); } -#define ctx QOpenGLContext::currentContext() - /*! Returns the GL identifier associated with this buffer; zero if the buffer has not been created. @@ -492,10 +481,6 @@ GLuint QOpenGLBuffer::bufferId() const return d->guard ? d->guard->id() : 0; } -#ifndef GL_BUFFER_SIZE -#define GL_BUFFER_SIZE 0x8764 -#endif - /*! Returns the size of the data in this buffer, for reading operations. Returns -1 if fetching the buffer size is not supported, or the |