[osg-submissions] Source fix for missing osg::Light in .ive plugin

Robert Osfield robert.osfield at gmail.com
Fri Jul 11 11:53:43 PDT 2008


Thanks Liang, changes now merged and submitted to SVN.

I didn't merge the change to ReadWrite.h as it'd break backwards
compatibility.  FYI, osg::Light is usually used in conjunction with
osg::LightSource, and this usage of osg::Light is supported already in
.ive.  Attaching an osg::Light directly to a osg::StateSet while
technically supported is not an ideal way to use lights as they are
positional state, and require different handling that normal OpenGL
state to make sure that they don't get assigned to wrong modelview
matrix.

Robert.

On Mon, Jul 7, 2008 at 3:12 AM, lab_zj <lab_zj at 163.com> wrote:
>
> Hi, Robert:
>      In lastest svn version of OSG, the .ive plugin missing osg::Light, it
> does not process I/O for osg::Light. Now I have fixed it as follows:
>
> 1. In ReadWrite.h, I move the definition for "IVELIGHT" from "Objects
>     and Nodes" group to "State attributes" group.
>
> 2. In DataInputStream.cpp, I add support code in
> DataInputStream::readStateAttribute
>     for osg::Light.
>
> 3. In DataOutputStream.cpp, I add support code in
> DataOutputStream::writeStateAttribute
>     for osg::Light.
>
> Sorry for my poor english. the modified three files included in attachment.
>
> thanks and good luck
>
>                                                            Liang aibin
>                                                            2008-7-7
> ________________________________
> lab_zj
> 2008-07-07
> _______________________________________________
> osg-submissions mailing list
> osg-submissions at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
>


More information about the osg-submissions mailing list