Universal Graphics & Input
Go to file
2024-09-12 04:21:01 +02:00
assets Add preview 2024-04-21 14:23:00 +02:00
test Standardize or something :') 2024-09-10 22:58:46 +02:00
LICENSE Initial commit 2024-04-21 13:35:56 +02:00
main.h Add unigi_input_mouse_capture 2024-09-12 03:14:24 +02:00
main.i More standardization 2024-09-11 01:51:54 +02:00
make.sh Add example make script 2024-09-11 01:57:02 +02:00
README.md Update to include SDL2 platform 2024-09-12 04:21:01 +02:00
structs.h Fix stuff 2024-09-12 00:19:07 +02:00
types.h Add unigi_input_mouse_capture 2024-09-12 03:14:24 +02:00

unigi

unigi (Universal Graphics & Input) is a collection of headers, that implement a cross-platform API for drawing to the screen (framebuffer or window), and taking inputs (keyboard, mouse, joypad). This approach should work well for general computers, like PCs and many 6th generation consoles.

This repository contains documentation, links and example applications.

Compatibility

  • Highly compatible with compilers (C89, simple preprocessors)
  • No make required, entirely configurable from your compiler, or header files
  • Supports wide range of hardware (16-bit+, little/big endian)
  • Standardized 16-bit color format (AAAARRRRGGGGBBBB, effectively 12-bit on most platforms)
  • Screen coordinates are standardized
  • Decent performance (Though some performance is sacrificed for standardization)

Layers

A unigi app is built from different layers:

  • Headers (this repository) - The functions to be implemented by the Platform
  • Platform - Implements the functions from Headers to work on a particular system
  • ... - Optionally, more layers (Like unigi.ext)
  • App - Your code, uses other layers for input/output. You can find examples in test/*

Platforms

Platforms act as the translation layer for different systems. The idea is to minimize the amount of work it takes to port graphical applications.

Official platforms

  • SDL1 - The highly compatible SDL 1.2, works on old Linux, Windows 95+ and some consoles
  • SDL2 - SDL 2.x, works on somewhat recent Linux, Windows XP+ and some consoles
  • DOS (soon) - DOS (Disk Operating System), compatible with FreeDOS and MS-DOS
  • PSP (soon) - PlayStation Portable gaming console
  • Null (soon) - A placeholder that does "nothing", good if you want to test basic compilation for an unsupported platform