IShaderManager.h

Go to the documentation of this file.
00001 //
00002 // Copyright 2010 Autodesk, Inc.  All rights reserved.
00003 //
00004 // Use of this software is subject to the terms of the Autodesk license
00005 // agreement provided at the time of installation or download, or which 
00006 // otherwise accompanies this software in either electronic or hard copy form.   
00007 //
00008 //
00009 #pragma  once
00010 
00011 #include "..\export.h"
00012 #include "..\iparamb2Typedefs.h"
00013 #include "..\ref.h"
00014 #include "..\ifnpub.h"
00015 #include "..\GetCOREInterface.h"
00016 
00017 class ReferenceTarget;
00018 
00020 #define ISHADER_MANAGER_INTERFACE_ID Interface_ID(0x3fc568b8, 0xeea1adf)
00021 
00023 #define ISHADER_MANAGER_CREATOR_INTERFACE_ID Interface_ID(0x56e81398, 0x7f816f4f)
00024 
00025 namespace MaxSDK { namespace Graphics {
00026 
00091 class IShaderManager : public BaseInterface
00092 {
00093 public:
00096     enum ShaderType
00097     {
00098         ShaderTypeMetaSL = 0, 
00099     };
00100 
00103     virtual Interface_ID GetID() { return ISHADER_MANAGER_INTERFACE_ID; }
00104 
00107     virtual ShaderType GetShaderType() const =0;
00108 
00111     virtual const MCHAR* GetShaderClassName() const =0;
00112 
00115     virtual const MCHAR* GetShaderFile() const =0;
00116 };
00117 
00125 class IShaderManagerCreator : public FPStaticInterface
00126 {
00127 public:
00143     virtual IShaderManager* CreateShaderManager(
00144         IShaderManager::ShaderType type,
00145         const MCHAR* className,
00146         const MCHAR* shaderFileName,
00147         ReferenceTarget * pRefTarget) = 0;
00148 
00154     virtual void DeleteShaderManager(IShaderManager * pShaderGraphManager) = 0;
00155 
00158     static IShaderManagerCreator* GetInstance()
00159     {
00160         return dynamic_cast<IShaderManagerCreator*>(GetCOREInterface(ISHADER_MANAGER_CREATOR_INTERFACE_ID));
00161     }
00162 };
00163 
00164 } } // end namespace