Hi,

I know that gl_Light* are also deprecated, but I think that it's not really the 
same problem :

If you want to do advanced OpenGL, you have to write your own shaders and to 
manage your own lights, with uniforms or other variables. So this is "natural" 
to write your shader and your light management system.

But you still want to load and render an object from a 3ds file. In this 
object, there are informations about colors (materials) which are lost because 
gl_Material is deprecated.


I think there are 2 solutions :

- use a custom visitor or something to read all osg::Material and convert them 
to your render engine specific variables (uniforms for example)

- use a framework-wide solution : automatically convert gl_Material to uniforms 
so every one does'nt have to write / maintain the "same" visitor code

And a visitor is not really suitable for dynamic materials (with values changed 
from code at application runtime)


The main idea of this submission is to keep access to some data which are 
needed for proper rendering, even if you want/have to define your own 
shaders/light management system.

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=52469#52469





_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to