Question on glBufferData / glBufferSubData

Walter White <[email protected]> Mon, 24 Mar 2014 10:23:25 +0100
Newsgroups gmane.comp.python.opengl.user
Message-ID <CAG+hEfmrDgnuN1OEHtgHO7zh+iNO6_m6opno0V_cPucQijh6yQ@mail.gmail.com>
Hello,

I have a question about PyOpenGL and hope that you can help me.

While working through the arcsynthesis opengl tutorial I came
across the following issue.

The example

This works fine:

Hello,

I have a question about PyOpenGL and hope that you can help me.

While working through the arcsynthesis opengl tutorial I came
across a problem using glBufferSubData.

My code is here:

http://bpaste.net/show/FAhw0W1Hx4WDW9toa75H/

This works fine:

glBufferData(GL_ARRAY_BUFFER, ADT.arrayByteCount(npData),
             ADT.voidDataPointer(npData), GL_STATIC_DRAW)

But using

glBufferSubData(GL_ARRAY_BUFFER, 0, ADT.arrayByteCount(npData), npData)

or (I guess identical)

glBufferSubData(GL_ARRAY_BUFFER, 0, ADT.arrayByteCount(npData),
ADT.voidDataPointer(npData))

results in  an OpenGL Error 1281 Invalid Type after a few
seconds. During the first 1 - 5 seconds the program works as expected.

Can someone tell me what causes the problem?

Kind regards,
Walter

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech

_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net
_______________________________________________
PyOpenGL-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyopengl-users