Jump to content
  • Advertisement
Sign in to follow this  
kubad

z-order of sprites and textures

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

Hello, I'm sorry if this is a basic question, but I cannot figure out drawing priority of sprites, textures and meshes in DirectX 9.0c. Is it possible to have a sprite below texture, or mesh (I am using D3DXCreateText for 3d texts) above sprite ? Or sprites are always above textures and meshes ? (this is how it works for me) thanks in advance, Cube

Share this post


Link to post
Share on other sites
Advertisement
Hi there kubad,
How are you doing buddy?

The Problem
Rendering of textures/sprites/meshes.

The Solution
Normall you would render your furthest objects and objects without blending first. So this means your solid objects.
Then you would render your objects that have transparency etc... so that you may view the solid objects through them.

You may render sprites anyway you want as long as you stick to the above mentioned.
So.

1) Sort your objects from farthest to nearest.
2) Sort the objects from solid to transparent.
3) Render lists.

This will make your solid and farthest objects render first and also take into consideration your transparent objects.

I hope this helps.

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!