Updated wrappers

This commit is contained in:
Robert Osfield
2007-01-05 17:21:35 +00:00
parent 9a4209c61b
commit 2913cb9422
25 changed files with 328 additions and 89 deletions

View File

@@ -356,6 +356,10 @@ BEGIN_OBJECT_REFLECTOR(osg::Camera)
__OpenThreads_Mutex_P1__getDataChangeMutex,
"",
"");
I_Method1(void, resizeGLObjectBuffers, IN, unsigned int, maxSize,
__void__resizeGLObjectBuffers__unsigned_int,
"Resize any per context GLObject buffers to specified size. ",
"");
I_MethodWithDefaults1(void, releaseGLObjects, IN, osg::State *, x, 0,
__void__releaseGLObjects__osg_State_P1,
"If State is non-zero, this function releases any associated OpenGL objects for the specified graphics context. ",

View File

@@ -212,6 +212,14 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osg::Drawable)
__void__compileGLObjects__RenderInfo_R1,
"Immediately compile this Drawable into an OpenGL Display List. ",
"Operation is ignored if _useDisplayList is false. ");
I_Method1(void, setThreadSafeRefUnref, IN, bool, threadSafe,
__void__setThreadSafeRefUnref__bool,
"Set whether to use a mutex to ensure ref() and unref() are thread safe. ",
"");
I_Method1(void, resizeGLObjectBuffers, IN, unsigned int, maxSize,
__void__resizeGLObjectBuffers__unsigned_int,
"Resize any per context GLObject buffers to specified size. ",
"");
I_MethodWithDefaults1(void, releaseGLObjects, IN, osg::State *, state, 0,
__void__releaseGLObjects__State_P1,
"If State is non-zero, this function releases OpenGL objects for the specified graphics context. ",
@@ -392,6 +400,9 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osg::Drawable)
I_SimpleProperty(bool, SupportsDisplayList,
__bool__getSupportsDisplayList,
__void__setSupportsDisplayList__bool);
I_SimpleProperty(bool, ThreadSafeRefUnref,
0,
__void__setThreadSafeRefUnref__bool);
I_SimpleProperty(osg::Drawable::UpdateCallback *, UpdateCallback,
__UpdateCallback_P1__getUpdateCallback,
__void__setUpdateCallback__UpdateCallback_P1);

View File

