diff options
author | chai <chaifix@163.com> | 2019-03-19 23:06:27 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-03-19 23:06:27 +0800 |
commit | 1497dccd63a84b7ee2b229b1ad9c5c02718f2a78 (patch) | |
tree | f8d1bff50da13e126d08c7345653e002e293202d /source/libs/asura-lib-core/graphics/window.h | |
parent | 5e2a973516e0729b225da9de0b03015dc5854ac4 (diff) |
*rename
Diffstat (limited to 'source/libs/asura-lib-core/graphics/window.h')
-rw-r--r-- | source/libs/asura-lib-core/graphics/window.h | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/source/libs/asura-lib-core/graphics/window.h b/source/libs/asura-lib-core/graphics/window.h new file mode 100644 index 0000000..cb036f1 --- /dev/null +++ b/source/libs/asura-lib-core/graphics/window.h @@ -0,0 +1,68 @@ +#ifndef __ASURA_ENGINE_WINDOW_H__ +#define __ASURA_ENGINE_WINDOW_H__ + +#include "../scripting/portable.hpp" +#include "../math/vector2.hpp" +#include "render_state.h" +#include "render_target.h" + +namespace AsuraEngine +{ + namespace Graphics + { + + enum WindowStyle + { + WINDOW_STYLE_FULLSCREEN = 1 << 1, + }; + + /// + /// ڣֶ֧രڡڱ༭Ҫ֧֣runnerֻҪһڡͬĿͻʵִ˽ӿڲֶעᵽlua + /// + ASURA_ABSTRACT class Window + : public RenderTarget + { + public: + + Window(WindowStyle style); + + ~Window(); + + virtual void SetSize(uint width, uint height) = 0; + + virtual void SetPosition(int x, int y) = 0; + + virtual void SetTitle(const std::string& title) = 0; + + virtual void SetWindowStyle(WindowStyle style) = 0; + + virtual void Show() = 0; + + virtual void Hide() = 0; + + /// + /// ǿ˫ĴڣҪչʾǰ̨ + /// + virtual void SwapRenderBuffer() = 0; + + virtual void Clear(const Color& col = Color::Black) = 0; + + virtual void Clear(const Math::Recti& quad, const Color& col = Color::Black) = 0; + + virtual void Draw(const Drawable* texture, const RenderState& state) = 0; + + virtual void Draw(const Drawable* texture, const Math::Recti& quad, const RenderState& state) = 0; + + protected: + + Math::Vector2i mPosition; + Math::Vector2i mSize; + + }; + + using RenderWindow = Window; + + } +} + +#endif
\ No newline at end of file |