Hi Ulrich, Hi Robert,

On 21-03-2012, at 00:30, Ulrich Hertlein wrote:

> Hi Robert, hi Erik,
> 
> How about replacing this:
> 
> _isVertexBufferObjectSupported = OSG_GLES2_FEATURES || OSG_GL3_FEATURES ||
> osg::isGLExtensionSupported(_contextID,"GL_ARB_vertex_buffer_object");
> 
> with either this:
> 
> _isVertexBufferObjectSupported = OSG_GLES2_FEATURES == 1 || OSG_GL3_FEATURES 
> == 1 ||
> osg::isGLExtensionSupported(_contextID,"GL_ARB_vertex_buffer_object");
> 
> or that:
> 
> _isVertexBufferObjectSupported =
> osg::isGLExtensionSupported(_contextID,"GL_ARB_vertex_buffer_object") ||
> OSG_GLES2_FEATURES || OSG_GL3_FEATURES;
> 
> Shuts up the compiler, (mostly) keeps the readability, and doesn't introduce 
> a const to
> shadow the #define.

As another alternative why not use

#ifdef OSG_GL1_AVAILABLE
    #define OSG_GL1_FEATURES true
#else
    #define OSG_GL1_FEATURES false
#endif

instead of

#ifdef OSG_GL1_AVAILABLE
    #define OSG_GL1_FEATURES 1
#else
    #define OSG_GL1_FEATURES 0
#endif

This is really the most minimalistic change that fixes the warning. And it 
seems to better convey the actual meaning.

Cheers,

        Erik
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to