Hi Robert, I perfectly understand your comments on the CPU overhead, this is the major problem I think, even if it's only some "if" keywords when osg::Pipeline is not used.
> Reviewing the code it felt like Pipeline is almost like osg::State itself in > that it is there to track and respond to state changes. Yes, I designed it for that : allow developper to re-implement some features of the osg::State. I thought that having a separate class should be easier than a whole big osg::State class. I see the osg::State as the object which "store the current OpenGL state" and the osg::Pipeline as the object which "send the current OpenGL state to the GPU", in a user-defined way (use fixed pipeline OpenGL attributes, or uniforms or UBO...) And I don't really understand your comments about shader generator / compositor : I think osg::Pipeline and osg::ShaderComposer are fully orthogonal (even if they can interact) the only link between osg::Pipeline and shader is the "processShaderSource" method which is here only to get a chance for any needed shader code source modification (in my example, I use it to inject an header which is common to all shaders in my application, so I can write this header only once) And at last, I'm not sure this is a good idea, but I was thinking about an osg::Pipeline more integrated into osg::State to delegate all OpenGL calls from osg::State to osg::Pipeline, so we can provide different osg::Pipeline sub-classes to handke different OpenGL versions : - osg::PipelineOpenGL_1 - osg::PipelineOpenGL_2 - osg::PipelineOpenGL_3 - osg::PipelineOpenGL_3_core - osg::PipelineOpenGL_4 - osg::PipelineOpenGL_ES - ... This probably allow to avoid all "#ifdef OPENGL_VERSION_XXX" and will simplify the maintenance and evolution of a specific OpenGL version support. Thank you! Cheers, Aurelien ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53329#53329 _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
