osg.StateAttribute¶
-
class
osg.StateAttribute¶ Represents: c++ class Wraps: osg::StateAttribute Bases: osg.ObjectBase class for state attributes.
Methods:
-
:
asTexture()¶ Fast alternative to dynamic_cast<> for determining if
osg.StateAttributeis aosg.Texture.Return type: osg.Texture
-
:
getType()¶ Return the
osg.StateAttribute.Typeidentifier of the attribute’s class type.Return type: osg.StateAttribute.Type
-
:
getMember()¶ Return the member identifier within the attribute’s class type. Used for light number/clip plane number etc.
Return type: unsigned
-
:
getTypeMemberPair()¶ Return the TypeMemberPair that uniquely identifies this type member. In Lua returns two values:
osg.StateAttribute.Typeand corresponding value (unsiged number).
-
:
isTextureAttribute()¶ Return
trueifosg.StateAttributeis a type which controls texturing and needs to be issued w.r.t to specific texture unit.Return type: bool
-
:
getParent(unsigned index)¶ Get a single parent of this StateAttribute.
Parameters: index ( unsigned) – index of the parent to get.Return type: osg.StateSet
-
:
getNumParents()¶ Get the number of parents of this StateAttribute.
Return type: unsigned
-
:
setShaderComponent(osg.ShaderComponent sc)¶ -
Parameters: sc ( osg.ShaderComponent) –
-
:
getShaderComponent()¶ -
Return type: osg.ShaderComponent
-
:
setUpdateCallback(osg.StateAttributeCallback cb)¶ Set the UpdateCallback of type
osg.StateAttributeCallbackwhich allows users to attach customize the updating of an object during the update traversal.Parameters: cb ( osg.StateAttributeCallback) –
-
:
getUpdateCallback()¶ Get the UpdateCallback of type
osg.StateAttributeCallback.Return type: osg.StateAttributeCallback
-
:
setEventCallback(osg.StateAttributeCallback cb)¶ Set the EventCallback of type
osg.StateAttributeCallbackwhich allows users to attach customize the updating of an object during the Event traversal.Parameters: cb ( osg.StateAttributeCallback) –
-
:
getEventCallback()¶ Get the EventCallback of type
osg.StateAttributeCallback.Return type: osg.StateAttributeCallback
-
:
apply(osg.State state)¶ Apply the OpenGL state attributes. The render info for the current OpenGL context is passed in to allow the
osg.StateAttributeto obtain details on the the current context and state.Parameters: state ( osg.State) –
-
:
compileGLObjects(osg.State state)¶ Default to nothing to compile - all state is applied immediately.
Parameters: state ( osg.State) –
-
:
resizeGLObjectBuffers(unsigned maxSize)¶ Resize any per context GLObject buffers to specified size.
Parameters: maxSize ( unsigned) –
-
:
releaseGLObjects(osg.State state)¶ Release OpenGL objects in specified graphics context if
osg.Stateobject is passed, otherwise release OpenGL objects for all graphics context ifosg.Stateobject isnil.Parameters: state ( osg.State) –
-
:
releaseGLObjects()
-
: