FabGL
ESP32 Display Controller and Graphics Library
VGADirectController Class Reference

Represents a base abstract class for direct draw VGA controller. More...

#include <vgadirectcontroller.h>

Inherits VGABaseController.

Public Member Functions

 VGADirectController (bool autoRun=true)
 Initializes a new instance of VGADirectController. More...
 
void begin ()
 This is the 64 colors (8 GPIOs) initializer using default pinout. More...
 
void begin (gpio_num_t red1GPIO, gpio_num_t red0GPIO, gpio_num_t green1GPIO, gpio_num_t green0GPIO, gpio_num_t blue1GPIO, gpio_num_t blue0GPIO, gpio_num_t HSyncGPIO, gpio_num_t VSyncGPIO)
 This is the 64 colors (8 GPIOs) initializer. More...
 
void begin (gpio_num_t redGPIO, gpio_num_t greenGPIO, gpio_num_t blueGPIO, gpio_num_t HSyncGPIO, gpio_num_t VSyncGPIO)
 This is the 8 colors (5 GPIOs) initializer. More...
 
DisplayControllerType controllerType ()
 Determines the display controller type. More...
 
uint8_t createRawPixel (RGB222 rgb)
 Creates a raw pixel to use with VGAController.setRawPixel. More...
 
void enableBackgroundPrimitiveExecution (bool value)
 Enables or disables drawings inside vertical retracing time. More...
 
void enableBackgroundPrimitiveTimeout (bool value)
 Enables or disables execution time limitation inside vertical retracing interrupt. More...
 
uint8_t getBitsPerChannel ()
 Gets number of bits allocated for each channel. More...
 
uint8_t volatile * getDefaultScanlineBuffer (int scanline)
 Gets default scanline buffer. More...
 
uint8_t * getScanline (int y)
 Gets a raw scanline pointer. More...
 
uint8_t volatile * getScanlineBuffer (int scanline)
 Gets current scanline buffer. More...
 
int getScreenHeight ()
 Determines the screen height in pixels. More...
 
int getScreenWidth ()
 Determines the screen width in pixels. More...
 
int getViewPortCol ()
 Determines horizontal position of the viewport. More...
 
int getViewPortHeight ()
 Determines vertical size of the viewport. More...
 
int getViewPortRow ()
 Determines vertical position of the viewport. More...
 
int getViewPortWidth ()
 Determines horizontal size of the viewport. More...
 
bool isDoubleBuffered ()
 Determines whether BitmappedDisplayController is on double buffered mode. More...
 
void moveScreen (int offsetX, int offsetY)
 Moves screen by specified horizontal and vertical offset. More...
 
NativePixelFormat nativePixelFormat ()
 Represents the native pixel format used by this display. More...
 
void processPrimitives ()
 Draws immediately all primitives in the queue. More...
 
void refreshSprites ()
 Forces the sprites to be updated. More...
 
void removeSprites ()
 Empties the list of active sprites. More...
 
void run ()
 Begins to call the callback function and to display video frames. More...
 
void setDrawScanlineCallback (DrawScanlineCallback drawScanlineCallback, void *arg=nullptr)
 Sets the callback used when VGADirectController needs to prepare a new scanline to be sent to the VGA output. More...
 
void setMouseCursor (Cursor *cursor)
 Sets mouse cursor and make it visible. More...
 
void setMouseCursor (CursorName cursorName)
 Sets mouse cursor from a set of predefined cursors. More...
 
void setMouseCursorPos (int X, int Y)
 Sets mouse cursor position. More...
 
void setResolution (char const *modeline, int viewPortWidth=-1, int viewPortHeight=-1, bool doubleBuffered=false)
 Sets current resolution using linux-like modeline. More...
 
void setScanlineBuffer (int scanline, uint8_t volatile *lineBuffer)
 Sets a scanline buffer. More...
 
void setScanlinesPerCallBack (int value)
 Sets number of scanlines to draw in a single callback. More...
 
template<typename T >
void setSprites (T *sprites, int count)
 Sets the list of active sprites. More...
 
void shrinkScreen (int shrinkX, int shrinkY)
 Reduces or expands screen size by the specified horizontal and vertical offset. More...
 

Static Public Member Functions

static VGADirectControllerinstance ()
 Returns the singleton instance of VGADirectController class. More...
 
static bool VSync ()
 Determines if retracing is in progress. More...
 

Static Public Attributes

static int queueSize = 1024
 Size of display controller primitives queue. More...
 

Detailed Description

Represents a base abstract class for direct draw VGA controller.

A direct draw VGA controller draws paint the screen in real time, for each scanline. Every two scanlines an interrupt is generated. Put your drawing code inside a callback and call setDrawScanlineCallback() to assign it.

See DirectVGA.ino example.

Examples
VGA/DirectVGA/DirectVGA.ino, and VGA/DirectVGA_ElMuro/DirectVGA_ElMuro.ino.

Definition at line 77 of file vgadirectcontroller.h.


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