site Search:


 
    All Forums Hot Topics Gallery






how-to block ads


 
Search Topic:
Share Topic
Posting?
Post a:
Post a:
Links: ·How To Get Noticed ·Web Monks FAQ ·Webhosting FAQ ·Posting Code ·How To Post ·Webhosting forum
AuthorAll Replies


Bach
I'll Be Bach
Premium
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.



Bach
I'll Be Bach
Premium
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.


Sunday, 19-May 03:35:16 Terms of Use & Privacy | feedback | contact | Hosting by nac.net - DSL,Hosting & Co-lo
over 13.5 years online © 1999-2013 dslreports.com.
Most commented news this week
Hot Topics