@@ -129,7 +129,11 @@ BEGIN_OBJECT_REFLECTOR(osg::FragmentProgram)
"The render info for the current OpenGL context is passed in to allow the StateAttribute to obtain details on the the current context and state.");
I_Method1(void, compileGLObjects, IN, osg::State &, state,
__void__compileGLObjects__State_R1,
"default to nothing to compile - all state is applied immediately. ",
"Default to nothing to compile - all state is applied immediately. ",
"");
I_Method1(void, resizeGLObjectBuffers, IN, unsigned int, maxSize,
__void__resizeGLObjectBuffers__unsigned_int,
"Resize any per context GLObject buffers to specified size. ",
"");
I_MethodWithDefaults1(void, releaseGLObjects, IN, osg::State *, state, 0,
__void__releaseGLObjects__State_P1,

View File

@@ -119,6 +119,14 @@ BEGIN_OBJECT_REFLECTOR(osg::Geode)
__BoundingSphere__computeBound,
"Compute the bounding sphere around Node's geometry or children. ",
"This method is automatically called by getBound() when the bounding sphere has been marked dirty via dirtyBound(). ");
I_Method1(void, setThreadSafeRefUnref, IN, bool, threadSafe,
__void__setThreadSafeRefUnref__bool,
"Set whether to use a mutex to ensure ref() and unref() are thread safe. ",
"");
I_Method1(void, resizeGLObjectBuffers, IN, unsigned int, maxSize,
__void__resizeGLObjectBuffers__unsigned_int,
"Resize any per context GLObject buffers to specified size. ",
"");
I_MethodWithDefaults1(void, releaseGLObjects, IN, osg::State *, x, 0,
__void__releaseGLObjects__osg_State_P1,
"If State is non-zero, this function releases any associated OpenGL objects for the specified graphics context. ",
@@ -136,6 +144,9 @@ BEGIN_OBJECT_REFLECTOR(osg::Geode)
I_SimpleProperty(const osg::Geode::DrawableList &, DrawableList,
__C5_DrawableList_R1__getDrawableList,
0);
I_SimpleProperty(bool, ThreadSafeRefUnref,
0,
__void__setThreadSafeRefUnref__bool);
END_REFLECTOR
BEGIN_VALUE_REFLECTOR(osg::ref_ptr< osg::Drawable >)

View File

@@ -13,6 +13,7 @@
#include <osg/GraphicsContext>
#include <osg/GraphicsThread>
#include <osg/State>
#include <osg/Vec4>
// Must undefine IN and OUT macros defined in Windows headers
#ifdef IN
@@ -22,6 +23,8 @@
#undef OUT
#endif
TYPE_NAME_ALIAS(std::list< osg::Camera * >, osg::GraphicsContext::Cameras);
BEGIN_ABSTRACT_OBJECT_REFLECTOR(osg::GraphicsContext)
I_BaseType(osg::Referenced);
I_Method1(void, add, IN, osg::GraphicsOperation *, operation,
@@ -48,6 +51,10 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osg::GraphicsContext)
__C5_Traits_P1__getTraits,
"Get the traits of the GraphicsContext. ",
"");
I_Method0(bool, valid,
__bool__valid,
"Return whether a valid and usable GraphicsContext has been created. ",
"");
I_Method1(void, setState, IN, osg::State *, state,
__void__setState__State_P1,
"Set the State object which tracks the current OpenGL state for this graphics context. ",
@@ -60,10 +67,26 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osg::GraphicsContext)
__C5_State_P1__getState,
"Get the const State object which tracks the current OpenGL state for this graphics context. ",
"");
I_Method0(bool, valid,
__bool__valid,
"Return whether a valid and usable GraphicsContext has been created. ",
I_Method1(void, setClearColor, IN, const osg::Vec4 &, color,
__void__setClearColor__C5_Vec4_R1,
"Sets the clear color. ",
"");
I_Method0(const osg::Vec4 &, getClearColor,
__C5_Vec4_R1__getClearColor,
"Returns the clear color. ",
"");
I_Method1(void, setClearMask, IN, GLbitfield, mask,
__void__setClearMask__GLbitfield,
"Set the clear mask used in glClear(. ",
".). Defaults to GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT. ");
I_Method0(GLbitfield, getClearMask,
__GLbitfield__getClearMask,
"Get the clear mask. ",
"");
I_Method0(void, clear,
__void__clear,
"Do an OpenGL clear of the full graphics context/window. ",
"Note, must only be called from a thread with this context current. ");
I_Method0(bool, realize,
__bool__realize,
"Realise the GraphicsContext. ",
@@ -144,6 +167,18 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osg::GraphicsContext)
__void__swapBuffersImplementation,
"Swap the front and back buffers implementation. ",
"Pure virtual - must be implemented by Concrate implementations of GraphicsContext. ");
I_Method4(void, resized, IN, int, x, IN, int, y, IN, int, width, IN, int, height,
__void__resized__int__int__int__int,
"resized method should be called when the underlying window has been resized and the GraphicsWindow and associated Cameras must be updated to keep in sync with the new size. ",
"");
I_Method0(osg::GraphicsContext::Cameras &, getCameras,
__Cameras_R1__getCameras,
"Get the the list of cameras associated with this graphics context. ",
"");
I_Method0(const osg::GraphicsContext::Cameras &, getCameras,
__C5_Cameras_R1__getCameras,
"Get the the const list of cameras associated with this graphics context. ",
"");
I_StaticMethod1(void, setWindowingSystemInterface, IN, osg::GraphicsContext::WindowingSystemInterface *, wsInterface,
__void__setWindowingSystemInterface__WindowingSystemInterface_P1_S,
"Set the querry the windowing system for screens and create graphics context - this functor should be supplied by the windows toolkit. ",
@@ -168,6 +203,15 @@ 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_SimpleProperty(osg::GraphicsContext::Cameras &, Cameras,
__Cameras_R1__getCameras,
0);
I_SimpleProperty(const osg::Vec4 &, ClearColor,
__C5_Vec4_R1__getClearColor,
__void__setClearColor__C5_Vec4_R1);
I_SimpleProperty(GLbitfield, ClearMask,
__GLbitfield__getClearMask,
__void__setClearMask__GLbitfield);
I_SimpleProperty(osg::GraphicsThread *, GraphicsThread,
__GraphicsThread_P1__getGraphicsThread,
__void__setGraphicsThread__GraphicsThread_P1);
@@ -206,10 +250,10 @@ BEGIN_OBJECT_REFLECTOR(osg::GraphicsContext::Traits)
I_Constructor0(____Traits,
"",
"");
I_PublicMemberProperty(unsigned int, x);
I_PublicMemberProperty(unsigned int, y);
I_PublicMemberProperty(unsigned int, width);
I_PublicMemberProperty(unsigned int, height);
I_PublicMemberProperty(int, x);
I_PublicMemberProperty(int, y);
I_PublicMemberProperty(int, width);
I_PublicMemberProperty(int, height);
I_PublicMemberProperty(std::string, windowName);
I_PublicMemberProperty(bool, windowDecoration);
I_PublicMemberProperty(bool, supportsResize);
@@ -250,3 +294,5 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osg::GraphicsContext::WindowingSystemInterface)
"");
END_REFLECTOR
STD_LIST_REFLECTOR(std::list< osg::Camera * >);

View File

@@ -119,6 +119,14 @@ BEGIN_OBJECT_REFLECTOR(osg::Group)
__unsigned_int__getChildIndex__C5_Node_P1,
"Get the index number of child, return a value between 0 and _children.size()-1 if found, if not found then return _children.size(). ",
"");
I_Method1(void, setThreadSafeRefUnref, IN, bool, threadSafe,
__void__setThreadSafeRefUnref__bool,
"Set whether to use a mutex to ensure ref() and unref() are thread safe. ",
"");
I_Method1(void, resizeGLObjectBuffers, IN, unsigned int, maxSize,
__void__resizeGLObjectBuffers__unsigned_int,
"Resize any per context GLObject buffers to specified size. ",
"");
I_MethodWithDefaults1(void, releaseGLObjects, IN, osg::State *, x, 0,
__void__releaseGLObjects__osg_State_P1,
"If State is non-zero, this function releases any associated OpenGL objects for the specified graphics context. ",
@@ -134,6 +142,9 @@ BEGIN_OBJECT_REFLECTOR(osg::Group)
__bool__addChild__Node_P1,
__bool__insertChild__unsigned_int__Node_P1,
__bool__removeChild__unsigned_int__unsigned_int);
I_SimpleProperty(bool, ThreadSafeRefUnref,
0,
__void__setThreadSafeRefUnref__bool);
END_REFLECTOR
TYPE_NAME_ALIAS(std::vector< osg::ref_ptr< osg::Node > >, osg::NodeList);

