 BachI'll Be BachPremium join:2002-02-16 Flint, MI Reviews:
·Comcast
| reply to me1212
Re: OpenGL ellipses with GL_TRIANGLE_FAN? Anyone know about them Since you are drawing in 2D, all objects have the same Z value. OpenGL still does depth checking even though everything is at the same depth. Consequently the larger ellipse has already drawn in the affected area and the circle gets ignored.
A couple ways to get around this:
1. Draw the smaller object (circle) first, then the ellipse.
or 2. Call glDepthFunc(GL_LEQUAL); once before you start any drawing. This will allow pixels at the same depth to be overwritten. |
|
 me1212 join:2008-11-20 Pleasant Hill, MO 1 edit | Never mind, I'm a derp who accidentally called swapbuffers after each function and that made it not work right. |
|
 BachI'll Be BachPremium join:2002-02-16 Flint, MI Reviews:
·Comcast
| Yeah, I'm a derp as well in the mis-advice I gave on the Z buffer. 
My test program had GL_DEPTH_TEST enabled, which is probably not the case in your program since it defaults to off. |
|
 me1212 join:2008-11-20 Pleasant Hill, MO | Its all good man, having the glDepthFunc(GL_LEQUAL); still in my program doesn't seem to be making a difference, plus now I know how to use it. I'm sure it will come in handy down the road. |
|