Polygon Offset Fill implementation example code

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Polygon Offset Fill implementation example code

Martin
Hi everyone,

As said recently, I am working on a pure java implementation of OpenGL 1.

I am missing glPolygonOffsetFill and am looking for an example implementation in java, c/c++ example of this GL function in order to integrate it in jGL.

Would anyone suggest a direction?

Thanks,

Martin
Reply | Threaded
Open this post in threaded view
|

Re: Polygon Offset Fill implementation example code

Martin
I was finally able to workaround this by using glDepthRange instead

// Draw underlying geometry
glDepthRange (0.1, 1.0);  
drawPolygonFace();

// Draw overlying geometry
glDepthRange (0.0, 0.9);
drawPolygonWireframe();

This deals with the need to draw coplanar geometries.

More details here : https://github.com/jzy3d/jGL/issues/3