[PyKDE] QGLWidget rendering problems

Phil Thompson phil at riverbankcomputing.co.uk
Wed Dec 17 23:37:01 GMT 2003


On Wednesday 17 December 2003 7:50 pm, Tom Badran wrote:
> 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.

The Python wrapper for glTexImage2D() won't expect a void *. What does it 
expect?

Phil




More information about the PyQt mailing list