• Advertisement
Sign in to follow this  

Texture file theory question

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

With functions like D3DXCreateTextureFromFile() and the likes, does this effectively create a new texture page for each call?

 

I am planning on creating only a few texture files and have each sprite etc.. drawn from this, having each frame on the one bitmap image. Would doing this be more efficent for the graphics card or does it not really make a difference?

 

Thanks in advance :)

Share this post


Link to post
Share on other sites
Advertisement

D3DXCreateTextureFromFile Create a new texture from a file on disk for u. And load it into your GPU!

After created u can use it freely! until u release it!

It seems that u want to use it for your 2d project! with d3dxSprite. It's adviced to use texture atlas, group many sprite into 1 texture for performance!

Share this post


Link to post
Share on other sites

If you were to put multiple frames of a sprite onto the same texture, then you can potentially make rendering of many instances of that sprite more efficient since you'll have to change textures less often. But honestly, it's probably not going to matter unless you get into the range of > 1000 draw calls. So I would just go ahead and do whatever is easiest.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement