Game Development Community

circles and dgl.cc

by Ryan "check" Olson · in Torque Game Engine · 03/28/2002 (9:17 pm) · 1 replies

Hey guys, got a lil OpenGL related question here...

Suppose I wanted to create a way to draw circular GUI objects as opposed to the rectangular ones that are dominate throughout the engine. Since every guiXXXCtrl that takes a box-like form seems to use some variation of dglDrawRect() to create the basic shape I thought I might as well create dglDrawCircle().

My knowledge of OpenGL is basic at best, but it seems I've pretty much got my code done. I was a bit curious if anyone has a better idea than mine? ie. a way to achieve a circular effect in say... A guiWindowCtrl!.. Or whatever.

Regardless of the intuitiveness of my idea, I'm kinda proud of my little OpenGL hackjob seeing as how the last time I did anything in the API was when I made a bouncing square with code copied from an example in my "OpenGL SuperBible" I picked up on the bargain rack at CompUSA (:

#1
05/10/2003 (6:41 am)
care to share your code? I'm wanting to create a circle gui object as well and i figure, why reinvent the wheel? (or circle in this case). thanks.