Lysa  0.0
Lysa 3D Engine
RenderingWindow Class Reference

Detailed Description

Operating system window that serve as rendering surface.

+ Inheritance diagram for RenderingWindow:

Public Member Functions

 RenderingWindow (const RenderingWindowConfiguration &config={})
 
 ~RenderingWindow () override
 
void show () const
 
void close () const
 
Rect getRect () const
 
void setTitle (const std::string &title) const
 
vireo::PlatformWindowHandle getHandle () const
 
void setMouseMode (MouseMode mode) const
 
void setMouseCursor (MouseCursor cursor) const
 
void resetMousePosition () const
 
bool isMouseHidden () const
 
float2 getMousePosition () const
 
void setMousePosition (const float2 &position) const
 
RenderTargetgetRenderTarget ()
 
const RenderTargetgetRenderTarget () const
 
void setPause (const bool pause)
 
bool isPaused () const
 
bool isMinimized () const
 
- Public Member Functions inherited from UniqueResource
 UniqueResource () = default
 
 UniqueResource (UniqueResource &) = delete
 
UniqueResource & operator= (UniqueResource &) = delete
 
- Public Member Functions inherited from UnmanagedResource
 UnmanagedResource ()
 
 UnmanagedResource (const Resource &other)
 
- Public Member Functions inherited from Resource
bool operator== (const Resource &other) const
 
 Resource () = default
 
 Resource (const unique_id id)
 
virtual ~Resource () = default
 

Static Public Member Functions

static std::vector< RectgetFullScreenModes ()
 

Additional Inherited Members

- Public Attributes inherited from Resource
unique_id id {INVALID_ID}
 

Constructor & Destructor Documentation

RenderingWindow ( const RenderingWindowConfiguration config = {})

Creates and opens the platform window with the given configuration.

Parameters
configWindow configuration (title, size, mode, render-target settings).
~RenderingWindow ( )
override

Destroys the platform window and its associated render target.

Member Function Documentation

void close ( ) const

Request the window to close. Fires the CLOSING event.

static std::vector<Rect> getFullScreenModes ( )
static

Returns the list of available fullscreen resolutions for this monitor.

Returns
Vector of Rect values, each describing a supported display mode (x=0, y=0, w, h).
vireo::PlatformWindowHandle getHandle ( ) const
inline

Returns the platform-specific native window handle.

float2 getMousePosition ( ) const

Returns the mouse position

Returns
Mouse coordinates in pixels relative to the client area.
Rect getRect ( ) const

Returns the current position and size of the window.

Returns
Rectangle with the window's x, y, width, and height in screen pixels.
RenderTarget& getRenderTarget ( )
inline

Returns the render target associated with this window.

const RenderTarget& getRenderTarget ( ) const
inline

Returns the render target associated with this window (const).

bool isMinimized ( ) const

Returns true if the window is currently minimized.

bool isMouseHidden ( ) const

Returns true if the mouse cursor is currently hidden.

bool isPaused ( ) const
inline

Returns true if rendering is currently paused.

void resetMousePosition ( ) const

Sets the mouse position to the center of the window

void setMouseCursor ( MouseCursor  cursor) const

Sets the mouse cursor

void setMouseMode ( MouseMode  mode) const

Sets the mouse visibility and capture mode

void setMousePosition ( const float2 &  position) const

Returns the mouse position

Parameters
positionCoordinates in pixels relative to the client area.
void setPause ( const bool  pause)
inline

Pauses or resumes rendering for this window.

Parameters
pauseTrue to pause, false to resume.
void setTitle ( const std::string &  title) const

Sets the window title bar text.

void show ( ) const

Make a previously created window visible on screen.