Jump to content
  • Advertisement
Sign in to follow this  
Steve00000

entitys and sprite drawing

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

So in my engine I have a class and its purpose is to manage entitys, its called entitymanager. Anyways each entity has a D3DX10_SPRITE stuct and this is my problem so I'v come to u to ask what you think. The sprite drawing method in directx 10 calls for an array of this sprite structure so I'm wondering if an array should be built upon with with the sprite structures when an entity is created or its sprite is changed. Perhaps each entity can call drawspritesimmediate (which i dont know) but that maybe be less performance smart since function overead can cause drag if its a big function. anyways thanks for input [Edited by - Steve00000 on September 10, 2009 10:57:32 AM]

Share this post


Link to post
Share on other sites
Advertisement
I ditched trying to do the D3D stuff and went with making my own sprite class that blits to a 2DTexture. Fast simple and does a nice job. Not to mention I can manage my own frames that are on a texture with frames from other sprites. Saves on video memory. I hope I have been helpfull

Share this post


Link to post
Share on other sites
I haven't actually used ID3DX10Sprite, but it looks to me like you could just keep calling DrawSpritesBuffered and only pass one D3DX10_SPRITE at a time rather than building a big array of them.

Share this post


Link to post
Share on other sites
Thanks for the ideas, I know nothing about bliting so i went with the draw sprite buffered idea and so far thats working pretty well, again thanks.

[Edited by - Steve00000 on September 10, 2009 5:56:18 PM]

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!