![]() |
DI-Guy SDK Documentation
13.6
|
Graphics state objects mostly serve as containers for other sub-objects, such as materials and textures, that control the visual state of geometry. More...
#include <diguyOsgGraphicsState.h>
Public Member Functions | |
| diguyOsgGraphicsState (void *internal_data) | |
| virtual void | build () override |
| This function will be called by DI-Guy when it is time for a renderer-specific state object to be created. More... | |
| virtual void | unbuild () override |
| This function will be called by DI-Guy when it is time for a renderer-specific state object to be destroyed. More... | |
| osg::StateSet * | get_state_set () |
Public Member Functions inherited from diguyGraphicsState | |
| int | get_contains_alpha_component () const |
| This function returns whether either the material or texture of this state contains an alpha component. More... | |
| int | get_is_unlit () const |
| This function returns whether faces drawn with this state should be lit or unlit. More... | |
| void | free_loader_memory () |
| This function frees most memory allocated by the DI-Guy geometry loader for this object. More... | |
| diguyGraphicsMaterial * | get_material () |
| This function returns the material of this state. More... | |
| int | get_num_textures () |
| This function returns the number of textures this state has. More... | |
| diguyGraphicsTexture * | get_texture (int texture_index=0) |
| This function returns the nth texture of this state. More... | |
| diguyTextureMapType | get_texture_type (int index) const |
| This function returns the way that a texture is used in the state. More... | |
| int | get_textures_available () const |
| This function returns a bit-wise or'ed mask of available textures in this state. More... | |
| diguyGraphicsTextureArray * | get_texture_array () |
| return Decal array More... | |
| const diguyGraphicsTextureArray * | get_texture_array () const |
| diguyGraphicsTextureArray * | get_texture_array (diguyTextureMapType map_type) |
| return Decal diffuse, specular or normal array More... | |
| const diguyGraphicsTextureArray * | get_texture_array (diguyTextureMapType map_type) const |
| virtual void | bind_now () |
| This function will be called by DI-Guy when the state should be made active, or bound. More... | |
| void | bind (int texture_mask) |
| Calls bind on internal class which will bind materials and appropriate textures. More... | |
| bdiGeometryGeosetState * | get_scripted_object () |
Protected Attributes | |
| osg::ref_ptr< osg::StateSet > | m_state_set |
Additional Inherited Members | |
Protected Member Functions inherited from diguyGraphicsState | |
| diguyGraphicsState (void *internal_data) | |
| A protected constructor. More... | |
| virtual | ~diguyGraphicsState () |
| A protected destructor. More... | |
Graphics state objects mostly serve as containers for other sub-objects, such as materials and textures, that control the visual state of geometry.
At times renderer-specific objects need to be created in this level, as well.
The class diguyOsgGraphicsState is an example of a diguyGraphicsState subclass for a scene graph renderer using the DI-Guy Loader. The example subclass shows how to use the accessors of the diguyGraphicsState class and which virtual functions should be overridden for a scene graph renderer such as OSG.
| diguyOsgGraphicsState::diguyOsgGraphicsState | ( | void * | internal_data | ) |
|
overridevirtual |
This function will be called by DI-Guy when it is time for a renderer-specific state object to be created.
A subclass of this class isn't always necessary, particularly for immediate mode renderers in which everything might be done in a subclass of diguyGraphicsMaterial and a subclass of diguyGraphicsTexture.
Immediate Mode:
Immediate mode renderers usually do not override this function.
Scene Graph:
Scene graph renderers may override this function, to create a state object that will be associated with diguyGraphicsMesh objects.
The subclass version of this function may need to refer to material and texture objects created by the build() calls of subclasses of diguyGraphicsMaterial and diguyGraphicsTexture objects.
Callable From:
Reimplemented from diguyGraphicsState.
|
overridevirtual |
This function will be called by DI-Guy when it is time for a renderer-specific state object to be destroyed.
Immediate Mode:
Immediate mode renderers may override this function, to destroy any object that may have been created by build().
Scene Graph:
Scene graph renderers may override this function, to destroy any object that may have been created by build().
Callable From:
Reimplemented from diguyGraphicsState.
|
inline |
|
protected |