WGL in python, ChoosePixelFormat error

Rene Jensen chilopoda at hotmail.com
Wed Dec 12 12:52:12 EST 2001


Hi all.

Does anyone know where to find an example of how to set up an opengl context
via wgl? Is this being posted in the wrong forum?

I get a strange error when trying to call ChoosePixelFormat
This is how I try to setup my gl-context using win32all and wgl:

# Register window-class ..
# Create window..
# GetDC..

Desc = PIXELFORMATDESCRIPTOR()
Desc.xxx = yyy
..
PDesc = PIXELFORMATDESCRIPTORPtr (Desc)
format = ChoosePixelFormat (windowDC, PDesc)

..Which results in:

    TypeError: Type Error. Expected _p_q_const__PIXELFORMATDESCRIPTOR

But what does that mean?

Thanks in advance all! I've just started using python, and loved it instantly.
I'm trying to make a radiosity-renderer for creating shadowmaps in 3d games. I
really hope python is good enough for it, because I simply love the simplicity
of the code.

chilopoda at hotmail.com


-- 
Posted from 0xc3d7612c.mrgnxr2.ras.tele.dk [195.215.97.44] 
via Mailgate.ORG Server - http://www.Mailgate.ORG



More information about the Python-list mailing list