Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
I am developing plugin for Creo 3.0 and we have problem with Z-Buffer. What we want is to draw lines and have Z-Buffer enabled. I don´t know how to achieve this point. I am using: wSession->DrawPolyline(pnts); to draw points. Could anyone tell me how to enable z-buffer in Creo API? Thanks in advance, Grzegorz

The z-buffer is handled by the OpenGL or Direct3D pipeline. The z-buffer is always enabled, which is why the shaded model can be spun around. It's probable the lines are not being run through the fragment routines the triangles are, so they aren't assigned a depth to use in the z-buffer.
If you use surfaces instead of lines you will get automatic occlusion.
