Jump to content
  • Advertisement
Sign in to follow this  
GambitSnax

Texture CAPS checking

This topic is 4130 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

I've setup my program so it tests for each of the texture states used within the program. For instance, if my program used a shader with a sampler_state of this definition - sampler TextureTri = sampler_state { Texture = <g_texture>; MinFilter = LINEAR; MagFilter = LINEAR; MipFilter = LINEAR; AddressU = CLAMP; AddressV = CLAMP; }; i would test the caps for each of the settings -
    static DWORD dwTextureFilterCaps =  D3DPTFILTERCAPS_MINFLINEAR |
                                        D3DPTFILTERCAPS_MIPFLINEAR |
                                        D3DPTFILTERCAPS_MAGFLINEAR;

    // check support for the each sampler state mode used in the shader
    if ((pCaps->TextureFilterCaps & dwTextureFilterCaps) != dwTextureFilterCaps)
        return false;

is this the correct approach? The reason I ask is, one of my shaders uses a texture which has - MagFilter = ANISOTROPIC. Before I put the check in for it - D3DPTFILTERCAPS_MAGFANISOTROPIC, the program ran fine(it ran on a HAL device). When I did put the check in however, my computer said it doesn't support that feature and I have to run it with a REF device. I'm confused as to why it does this. If the program ran fine before, did that mean it wasn't running in true MagFilter = ANISOTROPIC mode? I tried it on a friends computer and without the checks, it just dies saying the features aren't supported, and with them, it only runs in REF mode. Any suggestions would be great. Cheers.

Share this post


Link to post
Share on other sites
Advertisement
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!