66 auto
onUpdate(
float dt) ->
void override;
75 auto load(
const Stream& stream) ->
void override;
76 auto save(
Stream& stream)
const ->
void override;
91 [[nodiscard]] auto
getWidth() const ->
int;
92 [[nodiscard]] auto
getHeight() const ->
int;
sys::Json Stream
Definition AudioObject.h:20
unsigned int GLuint
Definition IndexBuffer.h:17
the base class for the engine, most things inherit from this.
Definition GameObject.h:83
Class that can interact with the keyboard.
Definition Keys.h:33
Type
Definition System.h:20
@ OpenGL
Definition System.h:23
System(const std::string &typeName, Type systemType)
Definition System.cpp:75
auto onEnterEngine() -> void override
hook that is called when a GameObject enters the Engine tree.
Definition opengl.cpp:293
auto systemShowMenu() -> void override
Specific systems should override this function to show their specific menu for the system.
Definition opengl.cpp:364
auto rescaleFrameBuffer() -> void
rescale framebuffer for ImGui Viewport based on sys::opengl width and height
Definition opengl.cpp:462
int screenWidth
Definition opengl.h:122
auto finishFrame() const -> void
Definition opengl.cpp:315
GLFWwindow * windowHandle
Definition opengl.h:108
GLuint textureID
ID for the texture for custom frameBuffer for game viewport in imgui.
Definition opengl.h:128
int screenHeight
Definition opengl.h:123
std::unique_ptr< GLFWimage > windowIcon
Definition opengl.h:125
int height
Definition opengl.h:117
OpenGL()
Definition opengl.cpp:172
int windowedHeight
Definition opengl.h:120
auto setHeight(int height) -> void
Definition opengl.cpp:340
auto getTextureID() const -> GLuint
Definition opengl.cpp:479
float backgroundGreenVal
Definition opengl.h:135
auto unbindFrameBuffer() -> void
unbind framebuffer for ImGui Viewport
Definition opengl.cpp:430
auto setWidth(int width) -> void
Definition opengl.cpp:331
auto disableCursor() const -> void
Hides the mouse cursor from the screen.
Definition opengl.cpp:354
auto onUpdate(float dt) -> void override
called once every frame.
Definition opengl.cpp:271
GLuint renderBuffer
ID for the custom renderBuffer for the game viewport in imgui.
Definition opengl.h:132
const GLFWvidmode * videoMode
Definition opengl.h:107
auto getWidth() const -> int
Definition opengl.cpp:321
GLuint frameBuffer
ID for the custom framebuffer for the game viewport in imgui.
Definition opengl.h:130
auto load(const Stream &stream) -> void override
Implementations will load the state of a GameObject from a th::Json Object.
Definition opengl.cpp:376
int windowedWidth
Definition opengl.h:119
auto bindFrameBuffer() -> void
bind framebuffer for ImGui Viewport
Definition opengl.cpp:421
auto setShaderUniforms() const -> void
auto getHeight() const -> int
Definition opengl.cpp:326
auto linkMessages() -> void
linking message
Definition opengl.cpp:410
auto receiveToggleWindowedFullScreen(const Message *message) -> Message
message for toggling fullscreen
Definition opengl.cpp:384
auto endWindow() -> void override
currently unused, but intended to but was assumed to be necessary for a proper ImGui editor
Definition opengl.h:70
auto getWindow() const -> GLFWwindow *
Definition opengl.cpp:310
~OpenGL() override
Definition opengl.cpp:298
bool currentlyFullscreen
Definition opengl.h:113
GLFWmonitor * monitorHandle
monitor handle if it is in null its in windowed mode and if its not it will go into fullscreen its ju...
Definition opengl.h:106
static auto getEnum() -> Type
function required by all systems
Definition opengl.h:53
auto createFrameBuffer() -> void
create framebuffer for ImGui Viewport
Definition opengl.cpp:435
auto save(Stream &stream) const -> void override
Implementations will load the state of a GameObject to a th::Json object.
Definition opengl.cpp:380
auto onRender() -> void override
called every frame after update has been called for every object.
Definition opengl.cpp:288
auto enableCursor() const -> void
Shows the mouse cursor on the screen.
Definition opengl.cpp:349
float backgroundRedVal
Definition opengl.h:134
auto clone() const -> std::unique_ptr< GameObject > override
makes a copy a GameObject even if it's held polymorphically
Definition opengl.cpp:359
int width
Definition opengl.h:116
float backgroundBlueVal
Definition opengl.h:136
the type of elements in a basic_json container
Definition GameObject.h:37
auto constexpr default_window_height
default window height when the engine started
Definition opengl.h:39
auto constexpr default_window_width
default window height when the engine started
Definition opengl.h:37