RCGL C Graphics Library

December 20th, 2018

Classic palette shift plasma effect rendered using RCGL.

RCGL is a simple graphics library wrapper for SDL2 providing a simple linear frame-buffer interface with palettized 256-color. Designed to allow quick prototyping with simple pixel graphics routines much like back in the DOS VGA days.

With one initialization call you now have an window and frame buffer where you can immediatly set a palette and start plotting pixels. Pixels are flushed to the screen using the rcgl_update method.

Source Code: GitHub

Features

  • SDL2 based for cross platform support.
  • 8-bit indexed linear frame-buffer for ease of coding.
  • Scaling of arbitrary sized buffer to arbitrary window sizes.
  • Minimal set-up - start prototyping immediatly. See demo.c to see how fast you can be plotting pixels.
  • Built-in preset palettes. Mode 13h VGA (EGA/CGA) and Greyscale

Planned Features

  • Simple graphics primative functions. Lines, Rectangles, Circles, Arcs.
  • Text rendering to buffer.
  • Built in fonts for text rendering. 8x8 CGA, Apple ][, 9x16 VGA, and more.
  • More built-in palettes
  • Simple mouse and keyboard routines, polling based. Get clicked pixel as buffer coords.
  • Togglable vsync. (Currently always on)
  • Non-square pixel scaling. For emulating old compure aspect ratios. (eg. 320x200 as 4:3)

↑ Back To Top