Commit a8dd1969 authored by Mike Kremer's avatar Mike Kremer
Browse files

FIXED RENDERPASS PROBLEM!

Fixed problem caused by forcing enter-function call when traversing the scenegraph. Now the enter function of each action class is processed -> Some picking errors are now gone for good!

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@8404 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 8252777d
......@@ -272,16 +272,20 @@ class MetaAction
void enter (BaseNode *_node)
{
unsigned int drawmode = ((_node->drawMode() == DrawModes::DEFAULT) ?
/*unsigned int drawmode = ((_node->drawMode() == DrawModes::DEFAULT) ?
drawmode_ : _node->drawMode());
_node->enter(state_, drawmode);
_node->enter(state_, drawmode);*/
action_.enter( _node );
}
void leave (BaseNode *_node)
{
unsigned int drawmode = ((_node->drawMode() == DrawModes::DEFAULT) ?
/*unsigned int drawmode = ((_node->drawMode() == DrawModes::DEFAULT) ?
drawmode_ : _node->drawMode());
_node->leave(state_, drawmode);
_node->leave(state_, drawmode);*/
action_.leave( _node );
}
private:
......@@ -485,6 +489,10 @@ public:
return true;
}
void enter (BaseNode* /*_node*/) {};
void leave (BaseNode* /*_node*/) {};
/** \brief Get the number of required traverse passes from Scenegraph
*
......@@ -545,6 +553,10 @@ public:
}
return true;
}
void enter (BaseNode* /*_node*/) {};
void leave (BaseNode* /*_node*/) {};
/// Get the pointer of the node (is 0 if node was not found)
BaseNode* node_ptr() { return node_ptr_; }
......@@ -585,6 +597,10 @@ public:
drawModes_ |= _node->availableDrawModes();
return true;
}
void enter (BaseNode* /*_node*/) {};
void leave (BaseNode* /*_node*/) {};
/// Get the collected draw modes
unsigned int drawModes() const { return drawModes_; }
......@@ -616,6 +632,10 @@ public:
drawMode_ |= _node->drawMode();
return true;
}
void enter (BaseNode* /*_node*/) {};
void leave (BaseNode* /*_node*/) {};
/// Get the collected draw modes
unsigned int drawMode() const { return drawMode_; }
......@@ -657,6 +677,10 @@ public:
return true;
}
void enter (BaseNode* /*_node*/) {};
void leave (BaseNode* /*_node*/) {};
private:
unsigned int newModes_;
......@@ -697,6 +721,10 @@ public:
return true;
}
void enter (BaseNode* /*_node*/) {};
void leave (BaseNode* /*_node*/) {};
private:
unsigned int drawMode_;
......@@ -723,7 +751,7 @@ public:
PickAction(GLState &_state, PickTarget _target, unsigned int _drawmode) :
state_(_state),
pickTarget_(_target),
drawmode_(_drawmode) {}
drawmode_(_drawmode) {};
/** Action applied to the node
*/
......@@ -780,6 +808,10 @@ public:
_node->mouseEvent(_state, event_);
return true;
}
void enter (BaseNode* /*_node*/) {};
void leave (BaseNode* /*_node*/) {};
private:
......@@ -809,6 +841,10 @@ public:
// don't traverse children if current node is _dirty
return !dirty_;
}
void enter (BaseNode* /*_node*/) {};
void leave (BaseNode* /*_node*/) {};
bool isDirty() const { return dirty_; };
......
Supports Markdown
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