[PyOpenGL-Users] Question on glBufferData / glBufferSubData
Brought to you by:
mcfletch
|
From: Walter W. <hom...@gm...> - 2014-03-15 23:48:30
|
Hello,
I have a question about PyOpenGL and hope that you can help me.
I am a little bit confused about the follwing.
This works fine:
glBufferData(GL_ARRAY_BUFFER, ADT.arrayByteCount(npData),
ADT.voidDataPointer(npData), GL_STATIC_DRAW)
This also works fine:
glBufferSubData(GL_ARRAY_BUFFER, 0, ADT.arrayByteCount(npData), npData)
But using this results in OpenGL Error 1281 Invalid Type after a few
seconds:
glBufferSubData(GL_ARRAY_BUFFER, 0, ADT.arrayByteCount(npData),
ADT.voidDataPointer(npData))
I don't understand why using ADT.voidDataPointer(npData) in the
latter does not work as the specification states the that
the type is a void pointer to the data array in both functions:
void glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size,
const GLvoid * data);
void glBufferData(GLenum target, GLsizeiptr size, const GLvoid * data,
GLenum usage);
Kind regards,
Walter
|