OROCHI
 
Loading...
Searching...
No Matches
GxRenderIndexBuffer.h
Go to the documentation of this file.
1//===========================================================================
10//===========================================================================
11#pragma once
12
13GX_CORE_NAMESPACE_BEGIN()
14
15//===========================================================================
18//===========================================================================
20{
21 //-------------------------------------------------------------
23 //-------------------------------------------------------------
25public:
27 // ClassBaseReference継承クラス用禁止宣言
29
30 friend class GxRenderDevice;
31
33 //-------------------------------------------------------------
35 //-------------------------------------------------------------
37public:
39 void cleanup(void) override;
40
41protected:
43 virtual b32 initialize(u32 size, RENDER_INDEX_TYPE type, u32 attribute);
44
47
49 //-------------------------------------------------------------
51 //-------------------------------------------------------------
53public:
55 void onLostDevice(void) override;
56
58 b32 onResetDevice(void) override;
59
61 GX_FORCE_INLINE void onRender(void) override {}
62
64 void* map(u32 offset, u32 size, u32 mappingType) override;
66 void unmap(void) override;
68 void unmap(u32 size);
69
71 //-------------------------------------------------------------
73 //-------------------------------------------------------------
75public:
77 constexpr RENDER_INDEX_TYPE getIndexType(void) const { return _type; }
78
80 constexpr GxNativeBufferAddress getBufferAddress(void) const { return _pBufferAddress; }
81#if !defined(_PS5)
83 GxNativeBuffer getBuffer(void) const;
84#endif // !_PS5
85
87 //-------------------------------------------------------------
89 //-------------------------------------------------------------
91private:
92 RENDER_INDEX_TYPE _type;
93 u32 _mappingType;
94 GxNativeBufferAddress _pBufferAddress;
95#if !defined(_PS5)
96 GxNativeBuffer _pBuffer;
97#endif // !_PS5
98#if GX_USE_DX12 && defined(_WINDOWS)
99 GxNativeBuffer _pBufferUpload;
100#endif //GX_USE_DX12 && _WINDOWS
101
103};
104
105GX_CORE_NAMESPACE_END()
#define GX_PROHIBIT_CLASS_BASE_REFERENCE(__CLASS__)
GxClassBaseReference継承の禁止宣言(new以外の生成禁止 + コピー禁止)
Definition GxBase.h:244
RENDER_INDEX_TYPE
インデックスバッファ形式
Definition GxRender.h:147
Definition GxRenderBuffer.h:20
描画関連の依存をこのクラスで吸収します
Definition GxRenderDevice.h:450
b32 initialize(const GxRenderDeviceInitialInformation *pInitialInformation)
初期化関数
Definition GxRenderDevice.cpp:1017
インデックスバッファを管理する
Definition GxRenderIndexBuffer.h:20
constexpr GxNativeBufferAddress getBufferAddress(void) const
バッファアドレスを取得
Definition GxRenderIndexBuffer.h:80
GX_FORCE_INLINE void onRender(void) override
描画通知
Definition GxRenderIndexBuffer.h:61
constexpr RENDER_INDEX_TYPE getIndexType(void) const
インデックスのタイプを取得
Definition GxRenderIndexBuffer.h:77
32bitブーリアン
Definition GxDefine.h:173