Commit 87e9889f authored by Jan Möbius's avatar Jan Möbius
Browse files

Christopher: Fixed warnings

refs #901

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@14990 383ad7c9-94d9-4d36-a494-682f7c89f535
parent eed729b1
......@@ -102,3 +102,8 @@ void ACG::RenderObject::initFromState( GLState* _glState )
shininess = _glState->shininess();
}
}
ACG::RenderObject::RenderObject()
{
memset(this, 0, sizeof(RenderObject));
}
\ No newline at end of file
......@@ -80,6 +80,12 @@ class GLState;
*/
struct ACGDLLEXPORT RenderObject
{
/** default constructor
* set all members to 0
* keep renderobject a POD to avoid possible problems
*/
RenderObject();
/** \brief Priority to allow sorting of objects
*
* The renderer sorts objects based on priority from high to low before rendering.
......
......@@ -575,7 +575,6 @@ template <class Mesh>
void ACG::SceneGraph::MeshNodeT<Mesh>::getRenderObjects( IRenderer* _renderer, GLState& _state, const DrawModes::DrawMode& _drawMode )
{
RenderObject ro;
memset(&ro, 0, sizeof(RenderObject));
ro.initFromState(&_state);
// shader gen setup (lighting, shademode, vertex-colors..)
......@@ -742,6 +741,7 @@ void ACG::SceneGraph::MeshNodeT<Mesh>::getRenderObjects( IRenderer* _renderer, G
case DrawModes::PRIMITIVE_POINT: add_point_RenderObjects(_renderer, &ro); break;
case DrawModes::PRIMITIVE_EDGE: add_line_RenderObjects(_renderer, &ro); break;
case DrawModes::PRIMITIVE_POLYGON: add_face_RenderObjects(_renderer, &ro); break;
default: break;
}
}
......
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