Posts

Showing posts from September, 2013

Solid-wireframe model using OpenGL/Direct3D

Image
Depth bias not be supported on line and point mode.  In solid wireframe , we should enable polygon offset on solid model first, and then disable polygon offset on wireframe model. OpenGL: glEnable( GL_POLYGON_OFFSET_FILL ); glPolygonOffset( bias, 1 ); glDisable( GL_POLYGON_OFFSET_FILL ); D3D: device->SetRenderState( D3DRS_DEPTHBIAS, (DWORD)bias ); device ->SetRenderState( D3DRS_DEPTHBIAS, (DWORD)0 ); Reference: http://msdn.microsoft.com/en-us/library/windows/desktop/bb205599(v=vs.85).aspx http://lwjgl.org/forum/index.php?topic=1162.0;wap2