Jump to content
  • Advertisement
Sign in to follow this  
JClayton

D3DX Sprite - Quick Question

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

Is a D3DX Sprite rendered as a textured quad or just a bitmap stretch-rect? I want to know if they can be used with vertex shaders.

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Quad

Share this post


Link to post
Share on other sites
As the AP says, D3DX sprites are textured quads.

However by default sprites also set up all the state required for rendering in the ID3DXSprite::Begin() method.

This is likely to be a problem if you're intending on modifying their behavior with shaders; if this is the case, take a look in the SDK documentation at the D3DXSPRITE_DONOTMODIFY_RENDERSTATE and D3DXSPRITE_DONOTSAVESTATE flags for ID3DXSprite::Begin().

Alternatively, to be 100% sure, just make your own sprite type which creates a quad and renders with your shader.

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!