Hello,

First it would be nice to have an overview over the endless number of
classes in system/state/shader and system/state/shl, which are all somehow
related to shaders - but where to start? ;-)
Second how are shader attributes realized in OpenSG 2? I mean not attributes
like glColor or something, but custom per-vertex-attributes like

#pragma version 130
uniform vec4 viewport; // the current viewport dimensions (as per
glGetFloatv(GL_VIEWPORT,...))
uniform vec4 eyePosition; // the current eye position in modelview
coordinates
uniform float scale;
attribute float radius; // premultiplied with 'scale'
attribute float halfHeight; // precompute: length(gl_Normal)*scale/2
...

As the attribute id does not change as long as the shader is not recompiled,
it would be a significant overhead querying the id every time it is used.
However, the attribute id may (afaik) be different in different windows, so
it should be handled quite like a texture id.
Is there anything in OpenSG I can use, or any idea on how to implement that?

Aloha, Andi




------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to