Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

nPawn

What changed with ID3DXSprite in the summer update?

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

I noticed my Draw calls failed after updating to the latest DX SDK, and they started working again after I added a Begin and End call around the Draw. But now my Sprite appears on top of everything, even if I draw it first and draw stuff over it. Before, I''d draw my sprites, -then- my 3D objects, and the sprites would be in the background underneath, but that''s no longer the case, is that ability gone? Is there some flag I can put in the Begin call to make the sprite be on bottom again?

Share this post


Link to post
Share on other sites
Advertisement
The changes to D3DXSprite in the Summer Update were quite extensive, and made it a bucketload faster.

What you''re hitting is a z-ordering problem; your sprites are being drawn with a specific z-index which is less than the rest of your scene. (I don''t know why it was working before the update).

You''ve got two choices, really:
1) Turn of z-writing with D3DRS_ZENABLE,
2) Change the position of the sprites to have a high-zvalue.

Either of those should allow other things to draw over the sprites.

Share this post


Link to post
Share on other sites
quote:
Original post by superpig
The changes to D3DXSprite in the Summer Update were quite extensive, and made it a bucketload faster.

What you''re hitting is a z-ordering problem; your sprites are being drawn with a specific z-index which is less than the rest of your scene. (I don''t know why it was working before the update).

You''ve got two choices, really:
1) Turn of z-writing with D3DRS_ZENABLE,
2) Change the position of the sprites to have a high-zvalue.

Either of those should allow other things to draw over the sprites.


Well, you don''t turn off only z-writing. You disable depth buffering.
To turn off z-writing only, D3DRS_ZWRITEENABLE.

--
You''re Welcome,
Rick Wong
- Google | Google for GameDev.net | GameDev.net''s DirectX FAQ. (not as cool as the Graphics and Theory FAQ)

Share this post


Link to post
Share on other sites

  • 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!