// Copyright (C) 2002-2003 Gideon May (gideon@computer.org) // // Permission to copy, use, sell and distribute this software is granted // provided this copyright notice appears in all copies. // Permission to modify the code and to distribute modified code is granted // provided this copyright notice appears in all copies, and a notice // that the code was modified is included with the copyright notice. // // This software is provided "as is" without express or implied warranty, // and with no claim as to its suitability for any purpose. #include #include #include #include #include #include #include #include #include "held_ptr.hpp" using namespace boost::python; namespace PyOSGUtil { void init_RenderStage() { class_, bases > renderstage("RenderStage", "RenderState base class. Used for encapsulate a complete stage in\n" "rendering - setting up of viewport, the projection and model\n" "matrices and rendering the RenderBin's enclosed with this RenderStage.\n" "RenderStage also has a dependency list of other RenderStages, each\n" "of which must be called before the rendering of this stage. These\n" "'pre' rendering stages are used for advanced rendering techniques\n" "like multistage pixel shading or impostors.\n", no_init); scope renderstage_scope(renderstage); renderstage .def(init<>()) .def(init()) .def("setViewport", &osgUtil::RenderStage:: setViewport, "Set the viewport.") .def("getViewport", (osg::Viewport *(osgUtil::RenderStage::*)()) &osgUtil::RenderStage::getViewport, "Get the viewport.", return_internal_reference<>()) .def("setClearMask", &osgUtil::RenderStage:: setClearMask, "Set the clear mask used in glClear(..).\n" "Defaults to GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT.") .def("getClearMask", &osgUtil::RenderStage:: getClearMask, "Get the clear mask.") .def("setColorMask", &osgUtil::RenderStage:: setColorMask) // .def("getColorMask", &osgUtil::RenderStage:: getColorMask, return_internal_reference<>()) FIXME .def("setClearColor", &osgUtil::RenderStage:: setClearColor, "Set the clear color used in glClearColor(..). \n" "glClearColor is only called if mask & GL_COLOR_BUFFER_BIT is true") /** Get the clear color.*/ // .def("getClearColor", &osgUtil::RenderStage:: getClearColor) FIXME .def("setClearAccum", &osgUtil::RenderStage:: setClearAccum, "Set the clear accum used in glClearAccum(..). \n" "glClearAcumm is only called if mask & GL_ACCUM_BUFFER_BIT is true") /** Get the clear accum.*/ // .def("getClearAccum", &osgUtil::RenderStage:: getClearAccum) FIXME .def("setClearDepth", &osgUtil::RenderStage:: setClearDepth, "Set the clear depth used in glClearDepth(..). Defaults to 1.0\n" "glClearDepth is only called if mask & GL_DEPTH_BUFFER_BIT is true") .def("getClearDepth", &osgUtil::RenderStage:: getClearDepth, "Get the clear depth.") .def("setClearStencil", &osgUtil::RenderStage:: setClearStencil, "Set the clear stencil value used in glClearStencil(). Defaults to 1.0 \n" "glClearStencil is only called if mask & GL_STENCIL_BUFFER_BIT is true") .def("getClearStencil", &osgUtil::RenderStage:: getClearStencil, "Get the clear color.") .def("addPositionedAttribute", &osgUtil::RenderStage:: addPositionedAttribute) .def("drawPreRenderStages", &osgUtil::RenderStage:: drawPreRenderStages) .def("draw", &osgUtil::RenderStage:: draw) .def("drawImplementation", &osgUtil::RenderStage:: drawImplementation) .def("addToDependencyList", &osgUtil::RenderStage:: addToDependencyList) .def("getStats", &osgUtil::RenderStage:: getStats, "extract stats for current draw list.") ; } }