All Projects → wojciech-graj → TermGL

wojciech-graj / TermGL

Licence: MIT license
2D & 3D graphics engine in the terminal [C/C++]

Programming Languages

c
50402 projects - #5 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to TermGL

Nabla
OpenGL/OpenGL ES/Vulkan/CUDA/OptiX Modular Rendering Framework for PC/Linux/Android
Stars: ✭ 235 (+7.31%)
Mutual labels:  graphics-engine, computer-graphics, graphics-library
nautilus
another graphics engine
Stars: ✭ 16 (-92.69%)
Mutual labels:  graphics-engine, graphics-library, 3d-graphics
OpenGL-3D-Game-Tutorial-Series
C++ OpenGL 3D Game Tutorial Series - Learn to code a Cross-Platform OpenGL 3D Game in C++ from scratch
Stars: ✭ 132 (-39.73%)
Mutual labels:  graphics-engine, 3d-graphics
Flycube
Graphics API wrapper is written in C++ on top of Directx 12 and Vulkan. Provides main features including ray tracing.
Stars: ✭ 78 (-64.38%)
Mutual labels:  graphics-engine, 3d-graphics
Graphicalgorithm
🐙 🐙图形学论文实现
Stars: ✭ 108 (-50.68%)
Mutual labels:  graphics-engine, graphics-library
Cpp 3d Game Tutorial Series
C++ 3D Game Tutorial Series is a YouTube tutorial series, whose purpose is to help all those who want to take their first steps in the game development from scratch.
Stars: ✭ 400 (+82.65%)
Mutual labels:  graphics-engine, 3d-graphics
Lume
Create CSS3D/WebGL applications declaratively with HTML. Give regular DOM elements shadow and lighting.
Stars: ✭ 445 (+103.2%)
Mutual labels:  graphics-engine, 3d-graphics
raytracing-go
A simple Go library for 3D ray-tracing rendering, implementing the book Ray Tracing in One Weekend. 📸
Stars: ✭ 53 (-75.8%)
Mutual labels:  computer-graphics, 3d-graphics
3D-Engine-OpenGL-4
3D Graphics Engine For Games | C++ OpenGL 4.1
Stars: ✭ 19 (-91.32%)
Mutual labels:  graphics-engine, 3d-graphics
Arcane Engine
3D C/C++ Game Engine - Created By Brady Jessup
Stars: ✭ 242 (+10.5%)
Mutual labels:  graphics-engine, 3d-graphics
Mos
Lightweight game engine.
Stars: ✭ 153 (-30.14%)
Mutual labels:  graphics-engine, 3d-graphics
CenoGL
a 3D graphics engine without graphics libs
Stars: ✭ 14 (-93.61%)
Mutual labels:  graphics-engine, graphics-library
Rendu
A simple realtime graphics playground for experimentations.
Stars: ✭ 343 (+56.62%)
Mutual labels:  graphics-engine, computer-graphics
Overload
3D Game engine with editor
Stars: ✭ 335 (+52.97%)
Mutual labels:  graphics-engine, 3d-graphics
Fabgl
Display Controller (VGA, SSD1306, ST7789, ILI9341), PS/2 Mouse and Keyboard Controller, Graphics Library, Sound Engine, Game Engine and ANSI/VT Terminal for the ESP32
Stars: ✭ 534 (+143.84%)
Mutual labels:  graphics-engine, graphics-library
Learningdirectx12
This repository is intended to be used as a code repository for learning DirectX 12.
Stars: ✭ 256 (+16.89%)
Mutual labels:  graphics-engine, graphics-library
Computational Graphics Thu 2018
Computational Graphics - THU Spring 2018
Stars: ✭ 104 (-52.51%)
Mutual labels:  graphics-engine, computer-graphics
Sistem-programlama
Sistem Programlama Türkçe Kaynak (KTÜ)
Stars: ✭ 30 (-86.3%)
Mutual labels:  unix, linux-shell
ElkEngine
Simple graphics engine used as submodule in many of my projects
Stars: ✭ 54 (-75.34%)
Mutual labels:  graphics-engine, graphics-library
Diligentengine
A modern cross-platform low-level graphics library and rendering framework
Stars: ✭ 2,142 (+878.08%)
Mutual labels:  graphics-engine, graphics-library

TermGL

Language grade: C/C++

A terminal-based graphics library for both 2D and 3D graphics.
Works in all terminals supporting ANSI escape codes.
Support for Windows and UNIX.
C99 compliant, with no external dependencies.
Realtime input reading from terminal for user-interaction.
16 Background colors, 16 foreground colors, bold and underline.

Table of Contents

Gallery
Build
Documentation

Gallery

LOGO

CANYON

TEAPOT

Build

C

To enable 3D functionality, use the -DTERMGL3D compiler flag
To enable utility functions, use the -DTERMGLUTIL compiler flag
When running makefile, additional cflags can be specified be passing a command line argument CFLAGS=-DTERMGL3D\ -DTERMGLUTIL

Method 1: Regular source file

  1. Add the following flags to your compiler -I/path/to/TermGL/lib -lm
  2. Add termgl.c as a source file to be compiled

Method 2: Shared library

  1. Run the makefile make shared to create lib/libtermgl.so
  2. Copy to library directory sudo cp lib/libtermgl.so /usr/local/lib/libtermgl.so
  3. Add the following flags to your compiler -I/path/to/TermGL/lib -ltermgl -lm

Method 3: Static library

  1. Run the makefile make shared to create lib/libtermgl.so
  2. Add the following flags to your compiler -I/path/to/TermGL/lib -L/path/to/TermGL/lib -ltermgl -lm

C++

The above Methods 2 and 3 for C can be used to use TermGL in C++

Windows

Compilation for Windows can be done by chaning the compiler using the following command line argument when running the makefile COMPILER=. If compiling using mingw on linux, use COMPILER=i686-w64-mingw32-gcc-win32.

Demo

To compile a demo program, run the makefile make demo.

Documentation

Certain settings can be changed at the top of src/termgl.c prior to compilation, e.g. memory allocation functions, clear screen command, compiler-specific commands.
The header file lib/termgl.h contains brief documentation for all functions and structs.
Compiler-specific functionality is used, therefore it is recommened to always compile using GCC. If other compilers are used for other sections of code, see Build: Methods 2 & 3.
The TermGLUtil extension contains functions for reading keyboard input, but requires either Windows of UNIX headers.

Demo

A demo can be found here: demodir/termgl_demo.c.
Available demos and TermGL features used:

  1. Utah Teapot
    Renders a rotating 3D Utah Teapot.
    • Backface culling
    • Z buffering
    • Double-width characters
    • 3D camera
    • 3D transformations
    • 3D rendering
    • 3D Shaders
  2. Star Polygon
    Renders a star polygon in steps using random colors.
    • Colors
    • Line rendering
  3. Color Palette
    Renders a palette of various text colors and styles.
    • Colors & Modifiers
  4. Mandelbrot
    Renders an infinitely zooming-in Mandelbrot set.
    • Point rendering
  5. Realtime Keyboard
    Displays keyboard input in realtime.
    • Text rendering
    • Realtime keyboard input
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].