Re: DDS Texture Problem

Michael Gold <[email protected]> Thu, 04 Sep 2008 09:00:34 -0800
Newsgroups gmane.games.devel.opengl
Organization Fat City Network Services, San Diego, California
Message-ID <[email protected]>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content=3D"text/html;charset=3DUTF-8" http-equiv=3D"Content-Type"=
>
</head>
<body bgcolor=3D"#ffffff" text=3D"#003333">
<tt>The default value for GL_MIN_FILTER is GL_NEAREST_MIPMAP_LINEAR
which expects a mipmap.=C2=A0 If you supply only one level, the texture i=
s
"inconsistent" and texturing is disabled.=C2=A0 The fix is to set your mi=
n
filter to LINEAR or NEAREST:<br>
</tt>
<blockquote><tt>glTexParameteri(GL_TEXTURE_2D, GL_MIN_FILTER,
GL_LINEAR);</tt><br>
</blockquote>
<br>
<br>
<br>
<br>
Stephan Rose wrote:
<blockquote cite=3D"mid:[email protected]"
 type=3D"cite">
  <pre wrap=3D"">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.=20

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 =3D 0;
	glGenTextures(1, &amp;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
-----=20
FAQ and OpenGL Resources at:
  <a class=3D"moz-txt-link-freetext" href=3D"http://www.geocities.com/Sil=
iconValley/Hills/9956/OpenGL">http://www.geocities.com/SiliconValley/Hill=
s/9956/OpenGL</a>

  </pre>
</blockquote>
<br>
</body>
</html>
----- 
FAQ and OpenGL Resources at:
  http://www.geocities.com/SiliconValley/Hills/9956/OpenGL

-- 
Author: Michael Gold
  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).