[osg-users] Using multiples texture for a geometry

Robert Osfield robert.osfield at gmail.com
Sat May 7 04:24:01 PDT 2016


Hi Florian,

I'm afraid I'm too busy to help do support right now - I off to
Germany to do OSG training :-)

Hopefully others will be able to have a look at what you might be doing wrong.

Robert.

On 6 May 2016 at 21:24, Florian GOLESTIN <florian.golestin at gmail.com> wrote:
> 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
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



More information about the osg-users mailing list