osg.StateAttribute

class osg.StateAttribute
Represents:c++ class
Wraps:osg::StateAttribute
Bases:osg.Object

Base class for state attributes.

Methods:

:asTexture()

Fast alternative to dynamic_cast<> for determining if osg.StateAttribute is a osg.Texture.

Return type:osg.Texture
:getType()

Return the osg.StateAttribute.Type identifier 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.Type and corresponding value (unsiged number).

:isTextureAttribute()

Return true if osg.StateAttribute is 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.StateAttributeCallback which 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.StateAttributeCallback which 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.StateAttribute to 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.State object is passed, otherwise release OpenGL objects for all graphics context if osg.State object is nil.

Parameters:state (osg.State) –
:releaseGLObjects()