OROCHI
 
Loading...
Searching...
No Matches
GxToolMaterial.h
Go to the documentation of this file.
1//===========================================================================
9//===========================================================================
10#pragma once
11
12#if GX_EDITOR
13GX_CORE_NAMESPACE_BEGIN()
14
15//===========================================================================
17//===========================================================================
18class GxToolMaterial : public GxToolResourceEditBase
19{
20 //-------------------------------------------------------------
22 //-------------------------------------------------------------
24public:
25 class GxGuiFormPreview;
26
27 // RTTI定義
28 GX_RTTI_CLASS_NAME_ICON( GxToolMaterial, GxToolResourceEditBase, "マテリアル編集", GxRtti::ICON_TYPE::CORE)
29 // ClassBaseReference継承クラス用禁止宣言
30 GX_PROHIBIT_CLASS_BASE_REFERENCE( GxToolMaterial )
31
32
33 //-------------------------------------------------------------
35 //-------------------------------------------------------------
37public:
39 GxToolMaterial( void );
40
42 b32 initialize( void ) override;
44 void setResource(GxResBase* pResource) override;
45
47 //-------------------------------------------------------------
49 //-------------------------------------------------------------
51public:
53 void addMenuOwnProperty(GxPropertyTable& table) override;
55 void resetPropertyTable(GxClassBaseRoot* pObject);
56protected:
58 void update( void ) override;
60 void saveAs(u32 attribute) override;
61private:
63 void outputProgram(b32 isGlsl);
64
66 //-------------------------------------------------------------
68 //-------------------------------------------------------------
70private:
71 GxGuiSplitter* _pSplitterVertical;
72 GxGuiSplitter* _pSplitterHorizontal;
73 GxGuiFormPreview* _pFormPreview;
74 GxGuiFormProperty* _pFormProperty;
75 GxGuiFormShaderGraph* _pFormShaderGraph;
76 GxRenderMaterial::PASS _beforePass;
77
79};
80
81//===========================================================================
83//===========================================================================
84class GxToolMaterial::GxGuiFormPreview : public GxGuiFormTexture
85{
86 //-----------------------------------------------------------
88 //-----------------------------------------------------------
90public:
91 GX_RTTI_CLASS(GxGuiFormPreview, GxGuiFormTexture)
92 // ClassBaseReference継承クラス用禁止宣言
93 GX_PROHIBIT_CLASS_BASE_REFERENCE(GxGuiFormPreview)
94
95
96 //-----------------------------------------------------------
98 //-----------------------------------------------------------
100public:
102 GxGuiFormPreview(void);
104 b32 initialize(void) override;
106 void cleanup(void) override;
107
109 static constexpr void setPreviewUnitRtti(GxRtti* pRtti) { _pPreviewUnitRtti = pRtti; }
110
112 //-------------------------------------------------------------
114 //-------------------------------------------------------------
116protected:
118 void update(void) override;
119
121 //-------------------------------------------------------------
123 //-------------------------------------------------------------
125public:
127 constexpr GxUnitModelBase* getPreviewUnit(void) const { return _pPreviewUnit; }
128
130 //-------------------------------------------------------------
132 //-------------------------------------------------------------
134private:
135 static GxRtti* _pPreviewUnitRtti;
136 GxUnitModelBase* _pPreviewUnit;
137 GxUnitCameraBase* _pPreviewCamera;
138 GxSysRenderBase::GxViewport* _pViewport;
139 u32 _thumbnailFrameCount;
140
142};
143
144GX_CORE_NAMESPACE_END()
145
146#endif // GX_EDITOR
#define GX_PROHIBIT_CLASS_BASE_REFERENCE(__CLASS__)
GxClassBaseReference継承の禁止宣言(new以外の生成禁止 + コピー禁止)
Definition GxBase.h:244
基底クラス
Definition GxBase.h:51
プロパティテーブルクラス
Definition GxProperty.h:1641
PASS
描画パス定義
Definition GxRenderMaterial.h:39
リソース基底クラス
Definition GxResBase.h:23
実行時型情報クラス
Definition GxRtti.h:154
ビューポートクラス
Definition GxSysRenderBase.h:414
カメラ基礎クラス
Definition GxUnitCameraBase.h:20
モデル基礎クラス
Definition GxUnitModelBase.h:19
32bitブーリアン
Definition GxDefine.h:173