|
Values for TVRMLSceneRenderingAttributes.WireframeEffect.
Generally, two other attributes may affect the way wireframe is rendered: TVRMLSceneRenderingAttributes.WireframeColor and TVRMLSceneRenderingAttributes.WireframeWidth, quite self-explanatory.
Values
-
weNormal: Whether this results in filled or wireframe look, depends on OpenGL glPolygonMode setting, filled by default.
-
weWireframeOnly:
WireframeWidth is used as wireframe line width (regardless of PureGeometry).
Depending on TVRMLSceneRenderingAttributes.PureGeometry value:
If PureGeometry then WireframeColor is used as wireframe line color.
If not PureGeometry, then lines are colored and potentially lighted and textured just like their corresponding triangles would be colored. So you can control lighting using OpenGL GL_LIGHTING setting and UseLights attribute, and you can control texturing by EnableTextures attribute.
-
weSolidWireframe: This is most often called "solid wireframe", since the intention is too see wireframe version of the model but still render shapes solid (e.g. filled polygons with depth test).
WireframeColor and WireframeWidth are used as wireframe line color/width (regardless of current PureGeometry value).
This usually gives best results when PureGeometry is on. Then current glColor sets the color of the solid model (and, like said before, WireframeColor sets wireframe color).
TODO: Note that for PureGeometry = False, the wireframe will still be textured if original model were textured. Also wireframe color will be affected by GLSL shaders, if model defined any. (Wireframe will never be lighted, this is taken care of properly). This is bad, as I would like to never texture or shade the wireframe, regardless of PureGeometry. Basically, the wireframe part should behave always like PureGeometry = True, regardless of the filled model PureGeometry setting. For now, avoid using weSolidWireframe with PureGeometry = False if your model may have textures or shaders. There's no way currently to reuse the same display list, while having normal model textured/shaded and wireframe not textured/shaded. If you really need this effect, you'll need two TVRMLFlatSceneGL instances with different attributes rendering the same model.
-
weSilhouette: This works quite like weSolidWireframe, except that weSolidWireframe makes the wireframe mesh slightly in front the model, while weSilhouette makes the wireframe mesh slightly at the back of the model. This way only the silhouette is visible from the wireframe rendering.
WireframeColor and WireframeWidth are used as silhouette line color/width (regardless of current PureGeometry value).
This is sometimes sensible to use with PureGeometry = True. Then current glColor sets the color of the solid model (and, like said before, WireframeColor sets wireframe color)
TODO: Note that for PureGeometry = False, the wireframe will still be textured/shaded if original model were textured or used GLSL shaders. See weSolidWireframe TODO notes.
|