To follow up on Jorge's reply:

Here's an example of how you can use shaders for osgText:
https://github.com/preet/scratch/blob/master/openscenegraph/osg_text_geometry/main_old.cpp

If you're still having issues, increase the OSG debugging output:
(osg::setDebugNotify(...)) and
osgViewer::getCamera()->getGraphicsContext()->getState()->
setCheckForGLErrors(osg::State::ONCE_PER_ATTRIBUTE)

to try and get a bit more info on the error. Something like APITrace (
https://github.com/apitrace/apitrace) might help too if you can get it
running on the target platform.

To get textures working properly on my platform I had to make a couple of
changes to the source. Unfortunately, for some stupid reason I accidentally
scrubbed the git history so I don't really have diffs of all the changes I
made. One specific thing I remember was having to set _glMaxTextureCoords =
1 in /src/osg/State.cpp to get textures working on my device.

Replace the if clause on line 900 with:

    if ( osg::getGLVersionNumber() >= 2.0 ||
osg::isGLExtensionSupported(_contextID,"GL_ARB_vertex_shader") ||
OSG_GLES2_FEATURES)
    {

glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS,&_glMaxTextureUnits);

        #ifdef OSG_GLES2_AVAILABLE
            _glMaxTextureCoords = 1;
        #else
            glGetIntegerv(GL_MAX_TEXTURE_COORDS,&_glMaxTextureCoords);
        #endif
    }


Preet
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to