Hi Jannik, I suspect your driver only supports 4 texture units using the fixed function. Check the GL_MAX_TEXTURE_UNITS value to verify:
GLint units; glGetIntegerv(GL_MAX_TEXTURE_UNITS, &units); My GeForce GTX 760 only supports 4 fixed function texture units, but up to 32 units using the shader pipeline. Are you sure the non-OSG based app was using the fixed function pipeline? Cheers, Farshid On Wed, Jun 17, 2015 at 10:47 AM, Jannik Heller <scr...@baseoftrash.de> wrote: > Oops, posted wrong code - that should have been 4 instead of 3, of course. > > > Code: > > diff --git a/examples/osgbillboard/osgbillboard.cpp > b/examples/osgbillboard/osgbillboard.cpp > index a6243e8..64f893c 100644 > --- a/examples/osgbillboard/osgbillboard.cpp > +++ b/examples/osgbillboard/osgbillboard.cpp > @@ -67,7 +67,7 @@ osg::Drawable* createSquare(const osg::Vec3& > corner,const osg::Vec3& width,const > (*tcoords)[1].set(1.0f,0.0f); > (*tcoords)[2].set(1.0f,1.0f); > (*tcoords)[3].set(0.0f,1.0f); > - geom->setTexCoordArray(0,tcoords); > + geom->setTexCoordArray(4,tcoords); > > geom->addPrimitiveSet(new > osg::DrawArrays(osg::PrimitiveSet::QUADS,0,4)); > > @@ -76,7 +76,7 @@ osg::Drawable* createSquare(const osg::Vec3& > corner,const osg::Vec3& width,const > osg::StateSet* stateset = new osg::StateSet; > osg::Texture2D* texture = new osg::Texture2D; > texture->setImage(image); > - > stateset->setTextureAttributeAndModes(0,texture,osg::StateAttribute::ON); > + > stateset->setTextureAttributeAndModes(4,texture,osg::StateAttribute::ON); > geom->setStateSet(stateset); > } > > > > > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=64112#64112 > > > > > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org