Jump to content

  • Log In with Google      Sign In   
  • Create Account


Question about Efficiency & device check


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 zonozz   Members   -  Reputation: 158

Like
0Likes
Like

Posted 02 March 2013 - 08:45 AM

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.



Sponsor:

#2 Seabolt   Members   -  Reputation: 609

Like
1Likes
Like

Posted 02 March 2013 - 09:58 AM

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.


Perception is when one imagination clashes with another

#3 Yourself   Crossbones+   -  Reputation: 961

Like
1Likes
Like

Posted 02 March 2013 - 10:24 AM

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)



#4 zonozz   Members   -  Reputation: 158

Like
0Likes
Like

Posted 02 March 2013 - 11:01 AM

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.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS