I’m trying to load pre-compressed textures from disk using the GL_COMPRESSED_RGBA_S3TC_DXT3_EXT format for the texture. Building a PEF executable (linking against the OpenGLLibrary lib), my code works fine, however the identical code, when linked against the equivalent Mach-o framework (AGL) doesn’t work, it just produces a white rectangle when I draw the texture (no other compressed formats work either as far as I can see).
Everything else works fine (all other functions, including extensions, produce the expected results). Is there a bug in the Mach-o implementation of this function? If so, is there any other way I can link to this function in Mach-o, since presumably some people manage to use it ok, without being forced to build PEF apps.
Thanks for the suggestions, but I’m not getting any error from glGetError.
I know the image format is ok because it works in PEF builds. It just seems as if the glCompressedTexImage2D function doesn’t do anything in Mach-o.
The problem may be unrelated to the function itself though. I’ve tried dynamically loading the function at runtime from both PEF and Mach-o builds, including loading the Mach-o framework from within the PEF build, using appropriate glue code, and loading the PEF version of the library from the Mach-o build. Regardless of what I do, the PEF build works, and the Mach-o build produces a white square - the same effect as if I don’t call the function at all.
Versions of Mac OS below 10.3.0, including 8.6 and 9, incorrectly treat the default min filter as “NEAREST_MIPMAP_LINEAR if mipmaps are specified, LINEAR if they aren’t”. Mac OS X 10.3 fixed this bug, but I guess they put a special case in to let old CFM apps continue working.
In order to check that the texture has been compressed.
Also you should use the Generic Compressed Internal Types GL_COMPRESSED_RGB_ARB or GL_COMPRESSED_RGB_ARB, - Although it seems to not works correctly on my Powerbook -
Finally, GL_COMPRESSED_RGB_S3TC_DXT5_EXT should be used only if GL_ext_compression_s3tc exposed, although this extension is NOT defined on my machine, but seems to works as well … Go figure …
Your web page with extensions on MacOS X is quite interesting - I’ve done a similar tool for extracting extensions - I’ve done a OSX version, but an updated version should come soon. I have also a Cocoa version, with the same user interface, but lacking some time to finish it, but if someone is interested …)
Could be fine if you can test the glGetIntegerv with the list of supported texture format, just to be sure that it works.
I think that OSC has sufficiently answered the original question, so the rest of this is going off-topic.
However, you are correct! I get similar results on Radeon9600: 83f3, 90001054, 0. This is definitely wrong, I’ve logged #3806869 about it.
This doesn’t prevent you from using compressed textures though; since all of the current OS X renders that support compressed textures only support one specific compression extension (s3tc) and that extension defines DXT1, DXT3, DXT5. So if you’ve got the ARB_texture_compression extension, those are the only formats you can use. Of course, this might change in the future…
Yes I noticed that, this was fixed as well on my Geforce4MX.
There is still some others bugs in 10.3.6, but things gets better.
A bit off topic, but remaining bugs I’ve noticed in 10.3.6:
Still some issues with ARB_vertex_program:
Rendering random coordinates polygons under some circumstances - very scary and annoying. Easily reproducible and no workaround I could find.
having several problems with fog + ARB_vertex_program, Especially if you have multiple object sharing the same vertex program, the other objects are rendered ‘white’, like the front color what initialized with the fog coordinate only. Else the fog + vertex program seems to work fine.
if you have a vertex program that computes texture coordinates (like env mapping or other), you HAVE to write 1.0 into the .w texture component - This is not required in an hardware implementation, however It can be workarounded.
Some problems when handling ‘nested’ pbuffers. like:
PBuffer1: rendering a scene into it
PBuffer2: rendering a quad with the texture from PBuffer1
Rendering a quad with texture from PBuffer2 on screen. : It does nothing.