Hi,
I am trying to implement a two-pass silhouette algorithm with Opengl ES. But I found a big trouble is that in ES the glPolygonMode is not supported. So, in the original silhouette algorithm that works with OpenGL (code attached below), what can I use to replace glPolygonMode() here so that this piece of code can work with OpenGL ES? Thanks.
// Render front-facing polygons into depth buffer only
glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
glCullFace(GL_BACK);
glEnable(GL_CULL_FACE);
glDepthMask(GL_TRUE);
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);
drawMesh();
//Render back-face polygons in wireframe
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
glPolygonOffset(1, 1);
glEnable(GL_POLYGON_OFFSET_LINE);
[b]glPolygonMode(GL_BACK, GL_LINE);[/b]
glCullFace(GL_FRONT);
glDepthMask(GL_FALSE);
drawObject();
Jingshu