26 ScreenMode(
const int32_t width,
const int32_t height,
const float refreshRate,
const uint32_t modeIndex)
51 [[nodiscard]] int32_t
GetWidth()
const;
75 [[nodiscard]]
bool IsVSync()
const;
81 [[nodiscard]]
const std::vector<ScreenMode>&
GetScreenModes()
const;
88 std::expected<void, CoriError<>>
SetScreenMode(
const uint32_t modeIndex);
112 [[nodiscard]]
void* GetNativeContext()
const;
113 [[nodiscard]]
void* GetNativeWindow()
const;
115 struct WindowSaveData {
118 float m_RefreshRate{};
120 uint32_t m_SDLModeIndex{};
121 uint32_t m_ModeIndex{};
125 [[nodiscard]]
static std::unique_ptr<Window> Create(std::string name,
const bool vsync =
false);
129 explicit Window(std::string title,
const bool vsync =
false);
133 Data* m_Data{
nullptr};
int32_t GetHeight() const
Give the current window height.
std::expected< void, CoriError<> > SetScreenMode(const uint32_t modeIndex)
Changes the current ScreenMode.
const std::vector< ScreenMode > & GetScreenModes() const
Retrieves a list of all available ScreenMode.
uint32_t GetCurrentScreenMode() const
Retrieves the current screen mode index.
static Graphics::GraphicsAPIs GetCurrentAPI()
Returns the graphical API used by this window.
int32_t GetWidth() const
Give the current window width.
WindowMode GetWindowMode() const
Gets the current WindowMode;.
void SetVSync(const bool status)
Changes the VSync state.
bool IsVSync() const
Checks is VSynch is currently enabled.
std::expected< void, CoriError<> > SetWindowMode(WindowMode mode)
Changes the current WindowMode.
For InstanceMetrics to work with a type it should derive from this.
Core systems of the engine are here.
std::function< void(Event &)> EventCallbackFn
Almost everything connected to graphics is in this namespace.
@ OpenGL
The only one available for now.
ScreenMode(const int32_t width, const int32_t height, const float refreshRate, const uint32_t modeIndex)