DDS Texture Problem
Stephan Rose <[email protected]> Thu, 04 Sep 2008 08:25:25 -0800
| Newsgroups | gmane.games.devel.opengl |
|---|---|
| Organization | Fat City Network Services, San Diego, California |
| Message-ID | <[email protected]> |
Hi all,
I am trying to load a DDS Texture and I'm running into a weird problem I just can't explain.
The texture is a simple DXT1 texture with no mipmaps. However when I load the texture all I get is a pure white texture.
The function that creates the texture after the data has been loaded from the DDS file is below:
Texture Texture::fromMemoryDXT1(const char* data, int width, int height, int dataLength)
{
unsigned int id = 0;
glGenTextures(1, &id);
glBindTexture(GL_TEXTURE_2D, id);
glCompressedTexImage2DARB(GL_TEXTURE_2D, 0, GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, width, height, 0, dataLength, data);
return Texture(id, width, height);
}
Is there anything I'm doing wrong?
Video hardware is a 8800GTX so support for DXT1 shouldn't be an issue.
Thanks,
Stephan
-----
FAQ and OpenGL Resources at:
http://www.geocities.com/SiliconValley/Hills/9956/OpenGL
--
Author: Stephan Rose
INET: [email protected]
Fat City Hosting, San Diego, California -- http://www.fatcity.com
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [email protected] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB OPENGL-GAMEDEV-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).