summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2010-02-01 04:45:10 (GMT)
committerRhys Weatherley <rhys.weatherley@nokia.com>2010-02-01 04:45:10 (GMT)
commit533e40ca32eefe271e385bb2740e001ffc82b9e6 (patch)
treec70ba1593bf2e6c3617ed8aea4a5404c5de398ee /src/opengl
parent3733ee3ca9fdc964f2453089ca18c9179839846e (diff)
downloadQt-533e40ca32eefe271e385bb2740e001ffc82b9e6.zip
Qt-533e40ca32eefe271e385bb2740e001ffc82b9e6.tar.gz
Qt-533e40ca32eefe271e385bb2740e001ffc82b9e6.tar.bz2
Placate pedantic compiler warning modes on QGLBuffer
Reviewed-by: Sarah Smith
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/qglbuffer.cpp22
-rw-r--r--src/opengl/qglbuffer.h8
2 files changed, 15 insertions, 15 deletions
diff --git a/src/opengl/qglbuffer.cpp b/src/opengl/qglbuffer.cpp
index 2018086..62f6078 100644
--- a/src/opengl/qglbuffer.cpp
+++ b/src/opengl/qglbuffer.cpp
@@ -251,7 +251,7 @@ bool QGLBuffer::isCreated() const
}
/*!
- Reads the \a size bytes in this buffer starting at \a offset
+ Reads the \a count bytes in this buffer starting at \a offset
into \a data. Returns true on success; false if reading from
the buffer is not supported. Buffer reading is not supported
under OpenGL/ES.
@@ -260,14 +260,14 @@ bool QGLBuffer::isCreated() const
\sa write(), bind()
*/
-bool QGLBuffer::read(int offset, void *data, int size)
+bool QGLBuffer::read(int offset, void *data, int count)
{
#if !defined(QT_OPENGL_ES)
Q_D(QGLBuffer);
if (!glGetBufferSubData || !d->guard.id())
return false;
while (glGetError() != GL_NO_ERROR) ; // Clear error state.
- glGetBufferSubData(d->type, offset, size, data);
+ glGetBufferSubData(d->type, offset, count, data);
return glGetError() == GL_NO_ERROR;
#else
Q_UNUSED(offset);
@@ -278,7 +278,7 @@ bool QGLBuffer::read(int offset, void *data, int size)
}
/*!
- Replaces the \a size bytes of this buffer starting at \a offset
+ Replaces the \a count bytes of this buffer starting at \a offset
with the contents of \a data. Any other bytes in the buffer
will be left unmodified.
@@ -287,15 +287,15 @@ bool QGLBuffer::read(int offset, void *data, int size)
\sa create(), read(), allocate()
*/
-void QGLBuffer::write(int offset, const void *data, int size)
+void QGLBuffer::write(int offset, const void *data, int count)
{
Q_D(QGLBuffer);
if (d->guard.id())
- glBufferSubData(d->type, offset, size, data);
+ glBufferSubData(d->type, offset, count, data);
}
/*!
- Allocates \a size bytes of space to the buffer, initialized to
+ Allocates \a count bytes of space to the buffer, initialized to
the contents of \a data. Any previous contents will be removed.
It is assumed that create() has been called on this buffer and that
@@ -303,18 +303,18 @@ void QGLBuffer::write(int offset, const void *data, int size)
\sa create(), read(), write()
*/
-void QGLBuffer::allocate(const void *data, int size)
+void QGLBuffer::allocate(const void *data, int count)
{
Q_D(QGLBuffer);
if (d->guard.id())
- glBufferData(d->type, size, data, d->actualUsagePattern);
+ glBufferData(d->type, count, data, d->actualUsagePattern);
}
/*!
- \fn void QGLBuffer::allocate(int size)
+ \fn void QGLBuffer::allocate(int count)
\overload
- Allocates \a size bytes of space to the buffer. Any previous
+ Allocates \a count bytes of space to the buffer. Any previous
contents will be removed.
It is assumed that create() has been called on this buffer and that
diff --git a/src/opengl/qglbuffer.h b/src/opengl/qglbuffer.h
index 68ee56c..ecb86e2 100644
--- a/src/opengl/qglbuffer.h
+++ b/src/opengl/qglbuffer.h
@@ -101,11 +101,11 @@ public:
int size() const;
- bool read(int offset, void *data, int size);
- void write(int offset, const void *data, int size);
+ bool read(int offset, void *data, int count);
+ void write(int offset, const void *data, int count);
- void allocate(const void *data, int size);
- inline void allocate(int size) { allocate(0, size); }
+ void allocate(const void *data, int count);
+ inline void allocate(int count) { allocate(0, count); }
void *map(QGLBuffer::Access access);
bool unmap();