> [...] it'd be a colossal performance hit [...]
Meassuring on my Radeon X1300 mobile using oglperf:
========= glColor frequency =========
overall: 24 mil. vertex/second
perStrip(4vertices): 22
perTriangle: 20
perVertex: 14
Results: Performance ok on triangle level. Acceptable on vertex level.
========= glColor frequency using display lists =========
overall: 17 mil. vertex/second
perStrip(4vertices): 15
perTriangle: 21
perVertex: 21
Result: drivers are probably not optimized for overall and perStrip?
Anyway, without problems.
========= pointLight and glMaterial =========
overall: 22 mil. vertex/second
perStrip(4vertices): 15
perTriangle: 10
perVertex: 5
Result: Performance divided by 4.
========= pointList and glMaterial for diffuse only =========
overall: 22 mil. vertex/second
perStrip(4vertices): 20
perTriangle: 17
perVertex: 11
Result: Performance halved.
John
Robert Osfield napsal(a):
Hi Tim,
On 3/23/07, Bentley, Tim AMRDEC/Torch <[EMAIL PROTECTED]> wrote:
Unfortunately I need to set the ambient, diffuse, specular, and
shininess for each material at each vertex in the model. The "lowest"
level I have been able to find that allows me to apply materials in OSG
is at the Geometry class, through a StateSet. Is this the case or am I
overlooking something?
The OSG is not set up to change material properties at this level of
granularity, and it'd be a colossal performance hit doing such find
grained state changes. You really really don't want to be trying
this, the OSG doesn't support, and nor should it.
A better route would be to use a vertex shader to set up the lighting
model per vertex by read multiple vertex attributes for each of the
ambient, diffuse, specular and shininess.
Robert.
_______________________________________________
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/