[osg-users] Text colors in shaders

Werner Modenbach Werner.Modenbach at texion.eu
Fri Feb 24 07:15:41 PST 2017


Hi Robert,

thanks for the good explanations - as we are used from your side :-)
I cannot switch completely to gl3 because I have customers whose 
hardware/driver doesn't support it
So at the start of the application I analyze it and use the

camera->getGraphicsContext()->getState()->setUseModelViewAndProjectionUniforms(useGL3);
camera->getGraphicsContext()->getState()->setUseVertexAttributeAliasing(useGL3);

accordingly. It's for sure a burden but what can I do?

Thanks for your excellent support!

- Werner -

Am 24.02.2017 um 16:09 schrieb Robert Osfield:
> On 24 February 2017 at 14:30, Werner Modenbach
> <Werner.Modenbach at texion.eu> wrote:
>> that's great. It works with the shader you suggested.
>> Strange is, that just using vertex color doesn't work. It seems alpha is set
>> to transparent (0).
>> Also a texture is set but only alpha has a meaning. Texture color is black.
>> That looks odd to me.
> If you build the OSG against the GL3 core profile it maps the texture
> format to GL_RED rather than GL_ALPHA as the later is no longer
> supported.  The graphics hardware doesn't expand GL_RED in the same
> way as GL_ALPHA so it can cause problems.  It's a bit of pain having
> GL pull the rug from GL_ALPHA as it has a particularly useful mapping.
> Potentially one could use texture swizzle to get round this but it's
> not support on all GL versions.
>
> Robert.
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

-- 
*TEXION Software Solutions, Rotter Bruch 26a, D-52068 Aachen*
Phone: +49 241 475757-0
Fax: +49 241 475757-29
Web: http://texion.eu
eMail: info at texion.eu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20170224/4b89908d/attachment-0003.htm>


More information about the osg-users mailing list