Hi Yafes;

Have you looked at OSG tutorials? If not, you should really examine much of
them (http://www.openscenegraph.org/projects/osg/wiki/Support/Tutorials).
You will grasp how could be used texturing and so on.

And your texture coordinates looks wrong because you should trace the line
while defining it. Don't jump one direction to other.

Regards.

2009/4/28 Yafes <ysahin.mmt-b2...@fh-salzburg.ac.at>

> Hi @ all,
>
> as you maybe know fro my previous posts, i was tryieng to build some
> stairs, which i already did.
>
> Know the attached files show the vertex Points and the faces, how they are
> arranged. I would like to put a texture on it, so that i use just one
> "texture.jpg" which is a line and should cover the whole object.
>
> 1) First of all, i just took the first two faces to give a try. Is this the
> correct way how my texture coordinates should look like?
>
>        // texture coordinates
>        osg::Vec2Array *stairCoor = new osg::Vec2Array();
>        stairCoor->push_back(Vec2(0.0, 0.0));
>        stairCoor->push_back(Vec2(0.0, 1.0));
>        stairCoor->push_back(Vec2(1.0, 0.0));
>        stairCoor->push_back(Vec2(1.0, 1.0));
>        stairCoor->push_back(Vec2(0.0, 0.0));
>        stairCoor->push_back(Vec2(0.0, 1.0));
>        stairCoor->push_back(Vec2(1.0, 0.0));
>        stairCoor->push_back(Vec2(1.0, 1.0));
>
> 2) As mentioned in my intro, i was looking for a way, how i could place a
> texture over many faces, so that i use just one image for the whole object.
>
>
> Thank you very much!
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=10944#10944
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


-- 
Ümit Uzun
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to