Go to the source code of this file.
Classes |
|
class | IMtlRender_Compatibility_MtlBase |
class | IMtlRender_Compatibility_Renderer |
Defines |
|
#define | IMTLRENDER_COMPATIBILITY_MTLBASE_INTERFACEID Interface_ID(0x5537445b, 0x70a97e02) |
#define | IMTLRENDER_COMPATIBILITY_RENDERER_INTERFACEID Interface_ID(0x25d24114, 0xdbe505f) |
Functions |
|
IMtlRender_Compatibility_MtlBase * | Get_IMtlRender_Compability_MtlBase (ClassDesc &mtlBaseClassDesc) |
IMtlRender_Compatibility_Renderer * | Get_IMtlRender_Compatibility_Renderer (ClassDesc &rendererClassDesc) |
bool | AreMtlAndRendererCompatible (ClassDesc &mtlBaseClassDesc, ClassDesc &rendererClassDesc) |
Returns whether the given Mtl/Texmap plugin
is compatible with the given Renderer
plugin. |
#define IMTLRENDER_COMPATIBILITY_MTLBASE_INTERFACEID Interface_ID(0x5537445b, 0x70a97e02) |
Definition at line 28 of file IMtlRender_Compatibility.h.
#define IMTLRENDER_COMPATIBILITY_RENDERER_INTERFACEID Interface_ID(0x25d24114, 0xdbe505f) |
Definition at line 29 of file IMtlRender_Compatibility.h.
IMtlRender_Compatibility_MtlBase* Get_IMtlRender_Compability_MtlBase | ( | ClassDesc & | mtlBaseClassDesc | ) | [inline] |
Definition at line 95 of file IMtlRender_Compatibility.h.
{ return static_cast<IMtlRender_Compatibility_MtlBase*>(mtlBaseClassDesc.GetInterface(IMTLRENDER_COMPATIBILITY_MTLBASE_INTERFACEID)); }
IMtlRender_Compatibility_Renderer* Get_IMtlRender_Compatibility_Renderer | ( | ClassDesc & | rendererClassDesc | ) | [inline] |
Definition at line 135 of file IMtlRender_Compatibility.h.
{ return static_cast<IMtlRender_Compatibility_Renderer*>(rendererClassDesc.GetInterface(IMTLRENDER_COMPATIBILITY_RENDERER_INTERFACEID)); }
bool AreMtlAndRendererCompatible | ( | ClassDesc & | mtlBaseClassDesc, |
ClassDesc & | rendererClassDesc | ||
) | [inline] |
Returns whether the given Mtl/Texmap plugin is compatible with the given Renderer plugin.
Always use this function to determine compatiblity.
Definition at line 146 of file IMtlRender_Compatibility.h.
{ IMtlRender_Compatibility_MtlBase* mtlBaseCompatibility = Get_IMtlRender_Compability_MtlBase(mtlBaseClassDesc); IMtlRender_Compatibility_Renderer* rendererCompatibility = Get_IMtlRender_Compatibility_Renderer(rendererClassDesc); if((mtlBaseCompatibility == NULL) && (rendererCompatibility == NULL)) { // No compatibility info: compatible by default return true; } else if((mtlBaseCompatibility != NULL) && mtlBaseCompatibility->IsCompatibleWithRenderer(rendererClassDesc)) { // Material says it's compatible with the renderer: compatible return true; } else if((rendererCompatibility != NULL) && rendererCompatibility->IsCompatibleWithMtlBase(mtlBaseClassDesc)) { // Renderer says it's compatible with the material: compatible return true; } else { // Neither material nor renderer says it's compatible: incompatible return false; } }