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


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

Recommended Posts


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