00001 /********************************************************************** 00002 *< 00003 FILE: IMaterialViewportShading.h 00004 00005 DESCRIPTION: Interface definitions for Viewport Shading Support 00006 00007 CREATED BY: Qilin.Ren 00008 00009 HISTORY: March 2007 00010 00011 *> Copyright (c) 2007, All Rights Reserved. 00012 **********************************************************************/ 00013 00014 #pragma once 00015 00016 #include "imtl.h" 00017 00018 00019 #define IID_MATERIAL_VIEWPORT_SHADING Interface_ID(0x3ae06719, 0x65847f74) 00020 00022 00033 class IMaterialViewportShading : public BaseInterface 00034 { 00035 public: 00037 enum ShadingModel 00038 { 00040 Standard, 00042 Hardware, 00044 OtherTypes, 00045 }; 00046 00047 public: 00048 // from BaseInterface 00049 CoreExport virtual BaseInterface* GetInterface(Interface_ID id); 00050 CoreExport virtual Interface_ID GetID(); 00051 00052 protected: 00057 virtual bool IsShadingModelSupported(ShadingModel model) const = 0; 00058 00062 virtual ShadingModel GetCurrentShadingModel() const = 0; 00063 00068 virtual bool SetCurrentShadingModel(ShadingModel model) = 0; 00069 00078 virtual int GetSupportedMapLevels() const = 0; 00079 00080 public: 00081 // Helper functions for accessing the IMaterialViewportShading interface on Materials. These 00082 // are exported through Core.dll 00083 00090 CoreExport static bool IsShadingModelSupported( 00091 const MtlBase& material, 00092 ShadingModel model); 00093 00099 CoreExport static ShadingModel GetCurrentShadingModel( 00100 const MtlBase& material); 00101 00108 CoreExport static bool SetCurrentShadingModel( 00109 MtlBase& material, 00110 ShadingModel model); 00111 00122 CoreExport static int GetSupportedMapLevels( 00123 const MtlBase& material); 00124 }; 00125 00126