[osg-users] Shaders for textures with OpenGL ES 2.0

Chris Hanson xenon at alphapixel.com
Sun Oct 25 19:17:02 PDT 2015


Well, the FFP material state info doesn't exist in ES 2.0. So, it's getting
skipped.

You need to write a visitor that traverses your model converting OSG
Material class attributes into Uniforms that your shaders then read and
understand and react to.

On Sun, Oct 25, 2015 at 11:12 AM, Şan Güneş <sgunes at 350.su> wrote:

> Hello,
>
> I'm playing around with OpenSceneGraph with OpenGL ES 2.0. I managed to
> show some primitives, and later a model that I loaded with osgDB.
> However at the moment I'm assigning a random color to the gl_FragColor
> in the fragment shader. When doing this I'm getting the following warning:
>
> > Warning: Material::apply(State&) - not supported.
>
> I'm confused about how I should write the shaders if I load a model with
> osgDB in order to show it together with it's texture. So far I couldn't
> find any OpenSceneGraph related example for this. I would appreciate any
> help and tips.
>
> Thanks
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
Chris 'Xenon' Hanson, omo sanza lettere. Xenon at AlphaPixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Legal/IP • Code Forensics • Digital Imaging • GIS • GPS •
osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile •
iPhone/iPad/iOS • Android
@alphapixel <https://twitter.com/alphapixel> facebook.com/alphapixel (775)
623-PIXL [7495]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20151025/fb3843b6/attachment-0003.htm>


More information about the osg-users mailing list