Jump to content
  • Advertisement
Sign in to follow this  
Migi0027

DX11 DX11 - Sending Textures

This topic is 1909 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 guys! laugh.png

 

So, this has always bugged me, and I never actually found out the final answer, about sending textures in directx 11, using c++.

 

Question: Do you only send the texture one time per runtime, or once per frame (I do the last) ?

 

Ba dum tss! That's it!

 

Thank You

Share this post


Link to post
Share on other sites
Advertisement

I've read somewhere in this forum that constantly binding the texture every frame even if it doesn't change takes some performance hit i think.

 

In Jason Zink's graphics engine, his graphics pipeline layer has a state monitoring system that defers the actual binding of GPU resources until the time that's actually needed. The graphics pipeline layer allows the cpu code to bind and change as many resources as it wants in the current frame through caching the resources to be bound then evaluating it when its time to draw the mesh. Once the cpu calls DrawIndexed, the state monitoring system checks the cpu bounded resource and the actual resource that is currently bound in the gpu; It only binds the resource to the GPU if the state monitor detects different cached and GPU bound resources and binds those cached resources.

Edited by BrentChua

Share this post


Link to post
Share on other sites

You probably LOAD the texture once on the gpu. and probably BIND it to some slot once per frame.

This. When you create the texture and provide the texture data, that data is normally stored directly in GPU memory and will stay there until you release it. Binding textures to a shader stage is just a mechanism for letting shaders know which textures to use.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!