Jump to content

  • Log In with Google      Sign In   
  • Create Account

Texture file theory question


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   Members   

1080
Like
0Likes
Like

Posted 16 February 2014 - 03:23 AM

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 :)


Win32 Developer
One Of Them - Martial arts game that is mid development.

#2   Members   

330
Like
1Likes
Like

Posted 16 February 2014 - 05:09 AM

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!



#3   Moderators   

18235
Like
1Likes
Like

Posted 16 February 2014 - 02:19 PM

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.



#4   Members   

1080
Like
0Likes
Like

Posted 16 February 2014 - 03:06 PM

Awesome. Pretty much how I understood it then.

 

Thanks guys!

 

(voted up)  :)


Win32 Developer
One Of Them - Martial arts game that is mid development.




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.