Aurore
A Switch-like interface for your app, on every screen
Loading...
Searching...
No Matches
aurore::HeadlessVideoContext Class Reference

#include <aurore/test/headless_platform.hpp>

Inheritance diagram for aurore::HeadlessVideoContext:
VideoContext

Public Member Functions

 HeadlessVideoContext (int width, int height)
 
 ~HeadlessVideoContext () override
 
NVGcontext * getNVGContext () override
 
void clear (NVGcolor color) override
 
void beginFrame () override
 
void endFrame () override
 
void setSwapInterval (int interval) override
 
void resetState () override
 
double getScaleFactor () override
 
bool readPixels (std::vector< unsigned char > *rgba, int *width, int *height) override
 
void resize (int width, int height)
 
bool isValid () const
 
- Public Member Functions inherited from VideoContext
virtual ~VideoContext ()=default
 
virtual void fullScreen (bool fs)
 
virtual int getCurrentMonitorIndex ()
 

Additional Inherited Members

- Static Public Attributes inherited from VideoContext
static bool FULLSCREEN = false
 
static float posX = NAN
 
static float posY = NAN
 
static uint32_t sizeW = 0
 
static uint32_t sizeH = 0
 
static int monitorIndex = 0
 
static int swapInterval = 1
 

Constructor & Destructor Documentation

◆ HeadlessVideoContext()

aurore::HeadlessVideoContext::HeadlessVideoContext ( int  width,
int  height 
)

◆ ~HeadlessVideoContext()

aurore::HeadlessVideoContext::~HeadlessVideoContext ( )
override

Member Function Documentation

◆ beginFrame()

void aurore::HeadlessVideoContext::beginFrame ( )
overridevirtual

Called at the beginning of every frame to begin it.

Implements VideoContext.

◆ clear()

void aurore::HeadlessVideoContext::clear ( NVGcolor  color)
overridevirtual

Called at the beginning of every frame to clear the window

Implements VideoContext.

◆ endFrame()

void aurore::HeadlessVideoContext::endFrame ( )
overridevirtual

Called at the end of every frame to end it (swap buffers...).

Implements VideoContext.

◆ getNVGContext()

NVGcontext * aurore::HeadlessVideoContext::getNVGContext ( )
inlineoverridevirtual

Implements VideoContext.

◆ getScaleFactor()

double aurore::HeadlessVideoContext::getScaleFactor ( )
inlineoverridevirtual

Implements VideoContext.

◆ isValid()

bool aurore::HeadlessVideoContext::isValid ( ) const
inline

◆ readPixels()

bool aurore::HeadlessVideoContext::readPixels ( std::vector< unsigned char > *  rgba,
int *  width,
int *  height 
)
overridevirtual

Reads back the frame drawn so far (before endFrame() presents it): top-down rows of opaque RGBA pixels, at the drawable's size. Returns false where the driver cannot (only the OpenGL ones do for now).

Reimplemented from VideoContext.

◆ resetState()

void aurore::HeadlessVideoContext::resetState ( )
overridevirtual

Can be called by the application to reset the graphics state, in case there is a need to use the graphics API directly (for instance direct OpenGL calls).

Implements VideoContext.

◆ resize()

void aurore::HeadlessVideoContext::resize ( int  width,
int  height 
)

◆ setSwapInterval()

void aurore::HeadlessVideoContext::setSwapInterval ( int  interval)
inlineoverridevirtual

Implements VideoContext.


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