View File

@@ -272,6 +272,14 @@ BEGIN_OBJECT_REFLECTOR(osg::Node)
__C5_ComputeBoundingSphereCallback_P1__getComputeBoundingSphereCallback,
"Get the const compute bound callback. ",
"");
I_Method1(void, setThreadSafeRefUnref, IN, bool, threadSafe,
__void__setThreadSafeRefUnref__bool,
"Set whether to use a mutex to ensure ref() and unref() are thread safe. ",
"");
I_Method1(void, resizeGLObjectBuffers, IN, unsigned, int,
__void__resizeGLObjectBuffers__unsigned,
"Resize any per context GLObject buffers to specified size. ",
"");
I_MethodWithDefaults1(void, releaseGLObjects, IN, osg::State *, x, 0,
__void__releaseGLObjects__osg_State_P1,
"If State is non-zero, this function releases any associated OpenGL objects for the specified graphics context. ",
@@ -320,6 +328,9 @@ BEGIN_OBJECT_REFLECTOR(osg::Node)
I_SimpleProperty(osg::StateSet *, StateSet,
__osg_StateSet_P1__getStateSet,
__void__setStateSet__osg_StateSet_P1);
I_SimpleProperty(bool, ThreadSafeRefUnref,
0,
__void__setThreadSafeRefUnref__bool);
I_SimpleProperty(osg::NodeCallback *, UpdateCallback,
__NodeCallback_P1__getUpdateCallback,
__void__setUpdateCallback__NodeCallback_P1);

View File

@@ -93,6 +93,10 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osg::Object)
__C5_Referenced_P1__getUserData,
"Get const user data. ",
"");
I_Method1(void, resizeGLObjectBuffers, IN, unsigned, int,
__void__resizeGLObjectBuffers__unsigned,
"Resize any per context GLObject buffers to specified size. ",
"");
I_MethodWithDefaults1(void, releaseGLObjects, IN, osg::State *, x, 0,
__void__releaseGLObjects__osg_State_P1,
"If State is non-zero, this function releases any associated OpenGL objects for the specified graphics context. ",

View File

@@ -275,10 +275,18 @@ BEGIN_OBJECT_REFLECTOR(osg::DrawElementsUByte)
__void__offsetIndices__int,
"",
"");
I_Method1(void, resizeGLObjectBuffers, IN, unsigned int, maxSize,
__void__resizeGLObjectBuffers__unsigned_int,
"Resize any per context GLObject buffers to specified size. ",
"");
I_MethodWithDefaults1(void, releaseGLObjects, IN, osg::State *, state, 0,
__void__releaseGLObjects__State_P1,
"If State is non-zero, this function releases OpenGL objects for the specified graphics context. ",
"Otherwise, releases OpenGL objexts for all graphics contexts. ");
I_Method0(void, computeRange,
__void__computeRange,
"",
"");
I_SimpleProperty(const GLvoid *, DataPointer,
__C5_GLvoid_P1__getDataPointer,
0);
@@ -364,10 +372,18 @@ BEGIN_OBJECT_REFLECTOR(osg::DrawElementsUInt)
__void__offsetIndices__int,
"",
"");
I_Method1(void, resizeGLObjectBuffers, IN, unsigned int, maxSize,
__void__resizeGLObjectBuffers__unsigned_int,
"Resize any per context GLObject buffers to specified size. ",
"");
I_MethodWithDefaults1(void, releaseGLObjects, IN, osg::State *, state, 0,
__void__releaseGLObjects__State_P1,
"If State is non-zero, this function releases OpenGL objects for the specified graphics context. ",
"Otherwise, releases OpenGL objexts for all graphics contexts. ");
I_Method0(void, computeRange,
__void__computeRange,
"",
"");
I_SimpleProperty(const GLvoid *, DataPointer,
__C5_GLvoid_P1__getDataPointer,
0);
@@ -453,10 +469,18 @@ BEGIN_OBJECT_REFLECTOR(osg::DrawElementsUShort)
__void__offsetIndices__int,
"",
"");
I_Method1(void, resizeGLObjectBuffers, IN, unsigned int, maxSize,
__void__resizeGLObjectBuffers__unsigned_int,
"Resize any per context GLObject buffers to specified size. ",
"");
I_MethodWithDefaults1(void, releaseGLObjects, IN, osg::State *, state, 0,
__void__releaseGLObjects__State_P1,
"If State is non-zero, this function releases OpenGL objects for the specified graphics context. ",
"Otherwise, releases OpenGL objexts for all graphics contexts. ");
I_Method0(void, computeRange,
__void__computeRange,
"",
"");
I_SimpleProperty(const GLvoid *, DataPointer,
__C5_GLvoid_P1__getDataPointer,
0);
@@ -685,10 +709,18 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osg::PrimitiveSet)
__unsigned_int__getModifiedCount,
"Get modified count value. ",
"");
I_Method1(void, resizeGLObjectBuffers, IN, unsigned, int,
__void__resizeGLObjectBuffers__unsigned,
"Resize any per context GLObject buffers to specified size. ",
"");
I_MethodWithDefaults1(void, releaseGLObjects, IN, osg::State *, x, 0,
__void__releaseGLObjects__State_P1,
"If State is non-zero, this function releases OpenGL objects for the specified graphics context. ",
"Otherwise, releases OpenGL objexts for all graphics contexts. ");
I_Method0(void, computeRange,
__void__computeRange,
"",
"");
I_SimpleProperty(const GLvoid *, DataPointer,
__C5_GLvoid_P1__getDataPointer,
0);

