summaryrefslogtreecommitdiff
path: root/Runtime/Graphics/Device.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-10-27 23:37:24 +0800
committerchai <chaifix@163.com>2021-10-27 23:37:24 +0800
commit305ca0a09d4e750186b5190432de47f3493e806a (patch)
treed82f9ef73191abc2acbcbfdca4b184a28e6c381b /Runtime/Graphics/Device.h
parent51ced5a191078ce4ef08d57e343e91db007f556f (diff)
*GfxDevice
Diffstat (limited to 'Runtime/Graphics/Device.h')
-rw-r--r--Runtime/Graphics/Device.h83
1 files changed, 0 insertions, 83 deletions
diff --git a/Runtime/Graphics/Device.h b/Runtime/Graphics/Device.h
deleted file mode 100644
index 56cb197..0000000
--- a/Runtime/Graphics/Device.h
+++ /dev/null
@@ -1,83 +0,0 @@
-#ifndef DEVICE_H
-#define DEVICE_H
-
-#include "../Utilities/NonCopyable.h"
-#include "../Utilities/Type.h"
-#include "../Utilities/Assert.h"
-
-#include "Texture.h"
-#include "Color.h"
-#include "DeviceDefine.h"
-#include "VertexBuffer.h"
-
-struct DeviceSetting
-{
- ETextureFilterMode texFilter;
- ETextureWrapMode texWrap;
-};
-
-class Device : public NonCopyable
-{
-public:
- Device();
- ~Device();
-
- void Initialize(DeviceSetting& setting);
-
- void Enable(DeviceEnable enabled);
- void Disable(DeviceEnable enabled);
- void IsEnable(uint flag);
-
- void SetDepthTest(DepthTest testing);
- void SetCullFace(CullFace face);
- void SetStencilMask(byte stencilMask);
- void SetStencilOp(StencilOp op);
-
- void SetAntiAliasing(int level = 0);
-
- void Clear(int clearFlag);
-
- void BeginFrame();
- void EndFrame();
- void PresentFrame();
-
- //GET(SharedVertexBuffer*, SharedVBO, m_SharedVBO);
- //SharedVertexBuffer* GetSharedVBO() { return &m_SharedVBO; }
-
- GET_SET(Color, ClearColor, m_ClearColor);
-
- GET_SET(ETextureFilterMode, TextureFilter, m_TexFilter);
- GET_SET(ETextureWrapMode, TextureWrap, m_TexWrap);
-
- inline bool IsInsideFrame();
-
-private:
- uint m_EnableFlag;
-
- // Global texture setting
- ETextureFilterMode m_TexFilter;
- ETextureWrapMode m_TexWrap;
-
- Color m_ClearColor;
-
- DepthTest m_DepthTest;
- StencilTest m_StencilTest;
- StencilOp m_StencilOp;
- byte m_StencilMask;
-
- //SharedVertexBuffer m_SharedVBO;
-
- bool m_IsInsideFrame;
-
-};
-
-extern Device g_Device;
-
-#define g_SharedVBO (*g_Device.GetSharedVBO())
-
-inline bool Device::IsInsideFrame()
-{
- return m_IsInsideFrame;
-}
-
-#endif \ No newline at end of file