Skip to content
프로젝트

wojciech-graj/TermGL has 409 GitHub stars and 13 forks. GitHot measured 0 stars in 24 hours and +1 in 7 days. Last checked 2026-11-16 21:13 UTC. Last push 2025-12-28.

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
+1
in 15 days
업데이트 지연
in 1 month
업데이트 지연

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

소개

2D & 3D graphics engine in the terminal [C/C++]

창작 및 미디어

README.md

Original

TermGL

A terminal-based graphics library for 2D and 3D graphics.

Features:

  • Windows & *NIX support
  • C99 compliant without external dependencies
  • Custom vertex and pixel shaders
  • Affine texture mapping
  • 24 bit RGB mode
  • Indexed color mode: 16 Background colors, 16 foreground colors, bold and underline
  • Non-blocking input from terminal
  • Mouse tracking

Gallery

LOGO

CUBE

CANYON

Documentation

A tutorial can be found here. Additionally, please reference the demo, and read the function documentation in termgl.h for more details.

Build

You can compile termgl.c as you would any other C source file. You can also compile it as a shared library libtermgl.so by calling make shared. To install the shared library, sudo make install.

To enable 3D functionality, define TERMGL3D or use the -DTERMGL3D compiler flag. To enable utility functions, define TERMGLUTIL or use the -DTERMGLUTIL compiler flag. To disable helper functions for vector math and shaders, define TERMGL_MINIMAL or use the -DTERMGL_MINIMAL compiler flag.

To use TermGL in C++, compile it as a shared library and link against the libtermgl.so file. The termgl.h header can be included from C++ files.

To compile a demo program, run make demo, creating the termgl_demo binary.

Demo

A demo program can be found at 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 rendering
    • Custom shaders
  2. Color Palette
    Renders a palette of various text colors and styles.
    • Colors & Modifiers
  3. Mandelbrot
    Renders an infinitely zooming-in Mandelbrot set.
    • Point rendering
  4. Realtime Keyboard
    Displays keyboard input in realtime.
    • Text rendering
    • Realtime keyboard input
  5. Textured Cube
    Renders a texture-mapped cube.
    • Backface culling
    • Z buffering
    • Double-width characters
    • 3D rendering
    • Shaders
    • Texture mapping
  6. RGB
    Renders overlapping red, green, and blue circles.
    • 24 bit RGB
    • Text rendering
  7. Mouse
    Displays mouse position and button state.
    • Mouse tracking
    • Text rendering