Re: [PyOpenGL-Users] Enums from extensions
Brought to you by:
mcfletch
From: Gary M. <gar...@ph...> - 2006-10-18 23:11:12
|
Dear all, I've been interested in this kind of thing as well. I found that if I import the extension module then the functions and constants are named with a string appended. So for instance, I wanted to look at 3D textures so I imported OpenGL.GL.EXT.texture3D. The functions in this module all have EXT appended to the normal name while the constants have _EXT appended instead. I just assigned the extension versions of the functions and constants I required to the normal names: glTexImage3D = glTexImage3DEXT GL_TEXTURE_3D = GL_TEXTURE_3D_EXT This seems to do the job - at least I am able to use the functions and constants - but I have also got some strange results when translating an example from C to Python so I might have missed something! Any suggestions would be welcome! A bit of digging about seems to show that GL_DEPTH_COMPONENT24 is in OpenGL.GL.SGIX.depth_texture and is named GL_DEPTH_COMPONENT24_SGIX Cheers, Gary > I see in the documentation how I could import an extension and > initialize it, but how do I get the enums from an extension? For > example right now I would like to use GL_DEPTH_COMPONENT24 in my code > but I don't know how to get that from PyOpenGL. > > Any ideas? > > Also, this may have been asked before, but are there any plans to make > it easier to use the newer "extension" features of OpenGL? With the > dynamic nature of python it seems like it would be possible to have > PyOpenGL dynamically adapt it's interface to any given version of > OpenGL on the fly. For example asking PyOpenGL to present the > standard interface for OpenGL 2.0 it could go out and find any of the > needed extensions and name them like they are in the 2.0 spec. This > would be a great feature and would be unique to PyOpenGL since it > can't be done in C or C++. > > Thanks, > Allen > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > PyOpenGL Homepage > http://pyopengl.sourceforge.net > _______________________________________________ > PyOpenGL-Users mailing list > PyO...@li... > https://lists.sourceforge.net/lists/listinfo/pyopengl-users > > > |