Hi,
Looking at the code (I'm not the author of this bit so I'm in the same
boat as you) it looks like the original code is 2, i+1, i+2 is wrong,
and then using 0, i+1, i+2 would be more appropriate so I've made this
change and checked it in to SVN.
Let me know if it works fine for you.
Robert.
On 4/6/07, D. C. Fennell <[EMAIL PROTECTED]> wrote:
I was using the TangentSpaceGenerator for GL_TRIANGLE_FAN. In the "generate"
function for TRIANGLE_FAN, if the primitive set is not
DrawArrayLengthsPrimitiveType, it goes to compute with the following code:
for (i=0; i< N-2; ++i){
compute(pset, vx, nx, tx, 2, i+1, i+2)
}
this code gives indices of
2, 1, 2 <------
2, 2, 3 <------
2, 3, 4
2, 4, 5
etc...
This gives me incorrect results. From what I understand about tangent space,
you need to calculate it from a plane. Two instances here give a line
(marked above)
Changing the function to "compute(pset, vx, nx, 0, i+1, i+2)" gives me the
correct results.
Thanks in advance for any input.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/