[osg-users] Using multiples texture for a geometry

Florian GOLESTIN florian.golestin at gmail.com
Fri May 6 13:24:50 PDT 2016

Hi Robert,

I followed your suggestion and indeed the exported scenes seem different but I don't get this difference.

Please see in attachment for the source code and the exported scenes.

This source code create one drawable with two faces and two TextCoords buffers. The result is the same: if I apply the two texture it's dark. If I apply only one texture (either on the left or the right side) the unique texture is displayed correctly.

I've compared the .osgt scenes.
So there is obviously two 


Data 1 {
			    GL_TEXTURE_2D ON 

and two 


			Data 1 {
			    osg::Texture2D {
				UniqueID 4 
			    Value OFF 

Only one has a reference to the image but I think this is explained because the both have the same UniqueID.

And two


osg::Vec2Array {
			    UniqueID 11 
			    Binding BIND_PER_VERTEX 
			    vector 8 {
				0 0 
				0 0 
				0 0 
				0 0 
				0 0 
				0 1 
				1 1 
				1 0 

With different Textcoord as expected (this second part correspond to my right part).

I also tried to create two textures but no more chance.

I'm continuing investigating but I'm kind of stuck


Read this topic online here:


More information about the osg-users mailing list