Overload  1.1
Game engine with editor
Public Member Functions | Static Public Attributes | List of all members
OvWindowing::Context::Device Class Reference

#include <Device.h>

Public Member Functions

 Device (const Settings::DeviceSettings &p_deviceSettings)
 
 ~Device ()
 
std::pair< int16_t, int16_t > GetMonitorSize () const
 
GLFWcursor * GetCursorInstance (Cursor::ECursorShape p_cursorShape) const
 
bool HasVsync () const
 
void SetVsync (bool p_value)
 
void PollEvents () const
 
float GetElapsedTime () const
 

Static Public Attributes

static OvTools::Eventing::Event< EDeviceError, std::string > ErrorEvent
 

Detailed Description

The Device represents the windowing context. It is necessary to create a device to create a window

Constructor & Destructor Documentation

◆ Device()

OvWindowing::Context::Device::Device ( const Settings::DeviceSettings p_deviceSettings)

The constructor of the device will take care about GLFW initialization

◆ ~Device()

OvWindowing::Context::Device::~Device ( )

The destructor of the device will take care about GLFW destruction

Member Function Documentation

◆ GetCursorInstance()

GLFWcursor * OvWindowing::Context::Device::GetCursorInstance ( Cursor::ECursorShape  p_cursorShape) const

Return an instance of GLFWcursor corresponding to the given shape

Parameters
p_cursorShape

◆ GetElapsedTime()

float OvWindowing::Context::Device::GetElapsedTime ( ) const

Returns the elapsed time since the device startup

◆ GetMonitorSize()

std::pair< int16_t, int16_t > OvWindowing::Context::Device::GetMonitorSize ( ) const

Return the size, in pixels, of the primary monity

◆ HasVsync()

bool OvWindowing::Context::Device::HasVsync ( ) const

Return true if the vsync is currently enabled

◆ PollEvents()

void OvWindowing::Context::Device::PollEvents ( ) const

Enable the inputs and events managments with created windows

Note
Should be called every frames

◆ SetVsync()

void OvWindowing::Context::Device::SetVsync ( bool  p_value)

Enable or disable the vsync

Note
You must call this method after creating and defining a window as the current context
Parameters
p_value(True to enable vsync)

Member Data Documentation

◆ ErrorEvent

OvTools::Eventing::Event< OvWindowing::Context::EDeviceError, std::string > OvWindowing::Context::Device::ErrorEvent
static

Bind a listener to this event to receive device errors

@project: Overload

Author
: Overload Tech. @restrictions: This software may not be resold, redistributed or otherwise conveyed to a third party.

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