// *************************************************************************** // // Generated automatically by genwrapper. // Please DO NOT EDIT this file! // // *************************************************************************** #include #include #include #include #include #include #include #include #include #include #include // Must undefine IN and OUT macros defined in Windows headers #ifdef IN #undef IN #endif #ifdef OUT #undef OUT #endif TYPE_NAME_ALIAS(OpenThreads::Thread::ThreadPriority, osgDB::DatabasePager::ThreadPriority); TYPE_NAME_ALIAS(std::list< osg::ref_ptr< osg::PagedLOD > >, osgDB::DatabasePager::PagedLODList); TYPE_NAME_ALIAS(std::set< osg::ref_ptr< osg::StateSet > >, osgDB::DatabasePager::StateSetList); TYPE_NAME_ALIAS(std::vector< osg::ref_ptr< osg::Drawable > >, osgDB::DatabasePager::DrawableList); TYPE_NAME_ALIAS(std::pair< osgDB::DatabasePager::StateSetList COMMA osgDB::DatabasePager::DrawableList >, osgDB::DatabasePager::DataToCompile); TYPE_NAME_ALIAS(std::map< unsigned int COMMA osgDB::DatabasePager::DataToCompile >, osgDB::DatabasePager::DataToCompileMap); TYPE_NAME_ALIAS(std::set< unsigned int >, osgDB::DatabasePager::ActiveGraphicsContexts); BEGIN_ENUM_REFLECTOR(osgDB::DatabasePager::DrawablePolicy) I_EnumLabel(osgDB::DatabasePager::DO_NOT_MODIFY_DRAWABLE_SETTINGS); I_EnumLabel(osgDB::DatabasePager::USE_DISPLAY_LISTS); I_EnumLabel(osgDB::DatabasePager::USE_VERTEX_BUFFER_OBJECTS); I_EnumLabel(osgDB::DatabasePager::USE_VERTEX_ARRAYS); END_REFLECTOR BEGIN_OBJECT_REFLECTOR(osgDB::DatabasePager) I_BaseType(osg::NodeVisitor::DatabaseRequestHandler); I_Constructor0(____DatabasePager, "", ""); I_Method4(void, requestNodeFile, IN, const std::string &, fileName, IN, osg::Group *, group, IN, float, priority, IN, const osg::FrameStamp *, framestamp, __void__requestNodeFile__C5_std_string_R1__osg_Group_P1__float__C5_osg_FrameStamp_P1, "Add a request to load a node file to end the the database request list. ", ""); I_Method0(void, run, __void__run, "Run does the database paging. ", ""); I_Method0(int, cancel, __int__cancel, "Cancel the database pager thread. ", ""); I_Method0(void, clear, __void__clear, "Clear all internally cached structures. ", ""); I_Method1(void, setDatabasePagerThreadPause, IN, bool, pause, __void__setDatabasePagerThreadPause__bool, "Set whether the database pager thread should be paused or not. ", ""); I_Method0(bool, getDatabasePagerThreadPause, __bool__getDatabasePagerThreadPause, "Get whether the database pager thread should is paused or not. ", ""); I_Method1(void, setAcceptNewDatabaseRequests, IN, bool, acceptNewRequests, __void__setAcceptNewDatabaseRequests__bool, "Set whether new database request calls are accepted or ignored. ", ""); I_Method0(bool, getAcceptNewDatabaseRequests, __bool__getAcceptNewDatabaseRequests, "Get whether new database request calls are accepted or ignored. ", ""); I_Method1(void, setUseFrameBlock, IN, bool, useFrameBlock, __void__setUseFrameBlock__bool, "Set the use of the frame block which, if enabled, blocks the DatabasePager from executing which the current frame is being drawn. ", "When a single processor machine is being used it can be useful to block on frame to help prevent the database paging thread from slowing the cull and draw traversals which in turn can cause frame drops. "); I_Method0(bool, getUseFrameBlock, __bool__getUseFrameBlock, "Get the whether UseFrameBlock is on or off. ", ""); I_Method0(osg::Block *, getFrameBlock, __osg_Block_P1__getFrameBlock, "", ""); I_Method1(void, setThreadPriorityDuringFrame, IN, osgDB::DatabasePager::ThreadPriority, duringFrame, __void__setThreadPriorityDuringFrame__ThreadPriority, "Set the priority of the database pager thread during the frame (i.e. ", "while cull and draw are running.) "); I_Method0(osgDB::DatabasePager::ThreadPriority, getThreadPriorityDuringFrame, __ThreadPriority__getThreadPriorityDuringFrame, "Get the priority of the database pager thread during the frame. ", ""); I_Method1(void, setThreadPriorityOutwithFrame, IN, osgDB::DatabasePager::ThreadPriority, outwithFrame, __void__setThreadPriorityOutwithFrame__ThreadPriority, "Set the priority of the database pager thread when the frame is not being exectuted (i.e. ", "before or after cull and draw have run.) "); I_Method0(osgDB::DatabasePager::ThreadPriority, getThreadPriorityOutwithFrame, __ThreadPriority__getThreadPriorityOutwithFrame, "Get the priority of the database pager thread when the frame is not being exectuted. ", ""); I_Method0(int, getNumFramesActive, __int__getNumFramesActive, "Get the number of frames that are currently active. ", ""); I_Method1(void, signalBeginFrame, IN, const osg::FrameStamp *, framestamp, __void__signalBeginFrame__C5_osg_FrameStamp_P1, "Signal the database thread that the update, cull and draw has begun for a new frame. ", "Note, this is called by the application so that the database pager can go to sleep while the CPU is busy on the main rendering threads. "); I_Method0(void, signalEndFrame, __void__signalEndFrame, "Signal the database thread that the update, cull and draw dispatch has completed. ", "Note, this is called by the application so that the database pager can go to wake back up now the main rendering threads are iddle waiting for the next frame. "); I_Method1(void, registerPagedLODs, IN, osg::Node *, subgraph, __void__registerPagedLODs__osg_Node_P1, "Find all PagedLOD nodes in a subgraph and register them with the DatabasePager so it can keep track of expired nodes. ", "note, should be only be called from the update thread. "); I_Method1(void, setDoPreCompile, IN, bool, flag, __void__setDoPreCompile__bool, "Set whether the database pager should pre compile OpenGL objects before allowing them to be merged into the scene graph. ", "Pre compilation helps reduce the chances of frame drops, but also slows the speed at which tiles are merged as they have to be compiled first. "); I_Method0(bool, getDoPreCompile, __bool__getDoPreCompile, "Get whether the database pager should pre compile OpenGL objects before allowing them to be merged into the scene graph. ", ""); I_Method1(void, setTargetFrameRate, IN, double, tfr, __void__setTargetFrameRate__double, "Set the target frame rate that the DatabasePager should assume. ", "Typically one would set this to the value refresh rate of your display system i.e. 60Hz. Default value is 100. Usage notes. The TargetFrameRate and the MinimumTimeAvailableForGLCompileAndDeletePerFrame parameters are not directly used by DatabasePager, but are should be used as a guide for how long to set aside per frame for compiling and deleting OpenGL objects - ie. the value to use when calling DatabasePager::compileGLObjectgs(state,availableTime,). The longer amount of time to set aside cthe faster databases will be paged in but with increased chance of frame drops, the lower the amount of time the set aside the slower databases will paged it but with better chance of avoid any frame drops. The default values are chosen to achieve the later when running on a modern mid to high end PC. The way to compute the amount of available time use a scheme such as : availableTime = maximum(1.0/targetFrameRate - timeTakenDuringUpdateCullAndDraw, minimumTimeAvailableForGLCompileAndDeletePerFrame)."); I_Method0(double, getTargetFrameRate, __double__getTargetFrameRate, "Get the target frame rate that the DatabasePager should assume. ", ""); I_Method1(void, setMinimumTimeAvailableForGLCompileAndDeletePerFrame, IN, double, ta, __void__setMinimumTimeAvailableForGLCompileAndDeletePerFrame__double, "Set the minimum amount of time (in seconds) that should be made available for compiling and delete OpenGL objects per frame. ", "Default value is 0.001 (1 millisecond). For usage see notes in setTargetFrameRate. "); I_Method0(double, getMinimumTimeAvailableForGLCompileAndDeletePerFrame, __double__getMinimumTimeAvailableForGLCompileAndDeletePerFrame, "Get the minimum amount of time that should be made available for compiling and delete OpenGL objects per frame. ", "For usage see notes in setTargetFrameRate. "); I_Method1(void, setMaximumNumOfObjectsToCompilePerFrame, IN, unsigned int, num, __void__setMaximumNumOfObjectsToCompilePerFrame__unsigned_int, "Set the maximum number of OpenGL objects that the page should attempt to compile per frame. ", "Note, Lower values reduces chances of a frame drop but lower the rate that database will be paged in at. Default value is 8. "); I_Method0(unsigned int, getMaximumNumOfObjectsToCompilePerFrame, __unsigned_int__getMaximumNumOfObjectsToCompilePerFrame, "Get the maximum number of OpenGL objects that the page should attempt to compile per frame. ", ""); I_Method1(void, setExpiryDelay, IN, double, expiryDelay, __void__setExpiryDelay__double, "Set the amount of time that a subgraph will be kept without being visited in the cull traversal before being removed. ", ""); I_Method0(double, getExpiryDelay, __double__getExpiryDelay, "Get the amount of time that a subgraph will be kept without being visited in the cull traversal before being removed. ", ""); I_Method1(void, setDeleteRemovedSubgraphsInDatabaseThread, IN, bool, flag, __void__setDeleteRemovedSubgraphsInDatabaseThread__bool, "Set whether the removed subgraphs should be deleted in the database thread or not. ", ""); I_Method0(bool, getDeleteRemovedSubgraphsInDatabaseThread, __bool__getDeleteRemovedSubgraphsInDatabaseThread, "Get whether the removed subgraphs should be deleted in the database thread or not. ", ""); I_Method1(void, setDrawablePolicy, IN, osgDB::DatabasePager::DrawablePolicy, policy, __void__setDrawablePolicy__DrawablePolicy, "Set how loaded drawables should be handled w.r.t their display list/vertex buffer object/vertex array settings. ", ""); I_Method0(osgDB::DatabasePager::DrawablePolicy, getDrawablePolicy, __DrawablePolicy__getDrawablePolicy, "Get how loaded drawables should be handled w.r.t their display list/vertex buffer object/vertex array settings. ", ""); I_Method2(void, setUnrefImageDataAfterApplyPolicy, IN, bool, changeAutoUnRef, IN, bool, valueAutoUnRef, __void__setUnrefImageDataAfterApplyPolicy__bool__bool, "Set whether newly loaded textures should have their UnrefImageDataAfterApply set to a specified value. ", ""); I_Method2(void, getUnrefImageDataAfterApplyPolicy, IN, bool &, changeAutoUnRef, IN, bool &, valueAutoUnRef, __void__getUnrefImageDataAfterApplyPolicy__bool_R1__bool_R1, "Get whether newly loaded textures should have their UnrefImageDataAfterApply set to a specified value. ", ""); I_Method2(void, setMaxAnisotropyPolicy, IN, bool, changeAnisotropy, IN, float, valueAnisotropy, __void__setMaxAnisotropyPolicy__bool__float, "Set whether newly loaded textures should have their MaxAnisotopy set to a specified value. ", ""); I_Method2(void, getMaxAnisotropyPolicy, IN, bool &, changeAnisotropy, IN, float &, valueAnisotropy, __void__getMaxAnisotropyPolicy__bool_R1__float_R1, "Set whether newly loaded textures should have their MaxAnisotopy set to a specified value. ", ""); I_Method0(bool, requiresUpdateSceneGraph, __bool__requiresUpdateSceneGraph, "Return true if there are pending updates to the scene graph that require a call to updateSceneGraph(double). ", ""); I_Method1(void, updateSceneGraph, IN, double, currentFrameTime, __void__updateSceneGraph__double, "Merge the changes to the scene graph by calling calling removeExpiredSubgraphs then addLoadedDataToSceneGraph. ", "Note, must only be called from single thread update phase. "); I_Method2(void, setCompileGLObjectsForContextID, IN, unsigned int, contextID, IN, bool, on, __void__setCompileGLObjectsForContextID__unsigned_int__bool, "Turn the compilation of rendering objects for specfied graphics context on (true) or off(false). ", ""); I_Method1(bool, getCompileGLObjectsForContextID, IN, unsigned int, contextID, __bool__getCompileGLObjectsForContextID__unsigned_int, "Get whether the compilation of rendering objects for specfied graphics context on (true) or off(false). ", ""); I_Method0(bool, requiresCompileGLObjects, __bool__requiresCompileGLObjects, "Return true if there are pending compile operations that are required. ", "If requiresCompileGLObjects() return true the application should call compileGLObjects() . "); I_Method2(void, compileGLObjects, IN, osg::State &, state, IN, double &, availableTime, __void__compileGLObjects__osg_State_R1__double_R1, "Compile the rendering objects (display lists,texture objects, VBO's) on loaded subgraph. ", "note, should only be called from the draw thread. Note, must only be called from a valid graphics context. "); I_Method0(unsigned int, getFileRequestListSize, __unsigned_int__getFileRequestListSize, "Report how many items are in the _fileRequestList queue. ", ""); I_Method0(unsigned int, getDataToCompileListSize, __unsigned_int__getDataToCompileListSize, "Report how many items are in the _dataToCompileList queue. ", ""); I_SimpleProperty(bool, AcceptNewDatabaseRequests, __bool__getAcceptNewDatabaseRequests, __void__setAcceptNewDatabaseRequests__bool); I_IndexedProperty(bool, CompileGLObjectsForContextID, __bool__getCompileGLObjectsForContextID__unsigned_int, __void__setCompileGLObjectsForContextID__unsigned_int__bool, 0); I_SimpleProperty(unsigned int, DataToCompileListSize, __unsigned_int__getDataToCompileListSize, 0); I_SimpleProperty(bool, DatabasePagerThreadPause, __bool__getDatabasePagerThreadPause, __void__setDatabasePagerThreadPause__bool); I_SimpleProperty(bool, DeleteRemovedSubgraphsInDatabaseThread, __bool__getDeleteRemovedSubgraphsInDatabaseThread, __void__setDeleteRemovedSubgraphsInDatabaseThread__bool); I_SimpleProperty(bool, DoPreCompile, __bool__getDoPreCompile, __void__setDoPreCompile__bool); I_SimpleProperty(osgDB::DatabasePager::DrawablePolicy, DrawablePolicy, __DrawablePolicy__getDrawablePolicy, __void__setDrawablePolicy__DrawablePolicy); I_SimpleProperty(double, ExpiryDelay, __double__getExpiryDelay, __void__setExpiryDelay__double); I_SimpleProperty(unsigned int, FileRequestListSize, __unsigned_int__getFileRequestListSize, 0); I_SimpleProperty(osg::Block *, FrameBlock, __osg_Block_P1__getFrameBlock, 0); I_SimpleProperty(unsigned int, MaximumNumOfObjectsToCompilePerFrame, __unsigned_int__getMaximumNumOfObjectsToCompilePerFrame, __void__setMaximumNumOfObjectsToCompilePerFrame__unsigned_int); I_SimpleProperty(double, MinimumTimeAvailableForGLCompileAndDeletePerFrame, __double__getMinimumTimeAvailableForGLCompileAndDeletePerFrame, __void__setMinimumTimeAvailableForGLCompileAndDeletePerFrame__double); I_SimpleProperty(double, TargetFrameRate, __double__getTargetFrameRate, __void__setTargetFrameRate__double); I_SimpleProperty(osgDB::DatabasePager::ThreadPriority, ThreadPriorityDuringFrame, __ThreadPriority__getThreadPriorityDuringFrame, __void__setThreadPriorityDuringFrame__ThreadPriority); I_SimpleProperty(osgDB::DatabasePager::ThreadPriority, ThreadPriorityOutwithFrame, __ThreadPriority__getThreadPriorityOutwithFrame, __void__setThreadPriorityOutwithFrame__ThreadPriority); I_SimpleProperty(bool, UseFrameBlock, __bool__getUseFrameBlock, __void__setUseFrameBlock__bool); END_REFLECTOR BEGIN_VALUE_REFLECTOR(osg::ref_ptr< osg::PagedLOD >) I_Constructor0(____ref_ptr, "", ""); I_Constructor1(IN, osg::PagedLOD *, ptr, ____ref_ptr__T_P1, "", ""); I_Constructor1(IN, const osg::ref_ptr< osg::PagedLOD > &, rp, ____ref_ptr__C5_ref_ptr_R1, "", ""); I_Method0(osg::PagedLOD *, get, __T_P1__get, "", ""); I_Method0(bool, valid, __bool__valid, "", ""); I_Method0(osg::PagedLOD *, release, __T_P1__release, "", ""); I_Method1(void, swap, IN, osg::ref_ptr< osg::PagedLOD > &, rp, __void__swap__ref_ptr_R1, "", ""); I_SimpleProperty(osg::PagedLOD *, , __T_P1__get, 0); END_REFLECTOR STD_LIST_REFLECTOR(std::list< osg::ref_ptr< osg::PagedLOD > >); STD_MAP_REFLECTOR(std::map< unsigned int COMMA osgDB::DatabasePager::DataToCompile >); STD_PAIR_REFLECTOR(std::pair< osgDB::DatabasePager::StateSetList COMMA osgDB::DatabasePager::DrawableList >); STD_SET_REFLECTOR(std::set< osg::ref_ptr< osg::StateSet > >); STD_SET_REFLECTOR(std::set< unsigned int >);