Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

d000hg

How do I know what I can do?

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

You can easily extract from d3d how many streams, simultaneous and texture blend stages are supported on a given card. For instance my GF2 supports 8 texture blend ops and 2 simultaneous textures, which suggests I can use 2 textures in a single pass. Easy. But the GF4 reports 4 simultaneous textures, and I''m sure in DoomIII they''re using like 7 textures at once in a single pass on the top cards ie GF3/4. How is this accomplished? John 3:16

Share this post


Link to post
Share on other sites
Advertisement
When your application starts up you try setting each of the setups (texture stage states, renderstates, vertex shaders, texture formats etc) you're going to be using in the whole application - testing each set up with ValidateDevice() - if the call fails you try an alternative setup.

This is also much of the what D3DX Effects & Techniques aee intended to solve.

So for example if I knew I'd have some glowing stuff, some alpha test stuff, some opaque stuff, some foggy opaque stuff I'd do something like:


for (j=0; j<numberOfMethodsIKnowForGlowingEffects; ++j)
{
SetRS(), SetTSS(), SetTexture() for glowing effect
if (SUCCEEDED(ValidateDevice())
break;
}

for (j=0; j<numberOfMethodsIKnowForAlphaTestEffects; ++j)
{
SetRS(), SetTSS(), SetTexture() for alpha test effect
if (SUCCEEDED(ValidateDevice())
break;
}

for (j=0; j<numberOfMethodsIKnowForGlowingEffects; ++j)
{
SetRS(), SetTSS(), SetTexture() for glowing effect
if (SUCCEEDED(ValidateDevice())
break;
}
...
for (j=0;j<numberOfMethodsIKnowForFoggyOpaqueEffects; ++j)
{
SetRS(), SetTSS(), SetTexture() for foggy opaque effect
if (SUCCEEDED(ValidateDevice())
break;
}



Without having millions of caps flags (which would be too tedious to test as well as a massive pain for MS and the IHVs), there's no way other than ValidateDevice for hardware to expose all the exact combinations of states and texture formats its capable of.

[edit: lt for less than signs]

--
Simon O'Connor
Creative Asylum Ltd
www.creative-asylum.com

[edited by - s1ca on July 15, 2002 6:41:36 PM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!