hi Sergey,
On 9 September 2014 13:32, Sergey Kurdakov <[email protected]> wrote:
> my previous 'solution' was y wrong, because there are other possible modes
> being assosiated.
>
> So better as no Texture modes are associated with textures in OpenGL ES
> 2.0
>
> to ifndef code in
>
> osg/Texture header file
>
> instead of
>
> virtual bool getModeUsage(StateAttribute::ModeUsage& usage) const
> {
> usage.usesTextureMode(getTextureTarget());
> return true;
> }
>
> to have
>
> virtual bool getModeUsage(StateAttribute::ModeUsage& usage) const
> {
> #ifndef OSG_GLES2_AVAILABLE
> usage.usesTextureMode(getTextureTarget());
> return true;
> #else
> return false;
> #endif
>
> }
>
I like this solution. I haven't looked up the docs on GL4/GL3 core
profile, so wonder if the same would be applicable.
Although technically one shouldn't be use StateSet::setTextureAndMode() on
GLES2, when porting code between different versions of GL/GLES having
setTextureAndModes() usage with the fallback is probably best.
Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org