Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


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 DarkRonin   Members   -  Reputation: 636

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



Sponsor:

#2 greenpig83   Members   -  Reputation: 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 MJP   Moderators   -  Reputation: 13067

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 DarkRonin   Members   -  Reputation: 636

Like
0Likes
Like

Posted 16 February 2014 - 03:06 PM

Awesome. Pretty much how I understood it then.

 

Thanks guys!

 

(voted up)  :)






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