Sign in to follow this  
zonozz

Question about Efficiency & device check

Recommended Posts

zonozz    169

Hi everyone !

 

Question about Device Check -

 

       I'm now doing multi-texture , I create class texture sequence for multi-texture blending, and I want to check what's the max number the device can make blending one time ? how to do that ? 

 

Question about Efficiency -

 

       Eh. another question is about data structure( algorithms ) in engine, I just use MyVector, which is I study C++ STL practicing stuff, for saving variety of resources in engine, like models/Text/etc. Should I consider more careful in data structure for resources saving ? I think it may be affect engine's operational efficiency.

 

Please make some comments about this module, I will very thankful.

Share this post


Link to post
Share on other sites
Seabolt    781

If you're using DirectX 9, you can query the maximum amount of concurrent samplers by using this function, and checking the "MaxSimultaneousTextures" value of the D3DCAPS9 class you receive. 

 

If you're using DirectX 11, I believe it's 128 but I forget how to query it.

As far as the std::vector goes, it's a big debate. The std::vector is fantastic at it's job, in that it takes care of all the copying you have to worry about, even with objects that use constructors and destructors. But it's also very expensive for that reason. So it really depends on how often that is necessary for you.

Share this post


Link to post
Share on other sites
zonozz    169

If you're using DirectX 9, you can query the maximum amount of concurrent samplers by using this function, and checking the "MaxSimultaneousTextures" value of the D3DCAPS9 class you receive. 

 

If you're using DirectX 11, I believe it's 128 but I forget how to query it.

As far as the std::vector goes, it's a big debate. The std::vector is fantastic at it's job, in that it takes care of all the copying you have to worry about, even with objects that use constructors and destructors. But it's also very expensive for that reason. So it really depends on how often that is necessary for you.

 

 

If you're using DirectX 11, I believe it's 128 but I forget how to query it.

there is a define called D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT (indeed 128)

 

Thank you guys, I will collect more experience, and try to read some open source engines code, and then make decision.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this