[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
Code:
Data 1 {
GL_TEXTURE_2D ON
}
and two
Code:
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
Code:
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
Florian
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=67054#67054
Attachments:
http://forum.openscenegraph.org//files/two_textures_115.osg
http://forum.openscenegraph.org//files/one_texture_359.osg
http://forum.openscenegraph.org//files/main_415.cpp
More information about the osg-users
mailing list