[vtkusers] Edges and Solids

vtk at scil.sinp.msu.ru vtk at scil.sinp.msu.ru
Tue Jul 27 11:16:55 EDT 2004


Hi!
Problem with solid/combined images still remains, or I miss something?
If miss, how can I do wireframe and solid picture at the same time?
Idea of double actors is not very comfortable....

If we are using OpenGL (I think, most of VTK users are using it), OpenGL
can render glCallList for the same list for solid and offset poly.
Code looks like (why not to do in such a manner?) this:
-----------------------------------------
glDepthMask (GL_FALSE);
glEnable (GL_BLEND);
glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_POLYGON_OFFSET_FILL);
glPolygonOffset(factor, units);
glCallList(poly);
glDisable(GL_POLYGON_OFFSET_FILL);
glBlendFunc (GL_SRC_ALPHA, GL_ONE);
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, Gray);
glMaterialfv(GL_FRONT, GL_SPECULAR, Black);
glMaterialf(GL_FRONT, GL_SHININESS, 0.0);
glMaterialfv(GL_BACK, GL_AMBIENT_AND_DIFFUSE, BGray);
glMaterialfv(GL_BACK, GL_SPECULAR, BBlack);
glMaterialf(GL_BACK, GL_SHININESS, 0.0);
glLineWidth (1.0);
glCallList(poly);
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
glDepthMask (GL_TRUE);
glDisable (GL_BLEND);
------------------------------------------

Calling a list in OGL have very little overhead. But it is not good to 
have double amount of lists.

Thanx!




More information about the vtkusers mailing list