Advertisement Jump to content
Sign in to follow this  

z-order of sprites and textures

This topic is 4876 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
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.

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, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!