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 ...@@ -272,16 +272,20 @@ class MetaAction
void enter (BaseNode *_node) void enter (BaseNode *_node)
{ {
unsigned int drawmode = ((_node->drawMode() == DrawModes::DEFAULT) ? /*unsigned int drawmode = ((_node->drawMode() == DrawModes::DEFAULT) ?
drawmode_ : _node->drawMode()); drawmode_ : _node->drawMode());
_node->enter(state_, drawmode); _node->enter(state_, drawmode);*/
action_.enter( _node );
} }
void leave (BaseNode *_node) void leave (BaseNode *_node)
{ {
unsigned int drawmode = ((_node->drawMode() == DrawModes::DEFAULT) ? /*unsigned int drawmode = ((_node->drawMode() == DrawModes::DEFAULT) ?
drawmode_ : _node->drawMode()); drawmode_ : _node->drawMode());
_node->leave(state_, drawmode); _node->leave(state_, drawmode);*/
action_.leave( _node );
} }
private: private:
...@@ -486,6 +490,10 @@ public: ...@@ -486,6 +490,10 @@ public:
return true; return true;
} }
void enter (BaseNode* /*_node*/) {};
void leave (BaseNode* /*_node*/) {};
/** \brief Get the number of required traverse passes from Scenegraph /** \brief Get the number of required traverse passes from Scenegraph
* *
* This number is the maximum of status and node passes required. * This number is the maximum of status and node passes required.
...@@ -546,6 +554,10 @@ public: ...@@ -546,6 +554,10 @@ public:
return true; return true;
} }
void enter (BaseNode* /*_node*/) {};
void leave (BaseNode* /*_node*/) {};
/// Get the pointer of the node (is 0 if node was not found) /// Get the pointer of the node (is 0 if node was not found)
BaseNode* node_ptr() { return node_ptr_; } BaseNode* node_ptr() { return node_ptr_; }
...@@ -586,6 +598,10 @@ public: ...@@ -586,6 +598,10 @@ public:
return true; return true;
} }
void enter (BaseNode* /*_node*/) {};
void leave (BaseNode* /*_node*/) {};
/// Get the collected draw modes /// Get the collected draw modes
unsigned int drawModes() const { return drawModes_; } unsigned int drawModes() const { return drawModes_; }
...@@ -617,6 +633,10 @@ public: ...@@ -617,6 +633,10 @@ public:
return true; return true;
} }
void enter (BaseNode* /*_node*/) {};
void leave (BaseNode* /*_node*/) {};
/// Get the collected draw modes /// Get the collected draw modes
unsigned int drawMode() const { return drawMode_; } unsigned int drawMode() const { return drawMode_; }
...@@ -658,6 +678,10 @@ public: ...@@ -658,6 +678,10 @@ public:
return true; return true;
} }
void enter (BaseNode* /*_node*/) {};
void leave (BaseNode* /*_node*/) {};
private: private:
unsigned int newModes_; unsigned int newModes_;
}; };
...@@ -697,6 +721,10 @@ public: ...@@ -697,6 +721,10 @@ public:
return true; return true;
} }
void enter (BaseNode* /*_node*/) {};
void leave (BaseNode* /*_node*/) {};
private: private:
unsigned int drawMode_; unsigned int drawMode_;
...@@ -723,7 +751,7 @@ public: ...@@ -723,7 +751,7 @@ public:
PickAction(GLState &_state, PickTarget _target, unsigned int _drawmode) : PickAction(GLState &_state, PickTarget _target, unsigned int _drawmode) :
state_(_state), state_(_state),
pickTarget_(_target), pickTarget_(_target),
drawmode_(_drawmode) {} drawmode_(_drawmode) {};
/** Action applied to the node /** Action applied to the node
*/ */
...@@ -781,6 +809,10 @@ public: ...@@ -781,6 +809,10 @@ public:
return true; return true;
} }
void enter (BaseNode* /*_node*/) {};
void leave (BaseNode* /*_node*/) {};
private: private:
QMouseEvent* event_; QMouseEvent* event_;
...@@ -810,6 +842,10 @@ public: ...@@ -810,6 +842,10 @@ public:
return !dirty_; return !dirty_;
} }
void enter (BaseNode* /*_node*/) {};
void leave (BaseNode* /*_node*/) {};
bool isDirty() const { return dirty_; }; bool isDirty() const { return dirty_; };
private: private:
......
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