View File

@@ -71,9 +71,17 @@ BEGIN_OBJECT_REFLECTOR(osg::Program)
__void__apply__osg_State_R1,
"If enabled, activate our program in the GL pipeline, performing any rebuild operations that might be pending. ",
"");
I_Method1(void, setThreadSafeRefUnref, IN, bool, threadSafe,
__void__setThreadSafeRefUnref__bool,
"Set whether to use a mutex to ensure ref() and unref() are thread safe. ",
"");
I_Method1(void, compileGLObjects, IN, osg::State &, state,
__void__compileGLObjects__osg_State_R1,
"default to nothing to compile - all state is applied immediately. ",
"Compile program and associated shaders. ",
"");
I_Method1(void, resizeGLObjectBuffers, IN, unsigned int, maxSize,
__void__resizeGLObjectBuffers__unsigned_int,
"Resize any per context GLObject buffers to specified size. ",
"");
I_MethodWithDefaults1(void, releaseGLObjects, IN, osg::State *, state, 0,
__void__releaseGLObjects__osg_State_P1,
@@ -153,6 +161,9 @@ BEGIN_OBJECT_REFLECTOR(osg::Program)
__bool__addShader__Shader_P1,
0,
0);
I_SimpleProperty(bool, ThreadSafeRefUnref,
0,
__void__setThreadSafeRefUnref__bool);
I_SimpleProperty(osg::StateAttribute::Type, Type,
__Type__getType,
0);

View File

@@ -91,6 +91,10 @@ BEGIN_OBJECT_REFLECTOR(osg::Shader)
__C5_char_P1__getTypename,
"Get the Shader type as a descriptive string. ",
"");
I_Method1(void, resizeGLObjectBuffers, IN, unsigned int, maxSize,
__void__resizeGLObjectBuffers__unsigned_int,
"Resize any per context GLObject buffers to specified size. ",
"");
I_MethodWithDefaults1(void, releaseGLObjects, IN, osg::State *, state, 0,
__void__releaseGLObjects__osg_State_P1,
"release OpenGL objects in specified graphics context if State object is passed, otherwise release OpenGL objects for all graphics context if State object pointer NULL. ",

View File

@@ -196,11 +196,15 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osg::StateAttribute)
"The render info for the current OpenGL context is passed in to allow the StateAttribute to obtain details on the the current context and state.");
I_Method1(void, compileGLObjects, IN, osg::State &, x,
__void__compileGLObjects__State_R1,
"default to nothing to compile - all state is applied immediately. ",
"Default to nothing to compile - all state is applied immediately. ",
"");
I_Method1(void, resizeGLObjectBuffers, IN, unsigned, int,
__void__resizeGLObjectBuffers__unsigned,
"Resize any per context GLObject buffers to specified size. ",
"");
I_MethodWithDefaults1(void, releaseGLObjects, IN, osg::State *, x, 0,
__void__releaseGLObjects__State_P1,
"release OpenGL objects in specified graphics context if State object is passed, otherwise release OpenGL objexts for all graphics context if State object pointer NULL. ",
"Release OpenGL objects in specified graphics context if State object is passed, otherwise release OpenGL objexts for all graphics context if State object pointer NULL. ",
"");
I_SimpleProperty(osg::StateAttribute::Callback *, EventCallback,
__Callback_P1__getEventCallback,

View File

@@ -391,10 +391,18 @@ BEGIN_OBJECT_REFLECTOR(osg::StateSet)
__bool__checkValidityOfAssociatedModes__State_R1,
"Check the modes associated with this StateSet are supported by current OpenGL drivers, and if not set the associated mode in osg::State to be black listed/invalid. ",
"Return true if all associated modes are valid. ");
I_Method1(void, setThreadSafeRefUnref, IN, bool, threadSafe,
__void__setThreadSafeRefUnref__bool,
"Set whether to use a mutex to ensure ref() and unref() are thread safe. ",
"");
I_Method1(void, compileGLObjects, IN, osg::State &, state,
__void__compileGLObjects__State_R1,
"call compile on all StateAttributes contained within this StateSet. ",
"");
I_Method1(void, resizeGLObjectBuffers, IN, unsigned int, maxSize,
__void__resizeGLObjectBuffers__unsigned_int,
"Resize any per context GLObject buffers to specified size. ",
"");
I_MethodWithDefaults1(void, releaseGLObjects, IN, osg::State *, state, 0,
__void__releaseGLObjects__State_P1,
"call release on all StateAttributes contained within this StateSet. ",
@@ -441,6 +449,9 @@ BEGIN_OBJECT_REFLECTOR(osg::StateSet)
I_SimpleProperty(osg::StateSet::TextureModeList &, TextureModeList,
__TextureModeList_R1__getTextureModeList,
__void__setTextureModeList__TextureModeList_R1);
I_SimpleProperty(bool, ThreadSafeRefUnref,
0,
__void__setThreadSafeRefUnref__bool);
I_SimpleProperty(osg::StateSet::UniformList &, UniformList,
__UniformList_R1__getUniformList,
__void__setUniformList__UniformList_R1);

View File

@@ -328,6 +328,10 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osg::Texture)
__void__compileGLObjects__State_R1,
"Calls apply(state) to compile the texture. ",
"");
I_Method1(void, resizeGLObjectBuffers, IN, unsigned int, maxSize,
__void__resizeGLObjectBuffers__unsigned_int,
"Resize any per context GLObject buffers to specified size. ",
"");
I_MethodWithDefaults1(void, releaseGLObjects, IN, osg::State *, state, 0,
__void__releaseGLObjects__State_P1,
"If State is non-zero, this function releases OpenGL objects for the specified graphics context. ",
@@ -734,6 +738,10 @@ BEGIN_VALUE_REFLECTOR(osg::buffered_object< osg::Texture::TextureObjectList >)
__unsigned_int__size,
"",
"");
I_Method1(void, resize, IN, unsigned int, newSize,
__void__resize__unsigned_int,
"",
"");
I_SimpleProperty(const osg::Texture::TextureObjectList &, AllElementsTo,
0,
__void__setAllElementsTo__C5_T_R1);

