Jump to content
  • Advertisement
Sign in to follow this  

glCompressedTexImage3D strange behavior

This topic is 3165 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi everyone, I have a problem using a compressed DDS 3D image. Here is the code I use :
// Create the texture
glGenTextures( 1, &axID ) ;
glBindTexture( GL_TEXTURE_3D, axID );
// Linear Filtering
// Limit texture coordinates to [0;1]

// Load the image
int vW = axWidth = pData->mWidth ;
int vH = axHeight = pData->mHeight ;
glCompressedTexImage3D(	GL_TEXTURE_3D,
				pData->mpPixels ) ;

GLenum vError = glGetError() ;
if( vError )
	string vErr = (char*)gluErrorString( vError ) ;
	delete pData ;
	return false ;

What I get when I display the image into a plane is a strange image, which is actually the good one but that is reduced by 4... I can see 16 small pictures instead of 1 big. Could it be a mipmap problem, since in the header of the DDS file the mipmap level is set to 0 ? EDIT : This should be a mipmap problem since the flag DDSD_MIPMAPCOUNT is not set in the DDSURFACEDESC2 header of the DDS file... so I guess I have 4 mipmaps, but how do I calculate the size taken by each ???

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!