![]() |
Blamite Game Engine - blam!
00453.06.08.26.0624.blamite
The core library for the Blamite Game Engine.
|
Namespace containing functions for interacting with materials. More...
Functions | |
| BLAM void | RebuildDatablocks () |
| Rebuilds ALL datablocks (including instances) from their original tags. More... | |
| BLAM bool | BuildDatablockFromTag (material *material_tag, std::string tag_path) |
| Creates an OGRE material datablock from a material tag. More... | |
| BLAM void | ReloadPendingMaterials () |
| Reloads all datablocks which are flagged as requiring a reload. More... | |
| BLAM Ogre::HlmsDatablock * | GetDatablockFromTag (std::string tag_path) |
| Retrieves an OGRE datablock from a material tag path. More... | |
| BLAM ogre_material_instance_data * | GetDatablockInstanceFromTag (std::string tag_path, std::string referencing_tag_path) |
| Retrieves a datablock instance from a material tag path, and a referencing tag path. More... | |
| BLAM ogre_material_instance_data * | CreateDatablockInstance (std::string tag_path, std::string referencing_tag_path) |
| Creates a new datablock instance from a material tag path, and a referencing tag path. More... | |
| BLAM bool | LoadPBSDatablockFromMaterialTag (Ogre::HlmsPbsDatablock *datablock, material *material_tag, std::string tag_path="") |
| Loads a PBS (Physically-Based Shading) datablock from a material tag. More... | |
| BLAM bool | LoadUnlitDatablockFromMaterialTag (Ogre::HlmsUnlitDatablock *datablock, material *material_tag, std::string tag_path="") |
| Loads an Unlit datablock from a material tag. More... | |
| BLAM Ogre::HlmsUnlitDatablock * | CreateDefaultUnlitDatablock (std::string id) |
| Creates a default Unlit datablock. More... | |
| BLAM Ogre::HlmsUnlitDatablock * | CreateDefaultUnlitDatablockForPrimitives (std::string id) |
| Creates a default Unlit datablock for use with 2D and 3D primitives. More... | |
| BLAM Ogre::HlmsPbsDatablock * | CreateDefaultPbsDatablock (std::string id) |
| Creates a default PBS datablock. More... | |
| BLAM Ogre::HlmsPbsDatablock * | CreateDefaultPbsDatablockForPrimitives (std::string id) |
| Creates a default PBS datablock for use with 2D and 3D primitives. More... | |
Namespace containing functions for interacting with materials.
| bool Blam::Rendering::Materials::BuildDatablockFromTag | ( | material * | material_tag, |
| std::string | tag_path | ||
| ) |
Creates an OGRE material datablock from a material tag.
| material_tag | - The material tag data to create a datablock from. |
| tag_path | - The tag path of the provided material tag. |
true if the datablock was loaded successfully, otherwise returns false.
Here is the call graph for this function:
Here is the caller graph for this function:| ogre_material_instance_data * Blam::Rendering::Materials::CreateDatablockInstance | ( | std::string | tag_path, |
| std::string | referencing_tag_path | ||
| ) |
Creates a new datablock instance from a material tag path, and a referencing tag path.
| tag_path | - The tag path of the desired material. |
| referencing_tag_path | - The tag path of the tag which referenced the material. |
nullptr if the instance could not be created.
Here is the call graph for this function:
Here is the caller graph for this function:| Ogre::HlmsPbsDatablock * Blam::Rendering::Materials::CreateDefaultPbsDatablock | ( | std::string | id | ) |
Creates a default PBS datablock.
This function will create and register a default PBS datablock within OGRE.
| id | - The ID of the newly created datablock. This ID is provided to OGRE to identify the datablock. |
Here is the caller graph for this function:| Ogre::HlmsPbsDatablock * Blam::Rendering::Materials::CreateDefaultPbsDatablockForPrimitives | ( | std::string | id | ) |
Creates a default PBS datablock for use with 2D and 3D primitives.
This function will create and register a default PBS datablock within OGRE. It will also have several modifications pre-applied to ensure it is ready for use in 2D and 3D primitives.
| id | - The ID of the newly created datablock. This ID is provided to OGRE to identify the datablock. |
| Ogre::HlmsUnlitDatablock * Blam::Rendering::Materials::CreateDefaultUnlitDatablock | ( | std::string | id | ) |
Creates a default Unlit datablock.
This function will create and register a default Unlit datablock within OGRE.
| id | - The ID of the newly created datablock. This ID is provided to OGRE to identify the datablock. |
Here is the caller graph for this function:| Ogre::HlmsUnlitDatablock * Blam::Rendering::Materials::CreateDefaultUnlitDatablockForPrimitives | ( | std::string | id | ) |
Creates a default Unlit datablock for use with 2D and 3D primitives.
This function will create and register a default Unlit datablock within OGRE. It will also have several modifications pre-applied to ensure it is ready for use in 2D and 3D primitives.
| id | - The ID of the newly created datablock. This ID is provided to OGRE to identify the datablock. |
Here is the caller graph for this function:| Ogre::HlmsDatablock * Blam::Rendering::Materials::GetDatablockFromTag | ( | std::string | tag_path | ) |
Retrieves an OGRE datablock from a material tag path.
| tag_path | - The tag path of the desired material datablock. |
nullptr if the tag path is invalid or could not be found.
Here is the call graph for this function:
Here is the caller graph for this function:| ogre_material_instance_data * Blam::Rendering::Materials::GetDatablockInstanceFromTag | ( | std::string | tag_path, |
| std::string | referencing_tag_path | ||
| ) |
Retrieves a datablock instance from a material tag path, and a referencing tag path.
| tag_path | - The tag path of the desired material. |
| referencing_tag_path | - The tag path of the tag which referenced the material. |
nullptr if no material instance could be found.
Here is the call graph for this function:
Here is the caller graph for this function:| bool Blam::Rendering::Materials::LoadPBSDatablockFromMaterialTag | ( | Ogre::HlmsPbsDatablock * | datablock, |
| material * | material_tag, | ||
| std::string | tag_path = "" |
||
| ) |
Loads a PBS (Physically-Based Shading) datablock from a material tag.
| datablock | - The datablock that should be updated to match the provided material tag. This should usually be a default datablock. |
| material_tag | - The material tag to create a datablock from. |
| tag_path | - The tag path of the tag being loaded. Used for debug messages only. |
true if the datablock was created successfully, otherwise returns false.
Here is the call graph for this function:
Here is the caller graph for this function:| bool Blam::Rendering::Materials::LoadUnlitDatablockFromMaterialTag | ( | Ogre::HlmsUnlitDatablock * | datablock, |
| material * | material_tag, | ||
| std::string | tag_path = "" |
||
| ) |
Loads an Unlit datablock from a material tag.
| datablock | - The datablock that should be updated to match the provided material tag. This should usually be a default datablock. |
| material_tag | - The material tag to create a datablock from. |
| tag_path | - The tag path of the tag being loaded. Used for debug messages only. |
true if the datablock was created successfully, otherwise returns false. std::string shader_code = "outPs_colour0 = float4(0.5, 0.0, 0.0, 1.0); if (shift >= 1.0) { shift = 0.0; }";/
Here is the call graph for this function:
Here is the caller graph for this function:| void Blam::Rendering::Materials::RebuildDatablocks | ( | ) |
Rebuilds ALL datablocks (including instances) from their original tags.
Here is the call graph for this function:
Here is the caller graph for this function:| void Blam::Rendering::Materials::ReloadPendingMaterials | ( | ) |
Reloads all datablocks which are flagged as requiring a reload.
Materials which either have needs_update set, or are configured to persistently reload will be reloaded from this function - other materials will NOT be reloaded.
Here is the call graph for this function:
Here is the caller graph for this function: