Jump to content

View more

Image of the Day

雑魚は多めにして、爽快感重視にしつつ・・・(´・ω・`)
早いとこ、ベースを作って、完成にもっていかないとね。
タイトルもまだ迷ってるだよなぁ。 
#indiedev  #indiegame #screenshotsaturday https://t.co/IwVbswGrhe
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Texture file theory question

4: Adsense

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   

1173
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 greenpig83   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 MJP   Moderators   

19429
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   

1173
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.