Re: Querying OpenGL for Compressed Texture formats
JoN <[email protected]>
| Newsgroups | gmane.comp.python.opengl.devel |
|---|---|
| Message-ID | <[email protected]> |
Sorry I forgot to say, I've tried with glGetString() and it gives an 'invalid enum' error, hence the glGetInteger() instead. Jon Quoting JoN <[email protected]>: > > Hi, > > I'm trying to create a GL reporter in PyOpenGL to tell me what my OpenGL > install > can do. I'm particularly interested in compressed textures. > > I'm on Fedora Core 3 (yes yes I know, I got it to work but I'll upgrade to 5 > or > 6 someday soon) and running via GlX - though I am testing my code in parallel > at > home under Win32 as well. So far so good. > > The following is odd, or I am missing something, or both. > > If I do the following: > > print "NUM_COMPRESSED_TEXTURE_FORMATS: " + > str(glGetInteger(GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB)) > > I get an integer back (on the i915 chipset I tested on its 2), fair enough. > > > But when I run this: > > > comptexfmtlist=glGetInteger(OpenGL.GL.ARB.texture_compression.GL_COMPRESSED_TEXTURE_FORMATS_ARB) > print "COMPRESSED_TEXTURE_FORMATS: " + str(comptexfmtlist) > > > comptexfmtlist comes back as a list of integers, not strings. Strange. > Of course what I really want to get is the identifier strings, like for > example: > COMPRESSED_RGB_S3TC_DXT1_EXT > COMPRESSED_RGBA_S3TC_DXT3_EXT > COMPRESSED_RGBA_S3TC_DXT5_EXT > > etc.... > > I've found some constants by those names defined under site-packages in > OpenGL/GL/EXT/texture_compression_s3tc.py > OpenGL/GL/_3DFX/texture_compression_FXT1.py > > etc.... > > -but no actual strings. > > So I guess my question is - how best to use those integers that come back ? > Or are the strings hiding somewhere I can get them ? Or should I just query > each format individually for its existence (somehow) ? eg using glewpy > (somehow) ? > > Any enlightenment appreciated. > > > The imports I have are: > from OpenGL.GL import * > from OpenGL.GLUT import * > from OpenGL.GLU import * > import OpenGL.GL.ARB.texture_compression > from glew import * > > import time > import struct > import sys > from operator import * > from Image import * > > > Jon > > > -------------------------------------------------------------------- > Come and visit Web Prophets Website at http://www.webprophets.net.au > > > ------------------------------------------------------------------------- > 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-Devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/pyopengl-devel > -------------------------------------------------------------------- Come and visit Web Prophets Website at http://www.webprophets.net.au ------------------------------------------------------------------------- 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