> Hi Terry,
>
>> The big piece I haven't figure out yet is shaders.  Shader files are
>> currently loaded in Shader::loadShaderSourceFromFile().  To load them
>> from archives I think the whole shader loading infrastructure would
>> need to be converted to work just like loading any other file.
>
> It already is. Have a look at osgDB::readShaderFile().
>
That's good to know.  When I use a debugger to step through loading a
.osg file from a .zip file, it uses
Shader::loadShaderSourceFromFile().  Maybe this is just legacy code
and the intention is to have it use the osgDB shader loading path that
you're talking about.  I'll have to dig a little deeper; too bad I
have to go to work right now :(

- Terry

> This is more convenient because it creates the shader with the proper
> type from scratch, whereas when using Shader::loadShaderSourceFromFile()
> you need to have created a new Shader(osg::Shader::FRAGMENT or
> osg::Shader::VERTEX or ...) beforehand.
>
> So your changes will probably work correctly out of the box... :-)
>
> J-S
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to