entitys and sprite drawing

Started by
2 comments, last by Steve00000 14 years, 7 months ago
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]
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

Sincerely,Randy Trulsonwww.NeuronGames.com
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.
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]

This topic is closed to new replies.

Advertisement