Well spotted Bjorn, fix is correct, now merged and submitted to master,
OSG-3.4 and 3.2 branches. Cheers, Robert.

On 19 February 2016 at 10:27, Björn Blissing <[email protected]> wrote:

> Hi,
>
> I stumbled upon a strange ifdef-case inside Geometry.cpp
>
> Currently the code looks like this:
>
>
> Code:
> #if defined(OSG_GLES1_AVAILABLE) || !defined(OSG_GLES2_AVAILABLE)
>     DrawElementsUByte* elems = new
> DrawElementsUByte(PrimitiveSet::TRIANGLES);
>     elems->push_back(0);
>     elems->push_back(1);
>     elems->push_back(2);
>
>     elems->push_back(2);
>     elems->push_back(3);
>     elems->push_back(0);
>     geom->addPrimitiveSet(elems);
> #else
>     geom->addPrimitiveSet(new DrawArrays(PrimitiveSet::QUADS,0,4));
> #endif
>
>
>
> The second condition looked really strange (note the ! sign), and results
> in pretty much all code paths uses the first code. The correct version
> should probably be that only people with GLES1 or GLES2 should use
> GL_TRIANGLES to simulate quads. And all others should use the native
> support for GL_QUADS.
>
> I tracked this error in and it seems to have been added in the following
> commit:
> SHA: 5030175f0d2bdf68cc739184adb4d75b34b2d696
> Date:   Wed Dec 5 17:15:53 2012 +0000
>
>
> Regards
> Björn
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=66348#66348
>
>
>
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
>
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to