JeVois  1.17
JeVois Smart Embedded Machine Vision Toolkit
Share this page:
jevois::VideoDisplayBackend Class Referenceabstract

#include <jevois/GPU/VideoDisplayBackend.H>

Backend for VideoDisplay on JeVois-Pro.

This abstract base class provides an interface used by VideoDisplayGL. Derived implementations are available for X11+OpenGL-ES 3.2 (to be used on JeVois-Pro host) and Mali framebuffer + OpenGL-ES 3.2 (to be used on JeVois-Pro platform).

Definition at line 30 of file VideoDisplayBackend.H.

Inheritance diagram for jevois::VideoDisplayBackend:
Collaboration diagram for jevois::VideoDisplayBackend:

Public Member Functions

 VideoDisplayBackend ()
 Constructor. More...
 
virtual ~VideoDisplayBackend ()
 Virtual destructor for safe inheritance, free resources. More...
 
virtual void init (unsigned short w, unsigned short h, bool fullscreen=false)=0
 Initialize the underlying engine that will process events, create windows, etc. More...
 
virtual bool pollEvents (bool &shouldclose)=0
 Poll events such as mouse movements, buttons, keyboard, joystick, and pass to VideoDisplay. More...
 
virtual void newFrame ()
 Start a new frame and clear the window/framebuffer. More...
 
virtual void render ()
 Render the VideoDisplay graphics. More...
 
virtual void getWindowSize (unsigned short &w, unsigned short &h) const
 
EGLDisplay getDisplay () const
 Access our display. More...
 

Protected Member Functions

virtual void init (unsigned short w, unsigned short h, EGLNativeWindowType win)
 Initialize the underlying engine that will process events, create windows, etc. More...
 
virtual void uninit ()
 Un-initialize the underlying engine, close windows, etc. More...
 

Protected Attributes

const std::string itsName
 
EGLDisplay itsDisplay = 0
 
EGLConfig itsConfig = 0
 
EGLContext itsContext = 0
 
EGLSurface itsSurface = 0
 

Constructor & Destructor Documentation

◆ VideoDisplayBackend()

jevois::VideoDisplayBackend::VideoDisplayBackend ( )

Constructor.

Definition at line 46 of file VideoDisplayBackend.C.

◆ ~VideoDisplayBackend()

jevois::VideoDisplayBackend::~VideoDisplayBackend ( )
virtual

Virtual destructor for safe inheritance, free resources.

Definition at line 50 of file VideoDisplayBackend.C.

Member Function Documentation

◆ getDisplay()

EGLDisplay jevois::VideoDisplayBackend::getDisplay ( ) const

Access our display.

May return nullptr if init() has not yet been called.

Definition at line 256 of file VideoDisplayBackend.C.

◆ getWindowSize()

void jevois::VideoDisplayBackend::getWindowSize ( unsigned short &  w,
unsigned short &  h 
) const
virtual

Returns 0,0 if display has not been initialized.

Definition at line 240 of file VideoDisplayBackend.C.

References GL_CHECK, and h.

◆ init() [1/2]

virtual void jevois::VideoDisplayBackend::init ( unsigned short  w,
unsigned short  h,
bool  fullscreen = false 
)
pure virtual

Initialize the underlying engine that will process events, create windows, etc.

The init starts with the given initial framebuffer size. Note that on MALI, fullscreen parameter is ignored and we always run full-screen.

◆ init() [2/2]

virtual void jevois::VideoDisplayBackend::init ( unsigned short  w,
unsigned short  h,
EGLNativeWindowType  win 
)
protectedvirtual

Initialize the underlying engine that will process events, create windows, etc.

The init starts with the given initial window/framebuffer size. In the base class, we only initialize OpenGL. Derived classes should first create a window or framebuffer as needed.

◆ newFrame()

void jevois::VideoDisplayBackend::newFrame ( )
virtual

Start a new frame and clear the window/framebuffer.

Definition at line 220 of file VideoDisplayBackend.C.

References h, and LFATAL.

◆ pollEvents()

virtual bool jevois::VideoDisplayBackend::pollEvents ( bool &  shouldclose)
pure virtual

Poll events such as mouse movements, buttons, keyboard, joystick, and pass to VideoDisplay.

Returns true if some events were received, which can be used to turn on mouse pointer and GUI.

◆ render()

void jevois::VideoDisplayBackend::render ( )
virtual

Render the VideoDisplay graphics.

Definition at line 233 of file VideoDisplayBackend.C.

References GL_CHECK_BOOL.

◆ uninit()

void jevois::VideoDisplayBackend::uninit ( )
protectedvirtual

Un-initialize the underlying engine, close windows, etc.

In the base class, we only close OpenGL.

Definition at line 209 of file VideoDisplayBackend.C.

Member Data Documentation

◆ itsConfig

EGLConfig jevois::VideoDisplayBackend::itsConfig = 0
protected

Definition at line 74 of file VideoDisplayBackend.H.

◆ itsContext

EGLContext jevois::VideoDisplayBackend::itsContext = 0
protected

Definition at line 75 of file VideoDisplayBackend.H.

◆ itsDisplay

EGLDisplay jevois::VideoDisplayBackend::itsDisplay = 0
protected

Definition at line 73 of file VideoDisplayBackend.H.

◆ itsName

const std::string jevois::VideoDisplayBackend::itsName
protected

Definition at line 72 of file VideoDisplayBackend.H.

◆ itsSurface

EGLSurface jevois::VideoDisplayBackend::itsSurface = 0
protected

Definition at line 76 of file VideoDisplayBackend.H.


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