[osg-users] DisplaySettingds and ShaderHints

Philippe Renon philippe_renon at yahoo.fr
Thu Nov 30 05:22:35 PST 2017


Hi,

DisplaySettings::setDefaults() has this code:

#if defined(OSG_GLES3_AVAILABLE)
    setShaderHint(SHADER_GLES3);
#elif defined(OSG_GLES2_AVAILABLE)
    setShaderHint(SHADER_GLES2);
#elif defined(OSG_GL3_AVAILABLE)
    setShaderHint(SHADER_GL3);
#elif defined(OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE)
    setShaderHint(SHADER_NONE);
#else
    setShaderHint(SHADER_GL2);
#endif

And by default, afaik, osg will compile with OSG_GL3_AVAILABLE and OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE defined.

This means that ShaderHint will be set to SHADER_NONE and that causes issues down the road.

Is my understanding correct ? What is a proper way to have SHADER_GL2 or _GL3 activated ?

Cheers,
Philippe.

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=72491#72491







More information about the osg-users mailing list