Re: [PyOpenGL-Users] Setting Up on New Machine
Brought to you by:
mcfletch
From: Mike C. F. <mcf...@vr...> - 2012-02-02 16:47:02
|
On 12-02-02 10:45 AM, Ian Mallett wrote: > Hi, > > I just got a new laptop (64 bit, Py2.6), and am going through the > cursory install-everything phase. > > I'm having trouble with PyOpenGL. Standard OpenGL calls appear to be > undefined. The following minimal example: > > from OpenGL.GL import * > from OpenGL.GLU import * > from OpenGL.GLUT import * > import pygame > from pygame.locals import * > pygame.init() > > Screen = (640,480) > pygame.display.set_mode(Screen,OPENGL|DOUBLEBUF) > > glEnable(GL_LIGHTING) > > > . . . produces (after creating a window, and, therefore hopefully, a > context): > > Traceback (most recent call last): > File "C:\Users\Ian Mallett\Desktop\t.py", line 11, in <module> > glEnable(GL_LIGHTING) > File > "C:\dev\Python26\lib\site-packages\pyopengl-3.0.2a3-py2.6.egg\OpenGL\platform\baseplatform.py", > line 377, in __call__ > self.__name__, self.__name__, > NullFunctionError: Attempt to call an undefined function glEnable, > check for bool(glEnable) before calling > > Help? Thanks, > Ian That sounds like a failure in the platform module, that is, either it doesn't find the DLL, or finds the wrong DLL. The most likely cause there is the "64-bit" ness of the machine, as I don't have a 64-bit Windows machine on which to test/work... actually, scratch that, just realized that my server *did* come with a 64-bit Windows... just need to give up the server for an afternoon. My guess is that opengl32, glut32, glu32 are renamed to something like opengl64 or the like. Guess I should fire up Win64 and find out. OpenGL_accelerate is definitely going to be broken/MIA, as it requires compilation and I haven't done that for Win64 before. You could probably put a pdb call in platform/win32.py and figure it out before I get there (I'm going to have to pick up my son in a few minutes), but if not I'll try to get to it this afternoon. Thanks, Mike |