Jump to content
  • Advertisement
Sign in to follow this  
Balk

[c++ DX9] Procedurally draw filled/line shapes

This topic is 2614 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 haven't been able to find any good way to render filled shapes in DirectX9... I have a 2D engine currently utilizing the ID3DXSprite interface but I now need the ability to draw procedural graphics such as rounded rectangles, lines, and circles.

I've tried ID3DXLine... but I can't fill the shapes I create

I've tried Direct2D... but that isn't supported on XP, which is my target platform.

I'd prefer hardware accelerated gfx, but I've tried messing with GDI as another option. I wasn't sure how to tie it into my current render loop since I don't use WM_PAINT. I would need to be able to layer GDI drawing calls beneath and above some ID3DXSprite begin/end calls which should be possible right?

My last option would be to render orthographic polygons to the screen to make my desired shapes. I tried messing with this briefly using DrawPrimitiveUp(), but it would always render behind my ID3DXSprites regardless of the 'Z' value I gave it. What's a better approach to this method? One that I can specify already transformed coordinates (screen/pixel coordinates)?

Thanks, for any help!

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net 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!