Hi Simon,

Simon Haegler wrote:
> 
> wow, i managed to learn glsl and write a shader which handles all of the 
> textures :)

Cool! :)

> a related question:
> 
> i am creating scenes with a custom application, where the shaders are 
> included 
> by using the SHLChunk::read*Program commands.
> 
> i noticed, that in order to reload a shader after editing, i have to 
> re-export 
> the whole scene. is it somehow possible to reload a shader without rewriting 
> the 
> scene file? perhaps, by only storing the path to the shaders inside the .osb? 
> atm, i'm using a slightly modified osgSceneViewer to render.

Hm, there is no trivial way of doing that, as the OSB Writer currently 
doesn't have a good way to pass parameters into to define which of the 
two you want. It would be possible to add a filename field to the shader 
chunk that would be used in changed() to load the shader. Not a nice 
solution, but easy to do. Alternatively you could add a flag that just 
defines whether the filename is used, and reloaded in changed().

        Dirk

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to