Commit 5e24ad17 authored by Jan Möbius's avatar Jan Möbius
Browse files

Do nothing when picking in environment node

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@5580 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 61664933
......@@ -12,12 +12,12 @@
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
//
// OpenFlipper is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenFlipper. If not, see <http://www.gnu.org/licenses/>.
//
......@@ -52,16 +52,16 @@
namespace ACG {
namespace SceneGraph {
//== IMPLEMENTATION ==========================================================
//== IMPLEMENTATION ==========================================================
EnvMapNode::EnvMapNode( BaseNode* _parent,
EnvMapNode::EnvMapNode( BaseNode* _parent,
const std::string& _name )
: TextureNode(_parent, _name)
{}
//----------------------------------------------------------------------------
......@@ -72,9 +72,9 @@ unsigned int EnvMapNode::availableDrawModes() const
//----------------------------------------------------------------------------
void EnvMapNode::enter(GLState& _state, unsigned int _drawmode)
void EnvMapNode::enter(GLState& _state, unsigned int _drawmode)
{
if (_drawmode==DrawModes::SOLID_ENV_MAPPED)
{
......@@ -83,7 +83,7 @@ void EnvMapNode::enter(GLState& _state, unsigned int _drawmode)
glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);
glEnable(GL_TEXTURE_GEN_S);
glEnable(GL_TEXTURE_GEN_T);
glEnable(GL_TEXTURE_2D);
glEnable(GL_TEXTURE_2D);
}
}
......@@ -98,10 +98,21 @@ void EnvMapNode::leave(GLState& _state, unsigned int _drawmode)
TextureNode::leave(_state, _drawmode);
glDisable(GL_TEXTURE_GEN_S);
glDisable(GL_TEXTURE_GEN_T);
glDisable(GL_TEXTURE_2D);
glDisable(GL_TEXTURE_2D);
}
}
void EnvMapNode::enterPick(GLState& /*_state*/ ,
PickTarget /*_target*/,
unsigned int /*_drawMode*/ ) {
}
void EnvMapNode::leavePick(GLState& /*_state*/,
PickTarget /*_target*/,
unsigned int /*_drawMode*/ ) {
}
//=============================================================================
} // namespace SceneGraph
......
......@@ -12,12 +12,12 @@
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
//
// OpenFlipper is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenFlipper. If not, see <http://www.gnu.org/licenses/>.
//
......@@ -53,11 +53,11 @@
namespace ACG {
namespace SceneGraph {
//== CLASS DEFINITION =========================================================
/** \class EnvMapNode EnvMapNode.hh <ACG/Scenegraph/EnvMapNode.hh>
Similar to TextureNode, but sets up a spherical environment map.
**/
......@@ -81,6 +81,14 @@ public:
/// restores original texture (or no-texture)
void leave(GLState& _state, unsigned int _drawmode);
/** \brief Do nothing in picking
*/
void enterPick(GLState& _state, PickTarget _target, unsigned int _drawMode );
/** \brief Do nothing in picking
*/
void leavePick(GLState& _state, PickTarget _target, unsigned int _drawMode );
};
......
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