From dedc99f036027a3f93a02f86cb4e5959d5849b62 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 5 Jul 2007 18:41:54 +0000 Subject: [PATCH] Updated wrappers. --- src/osgWrappers/osg/GraphicsContext.cpp | 28 +++++++++++++++++ src/osgWrappers/osgTerrain/TerrainNode.cpp | 30 +++++++++++++++++++ src/osgWrappers/osgViewer/CompositeViewer.cpp | 2 -- 3 files changed, 58 insertions(+), 2 deletions(-) diff --git a/src/osgWrappers/osg/GraphicsContext.cpp b/src/osgWrappers/osg/GraphicsContext.cpp index e31021d9b..f0dde9d1e 100644 --- a/src/osgWrappers/osg/GraphicsContext.cpp +++ b/src/osgWrappers/osg/GraphicsContext.cpp @@ -27,6 +27,8 @@ #include +TYPE_NAME_ALIAS(std::vector< osg::GraphicsContext * >, osg::GraphicsContext::GraphicsContexts) + TYPE_NAME_ALIAS(std::list< osg::ref_ptr< osg::Operation > >, osg::GraphicsContext::OperationQueue) TYPE_NAME_ALIAS(std::list< osg::Camera * >, osg::GraphicsContext::Cameras) @@ -300,6 +302,10 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osg::GraphicsContext) __unsigned_int__createNewContextID_S, "Create a contextID for a new graphics context, this contextID is used to set up the osg::State associate with context. ", "Automatically increments the usage count of the contextID to 1. "); + I_StaticMethod0(unsigned int, getMaxContextID, + __unsigned_int__getMaxContextID_S, + "Get the current max ContextID. ", + ""); I_StaticMethod1(void, incrementContextIDUsageCount, IN, unsigned int, contextID, __void__incrementContextIDUsageCount__unsigned_int_S, "Increment the usage count associate with a contextID. ", @@ -308,6 +314,26 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osg::GraphicsContext) __void__decrementContextIDUsageCount__unsigned_int_S, "Decrement the usage count associate with a contextID. ", "Once the contextID goes to 0 the contextID is then free to be reused. "); + I_StaticMethod0(osg::GraphicsContext::GraphicsContexts, getAllRegisteredGraphicsContexts, + __GraphicsContexts__getAllRegisteredGraphicsContexts_S, + "Get all the registered graphics contexts. ", + ""); + I_StaticMethod1(osg::GraphicsContext::GraphicsContexts, getRegisteredGraphicsContexts, IN, unsigned int, contextID, + __GraphicsContexts__getRegisteredGraphicsContexts__unsigned_int_S, + "Get all the registered graphics contexts associated with a specific contextID. ", + ""); + I_StaticMethod2(void, setCompileContext, IN, unsigned int, contextID, IN, osg::GraphicsContext *, gc, + __void__setCompileContext__unsigned_int__GraphicsContext_P1_S, + "Get the GraphicsContext for doing background compilation for GraphicsContexts associated with specified contextID. ", + ""); + I_StaticMethod1(osg::GraphicsContext *, getOrCreateCompileContext, IN, unsigned int, contextID, + __GraphicsContext_P1__getOrCreateCompileContext__unsigned_int_S, + "Get existing or create a new GraphicsContext to do background compilation for GraphicsContexts associated with specified contextID. ", + ""); + I_StaticMethod1(osg::GraphicsContext *, getCompileContext, IN, unsigned int, contextID, + __GraphicsContext_P1__getCompileContext__unsigned_int_S, + "Get the GraphicsContext for doing background compilation for GraphicsContexts associated with specified contextID. ", + ""); I_ProtectedConstructor0(____GraphicsContext, "", ""); @@ -526,3 +552,5 @@ STD_LIST_REFLECTOR(std::list< osg::Camera * >) STD_LIST_REFLECTOR(std::list< osg::ref_ptr< osg::Operation > >) +STD_VECTOR_REFLECTOR(std::vector< osg::GraphicsContext * >) + diff --git a/src/osgWrappers/osgTerrain/TerrainNode.cpp b/src/osgWrappers/osgTerrain/TerrainNode.cpp index dea78b2a9..8da5dc306 100644 --- a/src/osgWrappers/osgTerrain/TerrainNode.cpp +++ b/src/osgWrappers/osgTerrain/TerrainNode.cpp @@ -12,6 +12,8 @@ #include #include +#include +#include #include #include #include @@ -194,6 +196,31 @@ BEGIN_OBJECT_REFLECTOR(osgTerrain::TerrainNode) __bool__getTreatBoundariesToValidDataAsDefaultValue, "Get whether the TeatBoundariesToValidDataAsDefaultValue hint. ", ""); + I_Method1(void, setOperationsThread, IN, osg::OperationsThread *, operationsThread, + Properties::NON_VIRTUAL, + __void__setOperationsThread__osg_OperationsThread_P1, + "Set an OperationsThread to do an data initialization and update work. ", + ""); + I_Method0(osg::OperationsThread *, getOperationsThread, + Properties::NON_VIRTUAL, + __osg_OperationsThread_P1__getOperationsThread, + "Get the OperationsThread if one is attached, return NULL otherwise. ", + ""); + I_Method0(const osg::OperationsThread *, getOperationsThread, + Properties::NON_VIRTUAL, + __C5_osg_OperationsThread_P1__getOperationsThread, + "Get the const OperationsThread if one is attached, return NULL otherwise. ", + ""); + I_Method1(void, addCompileGraphicsContext, IN, osg::GraphicsContext *, gc, + Properties::NON_VIRTUAL, + __void__addCompileGraphicsContext__osg_GraphicsContext_P1, + "Add a graphics context that should be used to compile/delete OpenGL objects. ", + ""); + I_Method1(void, removeCompileGraphicsContext, IN, osg::GraphicsContext *, gc, + Properties::NON_VIRTUAL, + __void__removeCompileGraphicsContext__osg_GraphicsContext_P1, + "Removed a graphics context that should be used to compile/delete OpenGL objects. ", + ""); I_Method0(osg::BoundingSphere, computeBound, Properties::VIRTUAL, __osg_BoundingSphere__computeBound, @@ -220,6 +247,9 @@ BEGIN_OBJECT_REFLECTOR(osgTerrain::TerrainNode) I_SimpleProperty(osgTerrain::Locator *, Locator, __Locator_P1__getLocator, __void__setLocator__Locator_P1); + I_SimpleProperty(osg::OperationsThread *, OperationsThread, + __osg_OperationsThread_P1__getOperationsThread, + __void__setOperationsThread__osg_OperationsThread_P1); I_SimpleProperty(bool, RequiresNormals, __bool__getRequiresNormals, __void__setRequiresNormals__bool); diff --git a/src/osgWrappers/osgViewer/CompositeViewer.cpp b/src/osgWrappers/osgViewer/CompositeViewer.cpp index 1a57672e1..623936108 100644 --- a/src/osgWrappers/osgViewer/CompositeViewer.cpp +++ b/src/osgWrappers/osgViewer/CompositeViewer.cpp @@ -351,8 +351,6 @@ BEGIN_OBJECT_REFLECTOR(osgViewer::CompositeViewer) 0); END_REFLECTOR -STD_VECTOR_REFLECTOR(std::vector< osg::GraphicsContext * >) - STD_VECTOR_REFLECTOR(std::vector< osgViewer::GraphicsWindow * >) STD_VECTOR_REFLECTOR(std::vector< osgViewer::Scene * >)