Hi Robert,

On Thursday 24 June 2010, Robert Osfield wrote:
> Thoughts? Suggestions?

Just a thought. Without a real concrete plan how to improove - sadly.

With that proposal - espcially the StateAttribute::compose call working 
directly on the osg::State - I conclude that we need to relink during draw:
* we will probably loose state sorting for the shader combinations
* shaders need to be at least relinked on every state change which will have 
some runtime (drawtime) overhead.

So, what would be needed is that the final shader program is already known in 
the cull step. There we would need to have a fast hash/map/index that is 
mapping from the final shader combination collected by the cull visitor into 
a set of cached, already optimized and linked programs. Then state sorting 
happens by grouping render leafs by these final shader programs.
Also then relinking does not need to happen during draw.

Isn't that something that you already do in effect with the StateAttributes to 
build up the state graph?

Anyway. Since I don't have time today and tomorrow to provide a solution for 
that I just want to share my thoughts ...
So, all in all I am just glad that osg starts having support for that!!!!!

Greetings

Mathias

-- 
Dr. Mathias Fröhlich, science + computing ag, Software Solutions
Hagellocher Weg 71-75, D-72070 Tuebingen, Germany
Phone: +49 7071 9457-268, Fax: +49 7071 9457-511
-- 
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Dr. Roland Niemeier, 
Dr. Arno Steitz, Dr. Ingrid Zech
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Michel Lepert
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196 


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

Reply via email to