Aurore
A Switch-like interface for your app, on every screen
Loading...
Searching...
No Matches
VideoContext Class Referenceabstract

#include <aurore/core/video.hpp>

Inheritance diagram for VideoContext:
aurore::HeadlessVideoContext

Public Member Functions

virtual ~VideoContext ()=default
 
virtual void clear (NVGcolor color)=0
 
virtual void beginFrame ()=0
 
virtual void endFrame ()=0
 
virtual void resetState ()=0
 
virtual double getScaleFactor ()=0
 
virtual void fullScreen (bool fs)
 
virtual NVGcontext * getNVGContext ()=0
 
virtual bool readPixels (std::vector< unsigned char > *rgba, int *width, int *height)
 
virtual void setSwapInterval (int interval)=0
 
virtual int getCurrentMonitorIndex ()
 

Static Public Attributes

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

◆ ~VideoContext()

virtual VideoContext::~VideoContext ( )
virtualdefault

Member Function Documentation

◆ beginFrame()

virtual void VideoContext::beginFrame ( )
pure virtual

Called at the beginning of every frame to begin it.

Implemented in aurore::HeadlessVideoContext.

◆ clear()

virtual void VideoContext::clear ( NVGcolor  color)
pure virtual

Called at the beginning of every frame to clear the window

Implemented in aurore::HeadlessVideoContext.

◆ endFrame()

virtual void VideoContext::endFrame ( )
pure virtual

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

Implemented in aurore::HeadlessVideoContext.

◆ fullScreen()

virtual void VideoContext::fullScreen ( bool  fs)
inlinevirtual

◆ getCurrentMonitorIndex()

virtual int VideoContext::getCurrentMonitorIndex ( )
inlinevirtual

◆ getNVGContext()

virtual NVGcontext * VideoContext::getNVGContext ( )
pure virtual

◆ getScaleFactor()

virtual double VideoContext::getScaleFactor ( )
pure virtual

◆ readPixels()

virtual bool VideoContext::readPixels ( std::vector< unsigned char > *  rgba,
int *  width,
int *  height 
)
inlinevirtual

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 in aurore::HeadlessVideoContext.

◆ resetState()

virtual void VideoContext::resetState ( )
pure virtual

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).

Implemented in aurore::HeadlessVideoContext.

◆ setSwapInterval()

virtual void VideoContext::setSwapInterval ( int  interval)
pure virtual

Member Data Documentation

◆ FULLSCREEN

bool VideoContext::FULLSCREEN = false
inlinestatic

◆ monitorIndex

int VideoContext::monitorIndex = 0
inlinestatic

◆ posX

float VideoContext::posX = NAN
inlinestatic

◆ posY

float VideoContext::posY = NAN
static

◆ sizeH

uint32_t VideoContext::sizeH = 0
static

◆ sizeW

uint32_t VideoContext::sizeW = 0
inlinestatic

◆ swapInterval

int VideoContext::swapInterval = 1
inlinestatic

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