Hello,
I’m trying to draw a 50x50 circle (with a transparent background) using glDrawPixels(). There’s nothing in the Red Book that shows how I can do this. Any ideas?
thanks.
Hello,
I’m trying to draw a 50x50 circle (with a transparent background) using glDrawPixels(). There’s nothing in the Red Book that shows how I can do this. Any ideas?
thanks.
With a fiew maths and an orthographic view simply apply the circle maths equation.
Hmmm, why use glDrawPixels ? and if you are then I assume you already have your circle some where in a buffer and want to draw it ? then just have a look at the documentation for glDrawPixels.
glDrawPixels
The alpha value in your buffer is used for transparent pixels.
If you need help with the actual circle I suggest that you dig up your old math book from school and have a peek, you might even find it in the documentation for cos() and sin() functions.
But I would suggest you render the circle with glBegin( GL_LINE_STRIP) instead.
Mikael