Jump to content
  • Advertisement
Sign in to follow this  
Mathy

Sprite instancing, or an equivalent?

This topic is 3018 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
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!