• Advertisement

Archived

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

Can i draw simple graphics (like circles and lines) in DX8?

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

in D3D i mean... because using win32api is preety slow (from 100 fps to 40) [edited by - ilankt on August 10, 2003 11:41:54 AM]

Share this post


Link to post
Share on other sites
Advertisement
Yep.

Easily? Kinda.

No, you don''t have your simple "DrawCircle" functions but you can create your own using line lists. So if you wanted to draw a circle, use a circle algorithm and generate a list of points or lines to be rendered. Then render them. Mose of the time you''ll find that you can approximate it with lines and not get pixel-perfect circles.

---
Brent Gunning | My Site

Share this post


Link to post
Share on other sites
so you tell me i need to create a function, that draw with DrawPrimitive?
hmm...
maybe i will use sprites

Share this post


Link to post
Share on other sites
The feature set of Direct3D is generally driven by what''s supported in hardware by consumer 3D graphics cards. The majority ONLY do triangles, definately not fancy shapes like circles*.

D3DX contains a few 3D shape primitives that are rendered using triangles.

The thing to do is either, as RapidStunna suggested, make things like circles out of multiple points and triangles OR alternatively use textured quads where the texture contains the shape. You can use alpha test to cut out the shape from the texture.


[* the nVidia NV1 did, but that feature was dropped in later cards]

--
Simon O''Connor
ex -Creative Asylum
Programmer &
Microsoft MVP

Share this post


Link to post
Share on other sites

  • Advertisement