[PyQt] Pogles, Nice!

Phil Thompson phil at riverbankcomputing.com
Fri Nov 30 23:26:45 GMT 2012

On Fri, 30 Nov 2012 14:11:38 -0500, Jeremy Moles <cubicool at gmail.com>
> Hello everyone, particularly Phil!
> I had begun work on a C/Python extension for EGL/GLES2 written in mostly

> pure C. It was coming along nicely, I had support for many features, and

> then I stumbled upon pogles. It does everything I need (including RPi 
> support), and looks to be quite clean and recent.
> I'm porting over my code from C to pogles, and had a quick question.
> Functions like glBufferData should probably accept anything that 
> supports the buffer protocol. There is code in glVertexAttribPointer() 
> in gl_h.sip using SIP_PYBUFFER to do exactly that.
> Should all pogles functions be extend to use this same type of 
> mechanism?

Quite possibly.

> If so, could SIP be adapted to, for lack of a better term 
> (and not knowing ANYTHING about SIP), "macroify" this process? :) If 
> not, what is the best way to get data into functions like glBindBuffer?

I'm not an OpenGL programmer - the current implementation is based on what
I've read of the Khronos docs, so I'm sure there are many ways to improve
the API.

What would really be helpful would be to have some decent examples -
written (or ported) by somebody who knew what they were doing (ie. not me).
That should raise lots of "I had to write this but what I'd really like to
write is this", from which I can change the API so that it is a lot nicer
for the developer.


More information about the PyQt mailing list