1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2002,2002 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
15 * This library is free software; you can redistribute it and/or modify it *
16 * under the terms of the GNU Library General Public License as published *
17 * by the Free Software Foundation, version 2. *
19 * This library is distributed in the hope that it will be useful, but *
20 * WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
22 * Library General Public License for more details. *
24 * You should have received a copy of the GNU Library General Public *
25 * License along with this library; if not, write to the Free Software *
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
37 \*---------------------------------------------------------------------------*/
42 Real32 RenderNode::getVisibleFaceCost(void) const
44 return _visibleFaceCost;
48 Real32 RenderNode::getInvisibleFaceCost(void) const
50 return _invisibleFaceCost;
54 Real32 RenderNode::getDrawPixelCost(void) const
56 return _drawPixelCost;
60 Real32 RenderNode::getReadPixelCost(void) const
62 return _readPixelCost;
66 Real32 RenderNode::getWritePixelCost(void) const
68 return _writePixelCost;
72 std::string RenderNode::getVendor(void) const
78 std::string RenderNode::getRenderer(void) const
84 void RenderNode::setVisibleFaceCost(Real32 value)
86 _visibleFaceCost=value;
90 void RenderNode::setInvisibleFaceCost(Real32 value)
92 _invisibleFaceCost=value;
96 void RenderNode::setDrawPixelCost(Real32 value)
102 void RenderNode::setReadPixelCost(Real32 value)
104 _readPixelCost=value;
108 void RenderNode::setWritePixelCost(Real32 value)
110 _writePixelCost=value;
113 /*! set vendor string of the graphics board
117 void RenderNode::setVendor(const std::string &value)
122 /*! set renderer string of the graphics board
126 void RenderNode::setRenderer(const std::string &value)
131 /*! Estimate rendering performance. Facesetup end rasterisation is done
132 * in parallel on most hardware plattforms. So we use the maximum of
133 * face cost and rasterisation cost.
136 Real32 RenderNode::estimatePerformance(Real32 invisibleFaces,
141 ( invisibleFaces * _invisibleFaceCost ) +
142 osgMax( ( visibleFaces * _visibleFaceCost ),
143 ( pixel * _drawPixelCost ) );