IMtlRender_Compatibility.h File Reference
 
 
 
IMtlRender_Compatibility.h File Reference
#include "ifnpub.h"
#include "baseinterface.h"
#include <CommCtrl.h>
#include "plugapi.h"

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 Documentation

#define IMTLRENDER_COMPATIBILITY_MTLBASE_INTERFACEID   Interface_ID(0x5537445b, 0x70a97e02)
#define IMTLRENDER_COMPATIBILITY_RENDERER_INTERFACEID   Interface_ID(0x25d24114, 0xdbe505f)

Function Documentation

IMtlRender_Compatibility_MtlBase* Get_IMtlRender_Compability_MtlBase ( ClassDesc mtlBaseClassDesc ) [inline]
IMtlRender_Compatibility_Renderer* Get_IMtlRender_Compatibility_Renderer ( ClassDesc rendererClassDesc ) [inline]
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.

                                                                                                   {

        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;
        }
}