• Advertisement
Sign in to follow this  

Sprite instancing, or an equivalent?

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

Hi there game developers.

I have an issue. Currently, I'm rendering a lot of interface stuff in a Direct3D application. I'm doing that through a single sprite, and a few texture objects. These texture-objects have to move all the time.

Currently, I'm just rendering them one by one, but I am sure there's a better approach to it. Is instancing possible for textures, to as an example make them rotate?

Share this post


Link to post
Share on other sites
Advertisement
why not just push them all into a vertexbuffer and use that? most UI's don't move around so you could just preload your buffers and use them when needed.

Share this post


Link to post
Share on other sites
How do I push a texture with a 2D image on to a vertex buffer? Isn't a vertex-buffer for 3D elements?

Share this post


Link to post
Share on other sites
Just set Z to 0 (and set your orthographic projection so that this is a valid Z value) and it'll work. 2D is just the same as 3D if you do that.

Share this post


Link to post
Share on other sites
Nice! A 100% increase in framerate.

However, now my spheres are looking weird.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement