OROCHI
 
Loading...
Searching...
No Matches
GxRenderBuffer.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:
26 GX_RTTI_ABSTRACT_CLASS(GxRenderBuffer, GxRenderResource)
27 // ClassBaseReference継承クラス用禁止宣言
29
30
31 //-------------------------------------------------------------
33 //-------------------------------------------------------------
35protected:
37 GxRenderBuffer(void);
38
40 //-------------------------------------------------------------
42 //-------------------------------------------------------------
44public:
46 GX_FORCE_INLINE void onLostDevice(void) override {}
47
49 GX_FORCE_INLINE b32 onResetDevice(void) override { return true; }
50
52 GX_FORCE_INLINE void onRender(void) override {}
53
55 virtual void* map(u32 offset, u32 size, u32 mappingType) = 0;
57 virtual void unmap(void) = 0;
58
60 //-------------------------------------------------------------
62 //-------------------------------------------------------------
64public:
66 constexpr u32 getSize(void) const { return _size; }
68 constexpr u32 getAttribute(void) const { return _attribute; }
69
71 //-------------------------------------------------------------
73 //-------------------------------------------------------------
75
76 u32 _size;
78
80};
81
82GX_CORE_NAMESPACE_END()
#define GX_PROHIBIT_CLASS_BASE_REFERENCE(__CLASS__)
GxClassBaseReference継承の禁止宣言(new以外の生成禁止 + コピー禁止)
Definition GxBase.h:244
Definition GxRenderBuffer.h:20
GX_FORCE_INLINE void onRender(void) override
描画通知
Definition GxRenderBuffer.h:52
GX_FORCE_INLINE b32 onResetDevice(void) override
デバイスのリセット後に通知
Definition GxRenderBuffer.h:49
constexpr u32 getSize(void) const
バッファサイズを取得
Definition GxRenderBuffer.h:66
constexpr u32 getAttribute(void) const
属性を取得
Definition GxRenderBuffer.h:68
virtual void * map(u32 offset, u32 size, u32 mappingType)=0
マッピング開始
GX_FORCE_INLINE void onLostDevice(void) override
デバイスが消失した時点で通知
Definition GxRenderBuffer.h:46
virtual void unmap(void)=0
マッピング終了
u32 _size
バッファサイズ
Definition GxRenderBuffer.h:76
u32 _attribute
属性
Definition GxRenderBuffer.h:77
GPUリソースを管理する
Definition GxRenderResource.h:20
32bitブーリアン
Definition GxDefine.h:173