[PyOpenGL-Devel] [ pyopengl-Support Requests-643668 ] WGL ChoosePixelFormat calling error
Brought to you by:
mcfletch
From: SourceForge.net <no...@so...> - 2004-07-09 14:08:35
|
Support Requests item #643668, was opened at 2002-11-25 12:36 Message generated for change (Comment added) made by praetor_alpha You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=205988&aid=643668&group_id=5988 Category: GL Group: v2.0 Status: Open Resolution: None Priority: 5 Submitted By: David Hughes (dwhughes) Assigned to: Nobody/Anonymous (nobody) Summary: WGL ChoosePixelFormat calling error Initial Comment: System: Win98, Python 2.2.2 PYOPENGL-2.0.0.44.WIN32-PY2.2.EXE Win32 extensions v.148 Trying to run the openGLDemo .py included with Pythonwin, I cannot execute pfd = createPIXELFORMATDESCRIPTOR() because I don't seem to have that function. I replaced the call with pfd = PIXELFORMATDESCRIPTOR() <snip value assignments> ppfd = PIXELFORMATDESCRIPTORPtr(pfd) the call that causes problems is pixelformat = ChoosePixelFormat(dc, ppfd) with the following trace File "C:\Python22\Lib\site- packages\Pythonwin\pywin\Demos\openGLDemo.py", line 121, in _SetupPixelFormat pixelformat = ChoosePixelFormat(dc, ppfd) TypeError: Type error. Expected _p_q_const__PIXELFORMATDESCRIPTOR How should I be calling the PixelFormat functions? ---------------------------------------------------------------------- Comment By: prætor_alpha (praetor_alpha) Date: 2004-07-09 10:08 Message: Logged In: YES user_id=1080314 Since I recently purchased a card that can do it, I am now looking into how to mulitsample in PyOpenGL. However, I was hitting a road-block in my search. I was looking at NeHe Lesson #46 (http://nehe.gamedev.net/data/lessons/lesson.asp? lesson=46) and I was wondering where this "pfd" value came along. I realized that there was a function named wglChoosePixelFormatARB that came out of nowhere. I peeled through my PyOpenGL directories, and module docs. I found out that you have to wglChoosePixelFormatARB=wglGetProcAddress ("wglChoosePixelFormatARB"), which makes the wglChoosePixelFormatARB an integer, NOT a function. I suspect that wglChoosePixelFormatARB is where this PFD value comes from. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=205988&aid=643668&group_id=5988 |