Jump to content
  • Advertisement
Sign in to follow this  
ozkill

Is impossible to make DXT1 Render Target?

This topic is 2600 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. Sorry for my poor english.

I try to make Render Target for DXT1 format.

pD3DDevice->CreateTexture( 512, 512, 1, D3DUSAGE_RENDERTARGET, D3DFMT_DXT1, D3DPOOL_DEFAULT, &pTexture, NULL)

but It not work. show error message as:

Direct3D9: (ERROR) :Invalid format specified for texture


Is impossible to make DXT1 Render Target?
I want to save Render Target image to file as DXT1 format.
Waht can i do?

May the force be with you :-)

Share this post


Link to post
Share on other sites
Advertisement
It depends on your graphics card, but I'd be surprised if any graphics card supports a DXT format render target.

You can find out what render target formats the graphics card supports by looking at the caps viewer that comes with the SDK, or with IDirect3D9::CheckDeviceFormat:

D3DFORMAT adapterFormat = D3DFMT_X8R8G8B8; // Display mode format
D3DFORMAT rtFormat = D3DFMT_DXT1; // Render target format
if(FAILED(pD3D->CheckDeviceFormat(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, adapterFormat, D3DUSAGE_RENDERTARGET,
D3DRTYPE_SURFACE, rtFormat))
{
// Format not supported
}

Share this post


Link to post
Share on other sites
oops did a quick post and neaver show it work and then reposted sorry its late..

Share this post


Link to post
Share on other sites
Hi.

Do what Steve said and then create a render target(Supported type)then render your scene and next save that to a texture as a DXT1 texture.

Share this post


Link to post
Share on other sites
You can't render to DXT1 (or any other block compressed format) on any GPU. In DX10 and DX11 you can do the compression manually in a shader and then have the device treat it as block-compressed format when sampling, but that's about it.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!