Commit 5af050be authored by hybrid's avatar hybrid

Make renderpass enum combinable.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2191 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 5266da90
......@@ -73,7 +73,7 @@ public:
CMyLightManager(ISceneManager* sceneManager)
: Mode(NO_MANAGEMENT), RequestedMode(NO_MANAGEMENT),
SceneManager(sceneManager), SceneLightList(0),
CurrentRenderPass(ESNRP_COUNT), CurrentSceneNode(0)
CurrentRenderPass(0), CurrentSceneNode(0)
{ }
virtual ~CMyLightManager(void) { }
......
......@@ -51,14 +51,17 @@ namespace scene
specifying when the node wants to be drawn in relation to the other nodes. */
enum E_SCENE_NODE_RENDER_PASS
{
//! No pass currently active
ESNRP_NONE =0,
//! Camera pass. The active view is set up here. The very first pass.
ESNRP_CAMERA,
ESNRP_CAMERA =1,
//! In this pass, lights are transformed into camera space and added to the driver
ESNRP_LIGHT,
ESNRP_LIGHT =2,
//! This is used for sky boxes.
ESNRP_SKY_BOX,
ESNRP_SKY_BOX =4,
//! All normal objects can use this for registering themselves.
/** This value will never be returned by
......@@ -73,22 +76,19 @@ namespace scene
render() method call getSceneNodeRenderPass() to find out the
current render pass and render only the corresponding parts of
the node. */
ESNRP_AUTOMATIC,
ESNRP_AUTOMATIC =24,
//! Solid scene nodes or special scene nodes without materials.
ESNRP_SOLID,
//! Drawn after the transparent nodes, the time for drawing shadow volumes
ESNRP_SHADOW,
ESNRP_SOLID =8,
//! Transparent scene nodes, drawn after shadow nodes. They are sorted from back to front and drawn in that order.
ESNRP_TRANSPARENT,
//! Transparent scene nodes, drawn after solid nodes. They are sorted from back to front and drawn in that order.
ESNRP_TRANSPARENT =16,
//! Transparent effect scene nodes, drawn after Transparent nodes. They are sorted from back to front and drawn in that order.
ESNRP_TRANSPARENT_EFFECT,
ESNRP_TRANSPARENT_EFFECT =32,
//! Never used, value specifing how much parameters there are.
ESNRP_COUNT
//! Drawn after the transparent nodes, the time for drawing shadow volumes
ESNRP_SHADOW =64
};
class IMesh;
......
......@@ -162,7 +162,7 @@ CSceneManager::CSceneManager(video::IVideoDriver* driver, io::IFileSystem* fs,
: ISceneNode(0, 0), Driver(driver), FileSystem(fs), GUIEnvironment(gui),
CursorControl(cursorControl), CollisionManager(0),
ActiveCamera(0), ShadowColor(150,0,0,0), AmbientLight(0,0,0,0),
MeshCache(cache), CurrentRendertime(ESNRP_COUNT), LightManager(0),
MeshCache(cache), CurrentRendertime(ESNRP_NONE), LightManager(0),
IRR_XML_FORMAT_SCENE(L"irr_scene"), IRR_XML_FORMAT_NODE(L"node"), IRR_XML_FORMAT_NODE_ATTR_TYPE(L"type")
{
#ifdef _DEBUG
......@@ -1227,7 +1227,7 @@ u32 CSceneManager::registerNodeForRendering(ISceneNode* node, E_SCENE_NODE_RENDE
}
break;
case ESNRP_COUNT: // ignore this one
case ESNRP_NONE: // ignore this one
break;
}
......@@ -1508,7 +1508,7 @@ void CSceneManager::drawAll()
LightList.set_used(0);
clearDeletionList();
CurrentRendertime = ESNRP_COUNT;
CurrentRendertime = ESNRP_NONE;
}
void CSceneManager::setLightManager(ILightManager* lightManager)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment