Hi,

If you change data often, you can declare the vertex attribute array usage as
 "STREAM_DRAW".

And to pass 4x4 matrices, you can do this :

- declare 4 vertex attributes array in OSG
- fill them with the 4 colums of your matrices
- bind them to attributes units 4, 5, 6, 7 (for example)
- in your shader, you can read "mat4" type attribute on unit 4

But sometimes, passing full mat4 to shader can be slower than passing less data 
(only a vec3 for a position) and compute the matrix in the shader.

Cheers,
Aurelien

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





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

Reply via email to