Voxellancer  0.3
A game about voxels in space
 All Classes Functions Pages
ContextProvider Class Reference

#include <contextprovider.h>

Collaboration diagram for ContextProvider:
[legend]

Public Member Functions

void setRequiredGLVersion (int majorVersionRequire, int minorVersionRequire)
 
void initWindowed ()
 
void initWindowed (const Size< int > &resolution)
 
void initWindowed (const Size< int > &resolution, const Size< int > &position)
 
void initFullScreen (int monitorIndex=0)
 
void toggleFullScreen ()
 
void shutdown ()
 
bool fullScreen () const
 
Size< int > resolution () const
 
Viewport viewport () const
 
float aspectRatio () const
 
std::vector< GLFWmonitor * > monitors () const
 
int currentMonitor () const
 
void registerContextDependant (ContextDependant *dependant)
 
void unregisterContextDependant (ContextDependant *dependant)
 

Static Public Member Functions

static ContextProviderinstance ()
 

Protected Member Functions

Size< int > currentResolution (GLFWmonitor *monitor)
 
void setWindowHints ()
 

Protected Attributes

std::unordered_set
< ContextDependant * > 
m_contextDependants
 
bool m_fullScreen
 
int m_majorVersionRequire
 
int m_minorVersionRequire
 
int m_lastFullScreenMonitorIndex
 
Size< int > m_lastWindowedPos
 
Size< int > m_lastWindowedSize
 

Static Protected Attributes

static ContextProviders_instance = nullptr
 

Detailed Description

The ContextProvider manages the use of the GL context, especially its recreation when switching fullscreen and windowed mode


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