Go to the
documentation of this file.
00001 #ifndef __FBSHADERLAYOUT_H__
00002 #define __FBSHADERLAYOUT_H__
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00043 #include <kaydaradef.h>
00044 #ifndef FBSDK_DLL
00045
00048 #define FBSDK_DLL K_DLLIMPORT
00049 #endif
00050
00051
00052 #include <fbsdk/fbshader.h>
00053
00054
00055 #include <fbcontrols/fbcontrols.h>
00056
00057
00058 #ifdef FBSDKUseNamespace
00059 namespace FBSDKNamespace {
00060 #endif
00061
00067 #define FBRegisterShaderLayout( ClassName,UniqueNameStr, IconFilename ) \
00068 HIObject RegisterShaderLayout##ClassName( HIObject ,char * ,void *pData) \
00069 {\
00070 ClassName *Class = new ClassName( (HFBShader)FBGetFBComponent((HIObject)pData) ); \
00071 Class->mAllocated = true; \
00072 if (Class->FBCreate()) { \
00073 return Class->GetHIObject(); \
00074 } else { \
00075 delete Class; \
00076 return NULL; \
00077 } \
00078 } \
00079 FBLibraryModule( ClassName ) \
00080 { \
00081 FBRegisterObject( ClassName,"renderer/usershader/ui",UniqueNameStr,UniqueNameStr" Shader Layout",RegisterShaderLayout##ClassName, true, IconFilename ); \
00082 }
00083
00088 #define FBShaderLayoutDeclare( ClassName,Parent ) \
00089 FBClassDeclare( ClassName,Parent ); \
00090 public: \
00091 ClassName(HFBShader pShader):Parent(pShader) { FBClassInit; } \
00092 private:
00093
00097 #define FBShaderLayoutImplementation( ThisComponent ) \
00098 FBClassImplementation( ThisComponent )
00099
00101
00103 __FB_FORWARD( FBShaderLayout );
00104 FB_DEFINE_COMPONENT( FBSDK_DLL, ShaderLayout );
00106 class FBSDK_DLL FBShaderLayout : public FBLayout
00107 {
00108 __FBClassDeclare( FBShaderLayout,FBLayout );
00109
00110 public:
00114 FBShaderLayout( HFBShader pShader = NULL );
00115
00116 FBPropertyShader Shader;
00117 };
00118
00119 #ifdef FBSDKUseNamespace
00120 }
00121 #endif
00122 #endif