Clutter Engine 0.0.1
Loading...
Searching...
No Matches
clt::Window Class Reference

Represents a window in the Clutter engine. More...

#include <Window.h>

Public Member Functions

 Window (const Window &)=delete
 
void operator= (const Window &)=delete
 
 ~Window ()
 Destructor. Cleans up window resources.
 
Vector2 GetDimensions () const
 Gets the current dimensions of the window.
 
GLFWwindowGetGLFWWindow () const
 Gets the underlying GLFW window pointer.
 
void ResizeViewport (unsigned int startWidth, unsigned int startHeight, unsigned int width, unsigned int height)
 Resizes the viewport of the window.
 
void RenameViewport (const char *name)
 Renames the window viewport.
 
bool ShouldClose () const
 Checks if the window should close.
 
void SwapBuffers () const
 Swaps the front and back buffers of the window.
 
void Close ()
 Closes the window.
 

Static Public Member Functions

static WindowGet ()
 Gets the singleton instance of the Window.
 

Friends

class CEngine
 

Detailed Description

Represents a window in the Clutter engine.

Handles window creation, resizing, renaming, and buffer swapping.

Member Function Documentation

◆ Get()

Window & Window::Get ( )
static

Gets the singleton instance of the Window.

Returns
Reference to the Window instance.

◆ GetDimensions()

Vector2 clt::Window::GetDimensions ( ) const
inline

Gets the current dimensions of the window.

Returns
The window dimensions as a Vector2.

◆ GetGLFWWindow()

GLFWwindow * clt::Window::GetGLFWWindow ( ) const
inline

Gets the underlying GLFW window pointer.

Returns
Pointer to the GLFWwindow.

◆ RenameViewport()

void Window::RenameViewport ( const char * name)

Renames the window viewport.

Parameters
nameThe new name for the window.

◆ ResizeViewport()

void Window::ResizeViewport ( unsigned int startWidth,
unsigned int startHeight,
unsigned int width,
unsigned int height )

Resizes the viewport of the window.

Parameters
startWidthThe starting width of the viewport.
startHeightThe starting height of the viewport.
widthThe new width of the viewport.
heightThe new height of the viewport.

◆ ShouldClose()

bool Window::ShouldClose ( ) const

Checks if the window should close.

Returns
True if the window should close, false otherwise.

The documentation for this class was generated from the following files: