[osg-users] wireframe mode and degenerate triangles

Robert Osfield robert.osfield at gmail.com
Thu Jan 5 02:24:06 PST 2017


Hi Christian,

glPolygonMode/osg::PolygonMode controls how primitives are rasterized,
if the hardware doesn't have any explicit support for rejecting
degenerate triangles prior to triangle setup/rasterization stage then
they will make it though along with all other primitives and be
rasterized if possible.  For fill degenerate triangles isn't an non
op, but for wire frame you'd expect that that it's possible to
rasterize as it will be two valid length edges.

Given this I think you are wanting something to happen that your
hardware just doesn't support.

Robert.

On 30 December 2016 at 13:38, Christian Buchner
<christian.buchner at gmail.com> wrote:
> Hi all,
>
> I have just optimized a human model that had around 150 individual
> GL_LINE_STRIP drawables by adjoining these. This requires doubling the last
> vertex of a strip and the first vertex of the next strip which is to be
> appended, generating a couple of degenerate triangles.
>
> The model still renders fine and the OSG stats viewer now shows a much lower
> drawable count.
>
> A quirk appears when rendering this in wireframe mode (using the 'w' hotkey
> implemented in one of the builtin Event handlers). I assume this enables a
> GL PolygonMode of GL_FRONT_AND_BACK, GL_LINE. Now the degenerate triangles
> are still rendered, making the model look broken (arms look fused to the
> body).
>
> Here's my question: Shouln't wireframe rendering mode hide degenerate
> triangles, as they wouldn't be passed on to the rasterizer in any case?
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



More information about the osg-users mailing list