[osg-users] Why is setTexCoordArray(0, texcoords) needed if array is modified in-place

Florian Castellane fixed-term.florian.castellane at bosch.com
Fri Jul 8 00:59:12 PDT 2016

Hi Robert,

Yes, I am indeed changing the texcoord array at the indices relevant to the part of the geometry I am texturing.  :o 

You can indeed see in the code that I am accessing the texArray using
(*texArray)[idx] ... which is actually short for 
(*texArray)[ (*indices)[id] ]


I'll try to produce a minimal compileable code to further showcase the issue as you are advising. Let me get back on that.

For dynamic texture coordinates, I thought you had to pass them to the shader through the texCoord array in the geometry for texturing unit N (aka) settexcoords(N, texCoord) in order for the shader to get this texCoord array as attribute vec2 osg_MultiTexCoordN in the shader. Can you detail what you are suggesting instead?

Thank you!


Read this topic online here:

More information about the osg-users mailing list