JeVois  1.22
JeVois Smart Embedded Machine Vision Toolkit
Share this page:
Loading...
Searching...
No Matches
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.
 
virtual ~VideoDisplayBackend ()
 Virtual destructor for safe inheritance, free resources.
 
virtual void init (unsigned short w, unsigned short h, bool fullscreen=false)=0
 Initialize the underlying engine that will process events, create windows, etc.
 
virtual bool pollEvents (bool &shouldclose)=0
 Poll events such as mouse movements, buttons, keyboard, joystick, and pass to VideoDisplay.
 
virtual void newFrame ()
 Start a new frame and clear the window/framebuffer.
 
virtual void render ()
 Render the VideoDisplay graphics.
 
virtual void getWindowSize (unsigned short &w, unsigned short &h) const
 
EGLDisplay getDisplay () const
 Access our display.
 

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.
 
virtual void uninit ()
 Un-initialize the underlying engine, close windows, etc.
 

Protected Attributes

std::string const itsName
 
EGLDisplay itsDisplay = EGL_NO_DISPLAY
 
EGLConfig itsConfig = 0
 
EGLContext itsContext = EGL_NO_CONTEXT
 
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 259 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 243 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.

Implemented in jevois::ImGuiBackendMALI, jevois::VideoDisplayBackendMALI, and jevois::ImGuiBackend.

◆ init() [2/2]

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.

Reimplemented in jevois::ImGuiBackend.

Definition at line 57 of file VideoDisplayBackend.C.

References LERROR, and LFATAL.

◆ newFrame()

void jevois::VideoDisplayBackend::newFrame ( )
virtual

Start a new frame and clear the window/framebuffer.

Reimplemented in jevois::ImGuiBackendMALI.

Definition at line 223 of file VideoDisplayBackend.C.

References h, and LFATAL.

Referenced by jevois::ImGuiBackendMALI::newFrame().

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

Implemented in jevois::ImGuiBackendMALI, and jevois::VideoDisplayBackendMALI.

◆ render()

void jevois::VideoDisplayBackend::render ( )
virtual

Render the VideoDisplay graphics.

Reimplemented in jevois::ImGuiBackendMALI.

Definition at line 236 of file VideoDisplayBackend.C.

References GL_CHECK_BOOL.

Referenced by jevois::ImGuiBackendMALI::render().

◆ 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 208 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 = EGL_NO_CONTEXT
protected

Definition at line 75 of file VideoDisplayBackend.H.

◆ itsDisplay

EGLDisplay jevois::VideoDisplayBackend::itsDisplay = EGL_NO_DISPLAY
protected

Definition at line 73 of file VideoDisplayBackend.H.

◆ itsName

std::string const 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: