RavEngine
Loading...
Searching...
No Matches
RavEngine::Window Struct Reference
Collaboration diagram for RavEngine::Window:
[legend]

Classes

struct  SwapchainResult
 

Public Types

enum class  WindowMode { Windowed , BorderlessFullscreen , Fullscreen }
 

Public Member Functions

 Window (int width, int height, const std::string_view title)
 
void NotifySizeChanged (int width, int height)
 
void SetSize (int width, int height)
 
void QueueGetNextSwapchainImage (RGL::SwapchainPresentConfig &)
 
SwapchainResult BlockGetNextSwapchainImage (const RGL::SwapchainPresentConfig &)
 
dim_t< int > GetSizeInPixels () const
 
float GetDPIScale () const
 
void InitSwapchain (RGLDevicePtr device, RGLCommandQueuePtr mainCommandQueue)
 
void SetWindowMode (WindowMode mode)
 
void SetRelativeMouseMode (bool mode)
 
bool GetRelativeMouseMode ()
 

Public Attributes

SDL_Window * window
 
RGLSwapchainPtr swapchain
 
RGLSurfacePtr surface
 
RGLFencePtr swapchainFence
 
void * metalLayer
 
dim_t< int > windowdims
 
float currentScaleFactor = win_scalefactor
 

Static Public Attributes

static constexpr float win_scalefactor = 1
 

Member Function Documentation

◆ GetDPIScale()

float RavEngine::Window::GetDPIScale ( ) const
inline
Returns
the High DPI scale factor. Only applicable on macOS.

◆ GetRelativeMouseMode()

bool RavEngine::Window::GetRelativeMouseMode ( )
Returns
the current relative mouse mode

◆ SetRelativeMouseMode()

void RavEngine::Window::SetRelativeMouseMode ( bool  mode)

Set the state of relative mouse mode. If true, the mouse will send events even if outside the application window. If false, the mouse will only send events if inside the application window.

Parameters
modethe new state

◆ SetWindowMode()

void RavEngine::Window::SetWindowMode ( WindowMode  mode)

Set the video mode

Parameters
modethe new mode to use

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