You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+31-7Lines changed: 31 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,8 +5,8 @@
5
5
A terminal-based graphics library for both 2D and 3D graphics.\
6
6
Works in all terminals supporting ANSI escape codes.\
7
7
Support for Windows and UNIX.\
8
-
C11 compliant, with no external dependencies.\
9
-
Can read from terminal for user-interaction.
8
+
C99 compliant, with no external dependencies.\
9
+
Realtime input reading from terminal for user-interaction.
10
10
11
11
## Table of Contents
12
12
@@ -16,11 +16,11 @@ Can read from terminal for user-interaction.
16
16
17
17
## Gallery
18
18
19
-

19
+

20
20
21
-

21
+

22
22
23
-

23
+

24
24
25
25
## Build
26
26
@@ -57,12 +57,36 @@ If compiling using mingw on linux, use ```COMPILER=i686-w64-mingw32-gcc-win32```
57
57
58
58
### Demo
59
59
60
-
To compile a demo program, run the makefile ```make demo```. Use the ```a``` and ```d``` keys to rotate view in the demo.
60
+
To compile a demo program, run the makefile ```make demo```.
61
61
62
62
## Documentation
63
63
64
64
Certain settings can be changed at the top of [lib/termgl.h](lib/termgl.h) prior to compilation, e.g. memory allocation functions, clear screen command, compiler-specific commands.\
65
-
A sample program exists here: [test/termgl_test.c](test/termgl_test.c), and utilizes all major features of the TermGL library.\
66
65
The header file [lib/termgl.h](lib/termgl.h) contains brief documentation for all functions and structs.\
67
66
Compiler-specific (GCC) macros are used for loop unrolling in the ```itgl_mulmat``` and ```itgl_clip_triangle_plane``` functions.\
68
67
The TermGLUtil extension contains functions for reading keyboard input, but requires either Windows of UNIX headers.
68
+
69
+
### Demo
70
+
71
+
A demo can be found here: [demodir/termgl_demo.c](demodir/termgl_demo.c).\
72
+
Available demos and TermGL features used:
73
+
1. Utah Teapot\
74
+
Renders a rotating 3D Utah Teapot.
75
+
- Backface culling
76
+
- Z buffering
77
+
- Double-width characters
78
+
- 3D camera
79
+
- 3D transformations
80
+
- 3D rendering
81
+
- 3D Shaders
82
+
2. Star Polygon\
83
+
Renders a star polygon in steps using random colors.
0 commit comments