problem loadeing textures in Linux

I’m having trouble loading my DDS textures into my app. It works just fine on my mac, but in Ubuntu it fails.

This is what I get on my mac when I load a DDS texture and a PNG texture:

And this is what I get in Ubuntu:

The DDS loading class that I used was by Andreas Jonsson, at the bottom of this page: http://www.codesampler.com/usersrc/usersrc-7.htm. I am getting an “invalid enum” error from glCompressedTex2d (only in Linux, not on my Mac), which is supposed to mean that 1) internalformat is one of the generic compressed internal formats, or 2) target is not set to GL_TEXTURE_2D. Neither of these are true.

Here is the app that made the screenshots above.
testApp.h
testApp.cpp
dds.cpp
dds.h

Here is the entire OF app:
http://stuff.jeffcrouse.info/ddsTest.zip

I have a bunch of tests at the top like:

  
cout << (const char*)glGetString(GL_VERSION) << endl;  
cout << (const char*)glGetString( GL_COMPRESSED_TEXTURE_FORMATS ) << endl;  
cout << (const char*)glGetString( GL_NUM_COMPRESSED_TEXTURE_FORMATS ) << endl;  
  

Which gives me:

  
1.4 (2.1 Mesa 7.0.3-rc2)  
GL_EXT_texture_compression_dxt1  
GL_EXT_texture_compression_s3tc  

Accorting to these tests, my system should be able to load the compressed textures, right? What’s weird is, here is my glxinfo in Ubuntu: http://stuff.jeffcrouse.info/glxinfo.txt I don’t see the “GL_EXT_texture_compression_dxt1” or “GL_EXT_texture_compression_s3tc” in there, whereas in my Mac glxinfo (http://stuff.jeffcrouse.info/glxinfo-mac.txt), it does list GL_EXT_texture_compression_dxt1 and GL_EXT_texture_compression_s3tc.

Any help would be greatly appreciated.

Hi

I get a similar result when I try to use fbo. I thought it was my card but it’s strange since it’s a nvidia, supports shaders…

I think it should be a problem with the linux driver. Is yours a nvidia too?

Hi, I tried this code and it works for me…
Let me know if you need more info or testing.
I’m using a GeForce 7800 GTX/PCI/SSE2 using nvidia driver NVIDIA 173.14.12 on Ubuntu 8.04

screen shot:

glxinfo is the definitive answer to whether your opengl driver can support an extension…
I would suggest you install the closed source nvidia driver instead of using the MESA one and try that…

Hi,

Thanks for the info and source code about DDS texture.
I’m trying to find a DDS converter for Mac. Would you know one ?
I found photoshop plugins installer, and standalone tools but just for windows.

Thanks

//h

in ubuntu there’s a gimp-dds package so i suppose there should be a build of this plugin for gimp under mac os x too.

Thanks Arturo.

I also found Aorta, and Squish.

More info http://forum.openframeworks.cc/t/display-400-images-at-the-same-time/2537/11.