[PyKDE] QGLWidget rendering problems

Tom Badran tb100 at doc.ic.ac.uk
Wed Dec 17 20:55:00 GMT 2003


On Wednesday 17 Dec 2003 18:40, Phil Thompson wrote:
> What type is expected by glTexImage2D()? The handling of the sip.voidptr
> type has been discussed before - but I'm not clear what type you need it
> converting to.

The man page defines it as:

void glTexImage2D( GLenum target,
                          GLint level,
                          GLint internalFormat,
                          GLsizei width,
                          GLsizei height,
                          GLint border,
                          GLenum format,
                          GLenum type,
                          const GLvoid *pixels )

A grep for GLvoid gives it typedefed as:

typedef void               GLvoid (gl.h)

So glTexImage2D seems to just expect a void *. The other fields are all just 
essentially integers so shouldnt be a problem. I guess i could just write a 
simple wrapper around glTexImage2D in c that i can call from python, ive 
already done that for some other image operations anyway (not gl related, 
just voidptr stuff). I just dont really understand how Qt/OpenGL integrate 
and it would be nice for this to work the 'proper' way.

I should mention im running NVIDIA graphics drivers which i think provide 
their own gl headers.

Thanks

Tom




More information about the PyQt mailing list