Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include "../include/auto.hpp"
- #include "../include/win32.hpp"
- #include "../detail/singleton.hpp"
- #include "../imgui/imgui.hpp"
- #include "../imgui/imgui_impl_win32.hpp"
- #include "../imgui/imgui_impl_dx9.hpp"
- namespace horizon::core
- {
- enum TextLayout : std::uint32_t
- {
- TextLeft = 0x00,
- TextRight = 0x01,
- TextCenterV = 0x02,
- TextCenterH = 0x04,
- TextCenter = ( TextCenterV | TextCenterH ),
- };
- class Renderer : public detail::Singleton< Renderer >
- {
- public:
- ~Renderer();
- public:
- auto Create( IDirect3DDevice9* direct_device ) -> bool;
- auto Destroy() -> void;
- auto Begin() -> bool;
- auto End() -> void;
- auto Present() -> void;
- auto DeviceLost() -> void;
- auto DeviceReset( const HRESULT result ) -> void;
- public:
- auto DrawQuad( const ImVec2& p0, const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImColor& color ) -> void;
- auto DrawRect( const ImVec2& begin, const ImVec2& size, const ImColor& color ) -> void;
- auto DrawLine( const ImVec2& begin, const ImVec2& end, const ImColor& color, float width = 1.f ) -> void;
- auto DrawText( const ImVec2& begin, unsigned align, const ImColor& color, const char* message, ... ) -> void;
- auto GetTextSize( ImVec2& output, const char* message, ... ) -> void;
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement