Skip to content

Linked Wireframe

theproadam edited this page Apr 24, 2020 · 3 revisions

Sometimes it is nice to have a wireframe outline for an object. This can normally be done by first drawing your object, and then its wireframe, however this results in world space to screenspace transforms being done twice. For this reason, linked wireframe exists.

Linked wireframe draws a wireframe after all the primary drawing has been done. It uses the existing screenspace data to draw the wireframe.

Enabling linked wireframe

To enable linked wireframe, use the SetLinkedWireframe() function from the renderX instance.

GL.SetLinkedWireframe(true, R, G, B);    

Depth offset

To prevent z fighting and draw the wireframe partially over the a solid object, use SetWireFrameOFFSET() from the renderX instance to set a z-offset value.

GL.SetWireFrameOFFSET(offsetValue);