FWindowSDL

namespace marengine
class FWindowSDL : public FWindow

Subclassed by FWindowSDLImGui

Public Functions

bool open(uint32_t width, uint32_t height, const char *name) final
void close() final

Closes current window instance. Remember, it does not terminate library, closes window!

bool initializeLibrary() final

Initializes implementation library of window instance. It is called during MAREngine’s startup.

Return

True if window’s library initialized correctly, false otherwise

void terminateLibrary() final

Terminates window’s library. Called during MAREngine’s termination.

bool isGoingToClose() final

Checks if window is going to close after that frame and returns the result.

Return

True, if window is going to close, false otherwise

void setVerticalSync(int32_t vsSetValue) final
void swapBuffers() final

Swaps buffers and polls event.

bool isKeyPressed(int32_t key) const final
bool isMousePressed(int32_t key) const final

Protected Attributes

SDL_Window *p_pWindow = {nullptr}
SDL_GLContext p_context = {}
bool p_shouldWindowClose = {false}
class FWindowSDLImGui : public FWindowSDL

Public Functions

void initEditorGuiLibrary() final

Initializes GUI Editor Library with window instance, so that it can be used correctly. It is called during editor gui initialization.

void beginNewFrameEditorGuiLibrary() final

Begins new frame at editor GUI library. Sometimes these methods need to have access to window instance, so that it should be implemented there. Called during every new frame.

void terminateEditorGuiLibrary() final

Terminates EditorGUI library, so that window afterwards can be closed correctly.