Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualTispe

Posted 09 October 2012 - 04:43 AM

Hi

I have a IDirect3DTexture9 texture created in DXT3 and I copy raw compressed data to it from memory. I only have one surface level and need to generate mipmaps. Since GenerateMipSubLevels() does not work on compressed textures in hardware I need to do it on a D3DFMT_A8R8G8B8 texture.

What methods are there for converting a IDirect3DTexture9 texture in DXTn to another IDirect3DTexture9 texture in D3DFMT_A8R8G8B8?

I'd like to implement a simple function like this:
bool ConvertTextureDTXnToARGB(LPDIRECT3DTEXTURE9 pTexture)
{
//Same resource is used, only altered
}

or

bool ConvertTextureDTXnToARGB(LPDIRECT3DTEXTURE9 pSrcTexture, LPDIRECT3DTEXTURE9 pDstTexture)
{
//copy data from one to the other, uncompressing between
}


Any tips?

#1Tispe

Posted 09 October 2012 - 04:06 AM

Hi

I have a IDirect3DTexture9 texture created in DXT3 and I copy raw compressed data to it from memory. I only have one surface level and need to generate mipmaps. Since GenerateMipSubLevels() does not work on compressed textures in hardware I need to do it on a D3DFMT_A8R8G8B8 texture.

What methods are there for converting a IDirect3DTexture9 texture in DXTn to another IDirect3DTexture9 texture in D3DFMT_A8R8G8B8?

I'd like to implement a simple function like this:
bool ConvertTextureDTXnToARGB(LPDIRECT3DTEXTURE9 pTexture)
{
//Same resource is used, only altered
}

or

bool ConvertTextureDTXnToARGB(LPDIRECT3DTEXTURE9 pSrcTexture, LPDIRECT3DTEXTURE9 pDstTexture)
{
//copy date from one to the other, uncompressing between
}


Any tips?

PARTNERS