Am 9/28/2016 um 4:57 PM schrieb Gianni Ambrosio:
Hi Sebastian,
I would like to adopt you solution if possible but I was not able to implement 
with textures the same behaviour of the example I did with primitive sets.

I know that on windows the example crashes in debug mode because of an 
assertion inside Microsoft implementaition of std::vector. It's a matter of  
_ITERATOR_DEBUG_LEVEL. In release mode it works fine. Just to explain the 
reason. Anyway the movie should not crash :D
Movie is working ;) But if it is giving you an assertion in debug and works in release mode it simply means you're using undefined behavior. You should never rely on something like this.

So, do you think it would be possible to implement the same behaviour with 
textures?
Not directly. If you really need to tag individual triangles it isn't doable with a simple texture. In this case my next approach actually would include using vertex colors and some shader to draw flat colored triangles based on the provoking vertex. The problem that makes this non-trivial is simply due to the vertex sharing. If you duplicate the vertices (or at least some of them) it is solveable without fancy tricks in 5 minutes, but depending on the number of triangles in your road this might not be an option.
So how many triangles will be in your road?

Cheers
Sebastian

Regards,
Gianni

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=68814#68814





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

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

Reply via email to