osg.StateAttribute¶
- class osg.StateAttribute¶
- Represents
c++ class
- Wraps
osg::StateAttribute
- Bases
Base class for state attributes.
Methods:
- :asTexture()¶
Fast alternative to dynamic_cast<> for determining if
osg.StateAttributeis aosg.Texture.- Тип результата
- :getType()¶
Return the
osg.StateAttribute.Typeidentifier of the attribute’s class type.- Тип результата
- :getMember()¶
Return the member identifier within the attribute’s class type. Used for light number/clip plane number etc.
- Тип результата
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.- Тип результата
bool
- :getParent(unsigned index)¶
Get a single parent of this StateAttribute.
- Параметры
index (
unsigned) – index of the parent to get.- Тип результата
- :getNumParents()¶
Get the number of parents of this StateAttribute.
- Тип результата
unsigned
- :setShaderComponent(osg.ShaderComponent sc)¶
-
- Параметры
sc (
osg.ShaderComponent) –
- :getShaderComponent()¶
-
- Тип результата
- :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.- Параметры
cb (
osg.StateAttributeCallback) –
- :getUpdateCallback()¶
Get the UpdateCallback of 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.- Параметры
cb (
osg.StateAttributeCallback) –
- :getEventCallback()¶
Get the EventCallback of 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.- Параметры
state (
osg.State) –
- :compileGLObjects(osg.State state)¶
Default to nothing to compile - all state is applied immediately.
- Параметры
state (
osg.State) –
- :resizeGLObjectBuffers(unsigned maxSize)¶
Resize any per context GLObject buffers to specified size.
- Параметры
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.- Параметры
state (
osg.State) –
- :releaseGLObjects()