Re: [PyOpenGL-Users] gluBuild3DMipmaps
Brought to you by:
mcfletch
From: Andrew W. <and...@al...> - 2007-02-11 00:16:35
|
Hello, Great hack, got it working no problem now. One side question, gluBuild3DMipmaps works without a hitch, but when I call bool(glTexImage3D) I get "False" back. glGetString(GL_VERSION) returns 2.0.1 so supposedly teximage3d is supported on gl > 1.2. Am I missing something here? Thanks Andrew On 2/9/07, Mike C. Fletcher <mcf...@vr...> wrote: > > Andrew Wilson wrote: > > Hello, > > I found a newer glu version compiled for win32. Unfortunately winxp > > has a file protection scheme that won't allow me to overwrite > > glu32.dll with the newer version. Is there a way to force pyopengl to > > use different dll's? > There is, though it feels a bit hacky and has AFAIK never been tested. > Here's an example where I make the GLU DLL a completely unrelated > library (so there will be no GLU functionality at all): > > >>> import ctypes > >>> glu = ctypes.CDLL( '/usr/lib/libFLAC.so' ) > >>> platform.GLU = glu > >>> from OpenGL.GLU import * > >>> gluGetString > <OpenGL.platform.gluGetString object at 0x2aaaabc82f10> > >>> gluGetString( GLU_VERSION ) > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File > "/var/pylive/src/OpenGL-dev/OpenGL-ctypes/OpenGL/platform/__init__.py", > line 186, in __call__ > self.__name__, self.__name__, > OpenGL.error.NullFunctionError: Attempt to call an undefined function > gluGetString, check for bool(gluGetString) before calling > > (You will need to use WinDLL, not CDLL for win32). You may want to use > OpenGL.platform.ctypesloader.loadLibrary( ctypes.windll, > path_to_your_library ) instead of the bald ctypes operations, as older > ctypes versions should be supported with that function. > > Good luck, > Mike > > > > > On 2/8/07, *Andrew Wilson* <and...@al... > > <mailto:and...@al...>> wrote: > > > > Hey Mike, > > You hit the nail on the head, my version of GLU is '1.2.2.0 > > <http://1.2.2.0> Microsoft Corporation'. This may be a silly > > question, is there any way to update glu to 1.3 on win32? > > Thanks > > Andrew > > > > -- > ________________________________________________ > Mike C. Fletcher > Designer, VR Plumber, Coder > http://www.vrplumber.com > http://blog.vrplumber.com > > |