Help with QOpenGLBuffer for a newbee

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Help with QOpenGLBuffer for a newbee

ctgreybeard
In short, I'm trying to learn OpenGL to help with another project that I have started. Because I love python I thought I would use PyQt ... and it's going well so far following a couple of tutorials I found.

When I started to get more "advanced" in one of the tutorials, which is written for C++, I ran against the use of QOpenGLBuffer objects.  I'm stuck at QOpenGLBuffer.allocate() ...

It appears to want a sip.voidptr and I think I understand what that is but I don't know how to make one in python.

Can someone give me a shove in the right direction?

Thanks,
Bill W
Reply | Threaded
Open this post in threaded view
|

Re: Help with QOpenGLBuffer for a newbee

ctgreybeard
I think I have it figured out. Please let me know if I am going in the wrong direction.

As I am creating vertex arrays of triplets of floats I found array.array() which worked for the allocate method. Binding the buffers into a VAO seems to work so far.

This stuff is HARD!