Finality Engine
Toggle main menu visibility
Loading...
Searching...
No Matches
GLFWWindowImpl.h
Go to the documentation of this file.
1
6
#pragma once
7
#include "
Core.h
"
8
#include "
Window.h
"
9
10
#include <GLFW/glfw3.h>
11
12
#ifdef _WIN32
13
#define GLFW_EXPOSE_NATIVE_WIN32
14
#include <GLFW/glfw3native.h>
15
#include <windows.h>
16
#endif
17
18
namespace
FINALITY
19
{
21
class
GLFWWindowImpl
:
public
Window
22
{
23
public
:
24
void
Initialize
(
const
WindowSpec
& specification)
override
;
25
void
Update
()
override
;
26
void
Shutdown
()
override
;
27
28
bool
ShouldClose
()
const override
;
29
uint32_t
GetWidth
()
const override
{
return
m_Specification.width; }
30
uint32_t
GetHeight
()
const override
{
return
m_Specification.height; }
31
WindowSpec
GetSpecifications
()
const override
{
return
m_Specification; }
32
NativeWindowHandle
GetNativeHandles
()
const override
{
return
m_NativeHandle; }
33
34
GLFWwindow*
GetGLFWwindow
()
const
{
return
m_Window; }
35
36
void
SetCallbacks
()
override
;
37
bool
ConsumePendingResize
(
int
& outW,
int
& outH)
override
;
38
39
void
SetCursorMode
(
bool
hiddenAndLocked)
override
;
40
void
SetWindowTitle
(
const
std::string& title)
override
;
41
42
private
:
43
GLFWwindow* m_Window =
nullptr
;
44
WindowSpec
m_Specification;
45
46
NativeWindowHandle
m_NativeHandle;
47
48
bool
m_PendingResize =
false
;
49
int
m_PendingWidth = 0, m_PendingHeight = 0;
50
};
51
}
Core.h
Window.h
FINALITY::GLFWWindowImpl
Definition
GLFWWindowImpl.h:22
FINALITY::GLFWWindowImpl::ShouldClose
bool ShouldClose() const override
FINALITY::GLFWWindowImpl::Initialize
void Initialize(const WindowSpec &specification) override
FINALITY::GLFWWindowImpl::GetGLFWwindow
GLFWwindow * GetGLFWwindow() const
Definition
GLFWWindowImpl.h:34
FINALITY::GLFWWindowImpl::ConsumePendingResize
bool ConsumePendingResize(int &outW, int &outH) override
FINALITY::GLFWWindowImpl::Update
void Update() override
FINALITY::GLFWWindowImpl::SetCursorMode
void SetCursorMode(bool hiddenAndLocked) override
FINALITY::GLFWWindowImpl::GetNativeHandles
NativeWindowHandle GetNativeHandles() const override
Definition
GLFWWindowImpl.h:32
FINALITY::GLFWWindowImpl::SetCallbacks
void SetCallbacks() override
FINALITY::GLFWWindowImpl::SetWindowTitle
void SetWindowTitle(const std::string &title) override
FINALITY::GLFWWindowImpl::GetWidth
uint32_t GetWidth() const override
Definition
GLFWWindowImpl.h:29
FINALITY::GLFWWindowImpl::GetSpecifications
WindowSpec GetSpecifications() const override
Definition
GLFWWindowImpl.h:31
FINALITY::GLFWWindowImpl::GetHeight
uint32_t GetHeight() const override
Definition
GLFWWindowImpl.h:30
FINALITY::GLFWWindowImpl::Shutdown
void Shutdown() override
FINALITY::Window
Definition
Window.h:33
FINALITY
Definition
Asset.h:12
FINALITY::NativeWindowHandle
Definition
Window.h:26
FINALITY::WindowSpec
Definition
Window.h:17
FinalityEngine
src
Core
GLFWWindowImpl.h
Generated by
1.18.0