Re: Setting Up on New Machine

"Mike C. Fletcher" <[email protected]>
Newsgroups gmane.comp.python.opengl.user
Message-ID <[email protected]>
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


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.