<div dir="ltr">Hi Jannik,<div><br></div><div>I suspect your driver only supports 4 texture units using the fixed function. Check the GL_MAX_TEXTURE_UNITS value to verify:</div><div><br></div><div><div>GLint units;</div><div>glGetIntegerv(GL_MAX_TEXTURE_UNITS, &units);</div></div><div><br></div><div>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?</div><div><br></div><div>Cheers,</div><div>Farshid</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 17, 2015 at 10:47 AM, Jannik Heller <span dir="ltr"><<a href="mailto:scrawl@baseoftrash.de" target="_blank">scrawl@baseoftrash.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Oops, posted wrong code - that should have been 4 instead of 3, of course.<br>
<span class=""><br>
<br>
Code:<br>
<br>
diff --git a/examples/osgbillboard/osgbillboard.cpp b/examples/osgbillboard/osgbillboard.cpp<br>
</span>index a6243e8..64f893c 100644<br>
<span class="">--- a/examples/osgbillboard/osgbillboard.cpp<br>
+++ b/examples/osgbillboard/osgbillboard.cpp<br>
@@ -67,7 +67,7 @@ osg::Drawable* createSquare(const osg::Vec3& corner,const osg::Vec3& width,const<br>
     (*tcoords)[1].set(1.0f,0.0f);<br>
     (*tcoords)[2].set(1.0f,1.0f);<br>
     (*tcoords)[3].set(0.0f,1.0f);<br>
-    geom->setTexCoordArray(0,tcoords);<br>
</span>+    geom->setTexCoordArray(4,tcoords);<br>
<span class=""><br>
     geom->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::QUADS,0,4));<br>
<br>
@@ -76,7 +76,7 @@ osg::Drawable* createSquare(const osg::Vec3& corner,const osg::Vec3& width,const<br>
         osg::StateSet* stateset = new osg::StateSet;<br>
         osg::Texture2D* texture = new osg::Texture2D;<br>
         texture->setImage(image);<br>
-        stateset->setTextureAttributeAndModes(0,texture,osg::StateAttribute::ON);<br>
</span>+        stateset->setTextureAttributeAndModes(4,texture,osg::StateAttribute::ON);<br>
         geom->setStateSet(stateset);<br>
<span class="">     }<br>
<br>
<br>
<br>
<br>
<br>
------------------<br>
Read this topic online here:<br>
</span><a href="http://forum.openscenegraph.org/viewtopic.php?p=64112#64112" rel="noreferrer" target="_blank">http://forum.openscenegraph.org/viewtopic.php?p=64112#64112</a><br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
</div></div></blockquote></div><br></div>