View File

@@ -129,7 +129,11 @@ BEGIN_OBJECT_REFLECTOR(osg::VertexProgram)
"The render info for the current OpenGL context is passed in to allow the StateAttribute to obtain details on the the current context and state.");
I_Method1(void, compileGLObjects, IN, osg::State &, state,
__void__compileGLObjects__State_R1,
"default to nothing to compile - all state is applied immediately. ",
"Default to nothing to compile - all state is applied immediately. ",
"");
I_Method1(void, resizeGLObjectBuffers, IN, unsigned int, maxSize,
__void__resizeGLObjectBuffers__unsigned_int,
"Resize any per context GLObject buffers to specified size. ",
"");
I_MethodWithDefaults1(void, releaseGLObjects, IN, osg::State *, state, 0,
__void__releaseGLObjects__State_P1,

View File

@@ -64,10 +64,18 @@ BEGIN_OBJECT_REFLECTOR(osg::View)
__C5_Slave_R1__getSlave__unsigned_int,
"",
"");
I_Method1(osg::View::Slave *, findSlaveForCamera, IN, osg::Camera *, camera,
__Slave_P1__findSlaveForCamera__osg_Camera_P1,
"",
"");
I_Method0(void, updateSlaves,
__void__updateSlaves,
"",
"");
I_Method1(void, updateSlave, IN, unsigned int, i,
__void__updateSlave__unsigned_int,
"",
"");
I_SimpleProperty(osg::Camera *, Camera,
__osg_Camera_P1__getCamera,
__void__setCamera__osg_Camera_P1);

View File

