35 virtual void SetViewport(
int x,
int y,
int w,
int h) = 0;
36 virtual void GetViewport(
int& x,
int& y,
int& w,
int& h)
const = 0;
37 virtual void SetDepthRange(
float zmin,
float zmax) = 0;
38 virtual void GetDepthRange(
float& zmin,
float& zmax)
const = 0;
41 virtual bool Resize(
unsigned int w,
unsigned int h) = 0;
44 inline void SetClearColor(std::array<float, 4>
const& clearColor);
45 inline void SetClearDepth(
float clearDepth);
46 inline void SetClearStencil(
unsigned int clearStencil);
47 inline std::array<float, 4>
const& GetClearColor()
const;
48 inline float GetClearDepth()
const;
49 inline unsigned int GetClearStencil()
const;
50 virtual void DisplayColorBuffer(
unsigned int syncInterval) = 0;
54 virtual void SetFont(std::shared_ptr<Font>
const& font);
55 inline std::shared_ptr<Font>
const& GetFont()
const;
56 inline void SetDefaultFont();
57 inline std::shared_ptr<Font>
const& GetDefaultFont()
const;
61 virtual void SetBlendState(std::shared_ptr<BlendState>
const& state) = 0;
62 inline std::shared_ptr<BlendState>
const& GetBlendState()
const;
63 inline void SetDefaultBlendState();
64 inline std::shared_ptr<BlendState>
const& GetDefaultBlendState()
const;
66 virtual void SetDepthStencilState(std::shared_ptr<DepthStencilState>
const& state) = 0;
67 inline std::shared_ptr<DepthStencilState>
const& GetDepthStencilState()
const;
68 inline void SetDefaultDepthStencilState();
69 inline std::shared_ptr<DepthStencilState>
const& GetDefaultDepthStencilState()
const;
71 virtual void SetRasterizerState(std::shared_ptr<RasterizerState>
const& state) = 0;
72 inline std::shared_ptr<RasterizerState>
const& GetRasterizerState()
const;
73 inline void SetDefaultRasterizerState();
74 inline std::shared_ptr<RasterizerState>
const& GetDefaultRasterizerState()
const;
77 virtual bool Update(std::shared_ptr<Buffer>
const&
buffer) = 0;
78 virtual bool Update(std::shared_ptr<TextureSingle>
const&
texture) = 0;
82 virtual uint64_t Draw(std::shared_ptr<OverlayEffect>
const& effect) = 0;
91 void CreateDefaultGlobalState();
92 virtual void DestroyDefaultGlobalState();
118 mClearColor = clearColor;
123 mClearDepth = clearDepth;
128 mClearStencil = clearStencil;
143 return mClearStencil;
153 SetFont(mDefaultFont);
163 return mActiveBlendState;
168 SetBlendState(mDefaultBlendState);
173 return mDefaultBlendState;
178 return mActiveDepthStencilState;
183 SetDepthStencilState(mDefaultDepthStencilState);
188 return mDefaultDepthStencilState;
193 return mActiveRasterizerState;
198 SetRasterizerState(mDefaultRasterizerState);
203 return mDefaultRasterizerState;
std::shared_ptr< RasterizerState > mDefaultRasterizerState
std::shared_ptr< Font > mActiveFont
std::shared_ptr< RasterizerState > mActiveRasterizerState
std::shared_ptr< BlendState > mActiveBlendState
std::array< float, 4 > const & GetClearColor() const
std::shared_ptr< BlendState > const & GetDefaultBlendState() const
void SetDefaultDepthStencilState()
void SetClearColor(std::array< float, 4 > const &clearColor)
GLubyte GLubyte GLubyte GLubyte w
std::array< float, 4 > mClearColor
unsigned int mClearStencil
void SetClearDepth(float clearDepth)
void SetClearStencil(unsigned int clearStencil)
std::shared_ptr< DepthStencilState > mActiveDepthStencilState
std::shared_ptr< Font > mDefaultFont
std::shared_ptr< BlendState > const & GetBlendState() const
GLfloat GLfloat GLfloat GLfloat h
std::shared_ptr< RasterizerState > const & GetDefaultRasterizerState() const
std::shared_ptr< DepthStencilState > const & GetDepthStencilState() const
std::shared_ptr< BlendState > mDefaultBlendState
float GetClearDepth() const
std::shared_ptr< RasterizerState > const & GetRasterizerState() const
void SetDefaultBlendState()
std::shared_ptr< Font > const & GetDefaultFont() const
std::shared_ptr< DepthStencilState > mDefaultDepthStencilState
unsigned int GetClearStencil() const
std::shared_ptr< DepthStencilState > const & GetDefaultDepthStencilState() const
void SetDefaultRasterizerState()
std::shared_ptr< Font > const & GetFont() const