Cleand up the root Makefile.
Moved CullVisitor/RenderStage/RenderStageLighting across to managing lights entirely within RenderStageLighting, and changed the management of modelview matrices so that RenderLeaf now stores the absolute modelview matrix, rather than a model matrix as done previously. The later allows RenderLeaf's to do a glLoadMatrix rather than a glPushMatrix/glMultMatrix/glPopMatrix.
This commit is contained in:
@@ -106,13 +106,6 @@ class OSGUTIL_EXPORT RenderStage : public RenderBin
|
||||
return _renderStageLighting.get();
|
||||
}
|
||||
|
||||
void setLightingMode(RenderStageLighting::Mode mode) { getRenderStageLighting()->setLightingMode(mode); }
|
||||
RenderStageLighting::Mode getLightingMode() const { return getRenderStageLighting()->getLightingMode(); }
|
||||
|
||||
void setLight(osg::Light* light) { getRenderStageLighting()->setLight(light); }
|
||||
osg::Light* getLight() { return getRenderStageLighting()->getLight(); }
|
||||
const osg::Light* getLight() const { return getRenderStageLighting()->getLight(); }
|
||||
|
||||
virtual void addLight(osg::Light* light,osg::Matrix* matrix)
|
||||
{
|
||||
getRenderStageLighting()->addLight(light,matrix);
|
||||
|
||||
@@ -30,19 +30,6 @@ class OSGUTIL_EXPORT RenderStageLighting : public osg::Object
|
||||
|
||||
virtual void reset();
|
||||
|
||||
enum Mode {
|
||||
HEADLIGHT, // default
|
||||
SKY_LIGHT,
|
||||
NO_SCENEVIEW_LIGHT
|
||||
};
|
||||
|
||||
void setLightingMode(Mode mode) { _lightingMode=mode; }
|
||||
Mode getLightingMode() const { return _lightingMode; }
|
||||
|
||||
void setLight(osg::Light* light) { _light = light; }
|
||||
osg::Light* getLight() { return _light.get(); }
|
||||
const osg::Light* getLight() const { return _light.get(); }
|
||||
|
||||
typedef std::pair< osg::Light*, osg::ref_ptr<osg::Matrix> > LightMatrixPair;
|
||||
typedef std::vector< LightMatrixPair > LightList;
|
||||
|
||||
@@ -55,10 +42,7 @@ class OSGUTIL_EXPORT RenderStageLighting : public osg::Object
|
||||
|
||||
public:
|
||||
|
||||
Mode _lightingMode;
|
||||
osg::ref_ptr<osg::Light> _light;
|
||||
LightList _lightList;
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user