@@ -25,13 +25,15 @@
#undef OUT
#endif
TYPE_NAME_ALIAS(double, osg::Viewport::value_type);
BEGIN_OBJECT_REFLECTOR(osg::Viewport)
I_BaseType(osg::StateAttribute);
I_Constructor0(____Viewport,
"",
"");
I_Constructor4(IN, int, x, IN, int, y, IN, int, width, IN, int, height,
____Viewport__int__int__int__int,
I_Constructor4(IN, osg::Viewport::value_type, x, IN, osg::Viewport::value_type, y, IN, osg::Viewport::value_type, width, IN, osg::Viewport::value_type, height,
____Viewport__value_type__value_type__value_type__value_type,
"",
"");
I_ConstructorWithDefaults2(IN, const osg::Viewport &, vp, , IN, const osg::CopyOp &, copyop, osg::CopyOp::SHALLOW_COPY,
@@ -66,52 +68,48 @@ BEGIN_OBJECT_REFLECTOR(osg::Viewport)
__int__compare__C5_StateAttribute_R1,
"Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. ",
"");
I_Method4(void, setViewport, IN, int, x, IN, int, y, IN, int, width, IN, int, height,
__void__setViewport__int__int__int__int,
I_Method4(void, setViewport, IN, osg::Viewport::value_type, x, IN, osg::Viewport::value_type, y, IN, osg::Viewport::value_type, width, IN, osg::Viewport::value_type, height,
__void__setViewport__value_type__value_type__value_type__value_type,
"",
"");
I_Method4(void, getViewport, IN, int &, x, IN, int &, y, IN, int &, width, IN, int &, height,
__void__getViewport__int_R1__int_R1__int_R1__int_R1,
I_Method0(osg::Viewport::value_type &, x,
__value_type_R1__x,
"",
"");
I_Method0(int &, x,
__int_R1__x,
I_Method0(osg::Viewport::value_type, x,
__value_type__x,
"",
"");
I_Method0(int, x,
__int__x,
I_Method0(osg::Viewport::value_type &, y,
__value_type_R1__y,
"",
"");
I_Method0(int &, y,
__int_R1__y,
I_Method0(osg::Viewport::value_type, y,
__value_type__y,
"",
"");
I_Method0(int, y,
__int__y,
I_Method0(osg::Viewport::value_type &, width,
__value_type_R1__width,
"",
"");
I_Method0(int &, width,
__int_R1__width,
I_Method0(osg::Viewport::value_type, width,
__value_type__width,
"",
"");
I_Method0(int, width,
__int__width,
I_Method0(osg::Viewport::value_type &, height,
__value_type_R1__height,
"",
"");
I_Method0(int &, height,
__int_R1__height,
"",
"");
I_Method0(int, height,
__int__height,
I_Method0(osg::Viewport::value_type, height,
__value_type__height,
"",
"");
I_Method0(bool, valid,
__bool__valid,
"",
"");
I_Method0(float, aspectRatio,
__float__aspectRatio,
I_Method0(double, aspectRatio,
__double__aspectRatio,
"Return the aspectRatio of the viewport, which is equal to width/height. ",
"If height is zero, the potental division by zero is avoided by simply returning 1.0f.");
I_Method0(const osg::Matrix, computeWindowMatrix,

View File

@@ -68,7 +68,7 @@ BEGIN_OBJECT_REFLECTOR(osgFX::Validator)
"The render info for the current OpenGL context is passed in to allow the StateAttribute to obtain details on the the current context and state.");
I_Method1(void, compileGLObjects, IN, osg::State &, state,
__void__compileGLObjects__osg_State_R1,
"default to nothing to compile - all state is applied immediately. ",
"Default to nothing to compile - all state is applied immediately. ",
"");
I_Method1(int, compare, IN, const osg::StateAttribute &, sa,
__int__compare__C5_osg_StateAttribute_R1,

View File

@@ -62,12 +62,12 @@ BEGIN_OBJECT_REFLECTOR(osgGA::EventQueue)
__void__setMouseInputRange__float__float__float__float,
"Set the mouse input range. ",
"");
I_Method4(void, windowResize, IN, int, x, IN, int, y, IN, unsigned int, width, IN, unsigned int, height,
__void__windowResize__int__int__unsigned_int__unsigned_int,
I_Method4(void, windowResize, IN, int, x, IN, int, y, IN, int, width, IN, int, height,
__void__windowResize__int__int__int__int,
"Method for adapting window resize event, placing this event on the back of the event queue. ",
"");
I_Method5(void, windowResize, IN, int, x, IN, int, y, IN, unsigned int, width, IN, unsigned int, height, IN, double, time,
__void__windowResize__int__int__unsigned_int__unsigned_int__double,
I_Method5(void, windowResize, IN, int, x, IN, int, y, IN, int, width, IN, int, height, IN, double, time,
__void__windowResize__int__int__int__int__double,
"Method for adapting window resize event, placing this event on the back of the event queue, with specified time. ",
"");
I_Method1(void, mouseScroll, IN, osgGA::GUIEventAdapter::ScrollingMotion, sm,

View File

@@ -235,8 +235,8 @@ BEGIN_OBJECT_REFLECTOR(osgGA::GUIEventAdapter)
__double__time,
"deprecated function for getting time of event. ",
"");
I_MethodWithDefaults5(void, setWindowRectangle, IN, int, x, , IN, int, y, , IN, unsigned int, width, , IN, unsigned int, height, , IN, bool, updateMouseRange, true,
__void__setWindowRectangle__int__int__unsigned_int__unsigned_int__bool,
I_MethodWithDefaults5(void, setWindowRectangle, IN, int, x, , IN, int, y, , IN, int, width, , IN, int, height, , IN, bool, updateMouseRange, true,
__void__setWindowRectangle__int__int__int__int__bool,
"set window rectangle. ",
"");
I_Method0(int, getWindowX,
@@ -247,12 +247,12 @@ BEGIN_OBJECT_REFLECTOR(osgGA::GUIEventAdapter)
__int__getWindowY,
"get window y origin. ",
"");
I_Method0(unsigned int, getWindowWidth,
__unsigned_int__getWindowWidth,
I_Method0(int, getWindowWidth,
__int__getWindowWidth,
"get window width. ",
"");
I_Method0(unsigned int, getWindowHeight,
__unsigned_int__getWindowHeight,
I_Method0(int, getWindowHeight,
__int__getWindowHeight,
"get window height. ",
"");
I_Method1(void, setKey, IN, int, key,
@@ -411,11 +411,11 @@ BEGIN_OBJECT_REFLECTOR(osgGA::GUIEventAdapter)
I_SimpleProperty(double, Time,
__double__getTime,
__void__setTime__double);
I_SimpleProperty(unsigned int, WindowHeight,
__unsigned_int__getWindowHeight,
I_SimpleProperty(int, WindowHeight,
__int__getWindowHeight,
0);
I_SimpleProperty(unsigned int, WindowWidth,
__unsigned_int__getWindowWidth,
I_SimpleProperty(int, WindowWidth,
__int__getWindowWidth,
0);
I_SimpleProperty(int, WindowX,
__int__getWindowX,

View File

@@ -146,10 +146,6 @@ BEGIN_OBJECT_REFLECTOR(osgUtil::SceneView)
__C5_osg_Viewport_P1__getViewport,
"Get the const viewport. ",
"");
I_Method4(void, getViewport, IN, int &, x, IN, int &, y, IN, int &, width, IN, int &, height,
__void__getViewport__int_R1__int_R1__int_R1__int_R1,
"Get the viewport of the scene view. ",
"");
I_Method1(void, setDisplaySettings, IN, osg::DisplaySettings *, vs,
__void__setDisplaySettings__osg_DisplaySettings_P1,
"Set the DisplaySettings. ",

View File

@@ -56,6 +56,10 @@ BEGIN_OBJECT_REFLECTOR(osgViewer::GraphicsWindow)
__void__grabFocusIfPointerInWindow,
"Get focus on if the pointer is in this window. ",
"");
I_Method1(void, useCursor, IN, bool, x,
__void__useCursor__bool,
"Switch on/off the cursor. ",
"");
I_Method0(bool, realizeImplementation,
__bool__realizeImplementation,
"Realise the GraphicsContext implementation, Pure virtual - must be implemented by concrate implementations of GraphicsContext. ",

View File

@@ -93,24 +93,20 @@ BEGIN_OBJECT_REFLECTOR(osgViewer::SimpleViewer)
__void__frame,
"Render a complete new frame. ",
"Calls frameAdvance(), frameEventTraversal(), frameUpateTraversal(), frameCullTraversal() and frameDrawTraversal(). Note, no internal makeCurrent() is issued before, or swap buffers called after frame(), these operations are the responsibility of the calling code. ");
I_Method0(void, frameAdvance,
__void__frameAdvance,
I_Method0(void, advance,
__void__advance,
"",
"");
I_Method0(void, frameEventTraversal,
__void__frameEventTraversal,
I_Method0(void, eventTraversal,
__void__eventTraversal,
"",
"");
I_Method0(void, frameUpdateTraversal,
__void__frameUpdateTraversal,
I_Method0(void, updateTraversal,
__void__updateTraversal,
"",
"");
I_Method0(void, frameCullTraversal,
__void__frameCullTraversal,
"",
"");
I_Method0(void, frameDrawTraversal,
__void__frameDrawTraversal,
I_Method0(void, renderingTraversal,
__void__renderingTraversal,
"",
"");
I_Method0(void, releaseAllGLObjects,

View File

@@ -28,6 +28,7 @@ TYPE_NAME_ALIAS(std::list< osg::ref_ptr< osgGA::GUIEventHandler > >, osgViewer::
BEGIN_OBJECT_REFLECTOR(osgViewer::View)
I_BaseType(osg::View);
I_BaseType(osgGA::GUIActionAdapter);
I_Constructor0(____View,
"",
"");
@@ -83,10 +84,18 @@ BEGIN_OBJECT_REFLECTOR(osgViewer::View)
__void__setUpViewAcrossAllScreens,
"Convinience method for creating slave Cameras and associated GraphicsWindows across all screens. ",
"");
I_Method0(void, setUpRenderingSupport,
__void__setUpRenderingSupport,
"",
I_Method0(void, requestRedraw,
__void__requestRedraw,
"requestRedraw() requests a single redraw. ",
"");
I_MethodWithDefaults1(void, requestContinuousUpdate, IN, bool, needed, true,
__void__requestContinuousUpdate__bool,
"requestContinousUpdate(bool) is for en/disabling a throw or idle callback to be requested by a GUIEventHandler (typically a MatrixManipulator, though other GUIEventHandler's may also provide functionality). ",
"GUI toolkits can respond to this immediately by registering an idle/timed callback, or can delay setting the callback and update at their own leisure.");
I_Method2(void, requestWarpPointer, IN, float, x, IN, float, y,
__void__requestWarpPointer__float__float,
"requestWarpPointer(int,int) is requesting a repositioning of the mouse pointer to a specified x,y location on the window. ",
"This is used by some camera manipulators to initialise the mouse pointer when mouse position relative to a controls neutral mouse position is required, i.e when mimicking a aircrafts joystick.");
I_Method0(void, assignSceneDataToCameras,
__void__assignSceneDataToCameras,
"",

View File

@@ -10,6 +10,7 @@
#include <osgIntrospection/StaticMethodInfo>
#include <osgIntrospection/Attributes>
#include <osg/Camera>
#include <osgViewer/Viewer>
// Must undefine IN and OUT macros defined in Windows headers
@@ -22,11 +23,23 @@
TYPE_NAME_ALIAS(std::vector< osg::GraphicsContext * >, osgViewer::Viewer::Contexts);
TYPE_NAME_ALIAS(std::vector< osgViewer::GraphicsWindow * >, osgViewer::Viewer::Windows);
BEGIN_ENUM_REFLECTOR(osgViewer::Viewer::ThreadingModel)
I_EnumLabel(osgViewer::Viewer::SingleThreaded);
I_EnumLabel(osgViewer::Viewer::ThreadPerContext);
I_EnumLabel(osgViewer::Viewer::ThreadPerCamera);
END_REFLECTOR
BEGIN_OBJECT_REFLECTOR(osgViewer::Viewer)
I_BaseType(osgViewer::View);
I_Constructor0(____Viewer,
"",
"");
I_Method0(bool, isRealized,
__bool__isRealized,
"Get whether at least of one of this viewers windows are realized. ",
"");
I_Method0(void, realize,
__void__realize,
"set up windows and associated threads. ",
@@ -39,24 +52,44 @@ BEGIN_OBJECT_REFLECTOR(osgViewer::Viewer)
__bool__done,
"",
"");
I_Method1(void, setThreadingModel, IN, osgViewer::Viewer::ThreadingModel, threadingModel,
__void__setThreadingModel__ThreadingModel,
"Set the threading model the rendering traversals will use. ",
"");
I_Method0(osgViewer::Viewer::ThreadingModel, getThreadingModel,
__ThreadingModel__getThreadingModel,
"Get the threading model the rendering traversals will use. ",
"");
I_Method1(void, setKeySetsDone, IN, int, key,
__void__setKeySetsDone__int,
"Set the key value that the viewer checks on each frame to see if the viewer's done flag should be set to signal end of viewers main loop. ",
"Default value is Escape (osgGA::GUIEVentAdapter::KEY_Escape). Setting to 0 switches off the feature. ");
I_Method0(int, getKeySetsDone,
__int__getKeySetsDone,
"Set the key value that the viewer checks on each frame to see if the viewer's done flag. ",
"");
I_Method0(int, run,
__int__run,
"Execute a main frame loop. ",
"Equivialant to while (!viewer.done()) viewer.frame(); Also calls realize() if the viewer is not already realized, and installs trackball manipulator if one is not already assigned.");
I_Method0(void, frame,
__void__frame,
"Render a complete new frame. ",
"Calls frameAdvance(), frameEventTraversal(), frameUpateTraversal(), frameRenderingTraversals(). ");
I_Method0(void, frameAdvance,
__void__frameAdvance,
"Calls advance(), eventTraversal(), updateTraversal(), renderingTraversals(). ");
I_Method0(void, advance,
__void__advance,
"",
"");
I_Method0(void, frameEventTraversal,
__void__frameEventTraversal,
I_Method0(void, eventTraversal,
__void__eventTraversal,
"",
"");
I_Method0(void, frameUpdateTraversal,
__void__frameUpdateTraversal,
I_Method0(void, updateTraversal,
__void__updateTraversal,
"",
"");
I_Method0(void, frameRenderingTraversals,
__void__frameRenderingTraversals,
I_Method0(void, renderingTraversals,
__void__renderingTraversals,
"",
"");
I_Method0(void, releaseAllGLObjects,
@@ -67,22 +100,41 @@ BEGIN_OBJECT_REFLECTOR(osgViewer::Viewer)
__void__cleanup,
"Clean up all OpenGL objects associated with this viewer's scenegraph. ",
"");
I_Method0(void, init,
__void__init,
I_Method1(void, setCameraWithFocus, IN, osg::Camera *, camera,
__void__setCameraWithFocus__osg_Camera_P1,
"",
"");
I_Method1(void, getContexts, IN, osgViewer::Viewer::Contexts &, contexts,
__void__getContexts__Contexts_R1,
I_Method0(osg::Camera *, getCameraWithFocus,
__osg_Camera_P1__getCameraWithFocus,
"",
"");
I_Method0(const osg::Camera *, getCameraWithFocus,
__C5_osg_Camera_P1__getCameraWithFocus,
"",
"");
I_MethodWithDefaults2(void, getContexts, IN, osgViewer::Viewer::Contexts &, contexts, , IN, bool, onlyValid, true,
__void__getContexts__Contexts_R1__bool,
"",
"");
I_MethodWithDefaults2(void, getWindows, IN, osgViewer::Viewer::Windows &, windows, , IN, bool, onlyValid, true,
__void__getWindows__Windows_R1__bool,
"",
"");
I_SimpleProperty(osg::Camera *, CameraWithFocus,
__osg_Camera_P1__getCameraWithFocus,
__void__setCameraWithFocus__osg_Camera_P1);
I_SimpleProperty(bool, Done,
0,
__void__setDone__bool);
I_PublicMemberProperty(bool, _firstFrame);
I_PublicMemberProperty(bool, _done);
I_PublicMemberProperty(osg::ref_ptr< osg::BarrierOperation >, _startRenderingBarrier);
I_PublicMemberProperty(osg::ref_ptr< osg::BarrierOperation >, _endRenderingDispatchBarrier);
I_SimpleProperty(int, KeySetsDone,
__int__getKeySetsDone,
__void__setKeySetsDone__int);
I_SimpleProperty(osgViewer::Viewer::ThreadingModel, ThreadingModel,
__ThreadingModel__getThreadingModel,
__void__setThreadingModel__ThreadingModel);
END_REFLECTOR
STD_VECTOR_REFLECTOR(std::vector< osg::GraphicsContext * >);
STD_VECTOR_REFLECTOR(std::vector< osgViewer::GraphicsWindow * >);