Use of GLPainter::drawShadedQuadrilateral

Hi list,

I’m writing an engine and I want to draw a translucent shaded
quadrilateral with it. I’ve been unable to do this using the Painter
API using drawShadedQuadrilateral, but I can’t figure out where I’m
going wrong. I’ve put up a simple failing test engine here:

https://github.com/dlonie/avogadro/commit/320c06e5342c35f97b1c5fd81bb539d40ca5fe5d

I add the engine in Avogadro, but the quadrilateral never appears.
I’ve also tried adding the glEnable/Disable bits that are used in the
bond centric tool implementation around the drawShadedQuadrilateral
call, but it doesn’t help in the engine.

Am I missing something?

Thanks,
Dave

API using drawShadedQuadrilateral, but I can’t figure out where I’m
going wrong. I’ve put up a simple failing test engine here:

https://github.com/dlonie/avogadro/commit/320c06e5342c35f97b1c5fd81bb539d40ca5fe5d

Try a different “winding.” (Heck, just try the opposite order of points.)

http://www.opengl.org/sdk/docs/man/xhtml/glFrontFace.xml

-Geoff

On Mon, May 23, 2011 at 11:22 AM, Geoffrey Hutchison
geoff.hutchison@gmail.com wrote:

API using drawShadedQuadrilateral, but I can’t figure out where I’m
going wrong. I’ve put up a simple failing test engine here:

https://github.com/dlonie/avogadro/commit/320c06e5342c35f97b1c5fd81bb539d40ca5fe5d

Try a different “winding.” (Heck, just try the opposite order of points.)

http://www.opengl.org/sdk/docs/man/xhtml/glFrontFace.xml

I’ve rotated the view all over and it never appears (if the winding
was reversed with face culling on, it should appear from some angle).
The winding shouldn’t matter AIUI, since face culling is disabled in
GLPainter’s implementation of this method. I’ve checked the point
ordering and it is appropriate for a triangle fan, too. I’m really at
a loss as to why this doesn’t work :-/

Dave