{"id":20047242,"url":"https://github.com/wojciech-graj/termgl","last_synced_at":"2025-05-16T19:02:21.313Z","repository":{"id":41374202,"uuid":"380217693","full_name":"wojciech-graj/TermGL","owner":"wojciech-graj","description":"2D \u0026 3D graphics engine in the terminal [C/C++]","archived":false,"fork":false,"pushed_at":"2024-11-16T18:17:53.000Z","size":14436,"stargazers_count":328,"open_issues_count":1,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-12T17:46:57.734Z","etag":null,"topics":["3d","3d-graphics","c","c-plus-plus","cli","computer-graphics","cpp","cpp-library","graphics","graphics-engine","graphics-library","linux","linux-shell","terminal","terminal-based","terminal-graphics","unix","unix-shell","windows"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wojciech-graj.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-25T11:32:47.000Z","updated_at":"2025-04-08T04:31:23.000Z","dependencies_parsed_at":"2024-01-13T22:16:11.686Z","dependency_job_id":"7958e0cc-d00a-4898-9114-366a50797093","html_url":"https://github.com/wojciech-graj/TermGL","commit_stats":{"total_commits":83,"total_committers":1,"mean_commits":83.0,"dds":0.0,"last_synced_commit":"70954e6c9cde16cce00103791e190f6d381c16b7"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wojciech-graj%2FTermGL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wojciech-graj%2FTermGL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wojciech-graj%2FTermGL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wojciech-graj%2FTermGL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wojciech-graj","download_url":"https://codeload.github.com/wojciech-graj/TermGL/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254592367,"owners_count":22097010,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d","3d-graphics","c","c-plus-plus","cli","computer-graphics","cpp","cpp-library","graphics","graphics-engine","graphics-library","linux","linux-shell","terminal","terminal-based","terminal-graphics","unix","unix-shell","windows"],"created_at":"2024-11-13T11:34:43.554Z","updated_at":"2025-05-16T19:02:21.253Z","avatar_url":"https://github.com/wojciech-graj.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TermGL\n\nA terminal-based graphics library for 2D and 3D graphics.\n\nFeatures:\n- Windows \u0026 *NIX support\n- C99 compliant without external dependencies\n- Custom vertex and pixel shaders\n- Affine texture mapping\n- 24 bit RGB\n- Indexed color mode: 16 Background colors, 16 foreground colors, bold and underline\n- Non-blocking input from terminal\n- Mouse tracking\n\n### Gallery\n\n![LOGO](https://w-graj.net/images/termgl/logo.gif)\n\n![CUBE](https://w-graj.net/images/termgl/textures.gif)\n\n![CANYON](https://w-graj.net/images/termgl/canyon.gif)\n\n### Build\n\nYou 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`.\n\nTo enable 3D functionality, define `TERMGL3D` or use the `-DTERMGL3D` compiler flag.\nTo enable utility functions, define `TERMGLUTIL` or use the `-DTERMGLUTIL` compiler flag.\nTo disable helper functions for vector math and shaders, define `TERMGL_MINIMAL` or use the `-DTERMGL_MINIMAL` compiler flag.\n\nTo 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.\n\nTo compile a demo program, run  `make demo`, creating the `termgl_demo` binary.\n\n### Documentation\n\nThe header file `termgl.h` contains brief documentation for all functions and structs. The TermGLUtil extension contains functions for reading keyboard input, but requires either Windows or *NIX headers.\n\n### Demo\n\nA demo program can be found at `demo/termgl_demo.c`.\n\nAvailable demos and TermGL features used:\n1. Utah Teapot\\\nRenders a rotating 3D Utah Teapot.\n\t- Backface culling\n\t- Z buffering\n\t- Double-width characters\n\t- 3D rendering\n\t- Custom shaders\n2. Color Palette\\\nRenders a palette of various text colors and styles.\n\t- Colors \u0026 Modifiers\n3. Mandelbrot\\\nRenders an infinitely zooming-in Mandelbrot set.\n\t- Point rendering\n4. Realtime Keyboard\\\nDisplays keyboard input in realtime.\n\t- Text rendering\n\t- Realtime keyboard input\n5. Textured Cube\\\nRenders a texture-mapped cube.\n\t- Backface culling\n\t- Z buffering\n\t- Double-width characters\n\t- 3D rendering\n\t- Shaders\n\t- Texture mapping\n6. RGB\\\nRenders overlapping red, green, and blue circles.\n\t- 24 bit RGB\n\t- Text rendering\n7. Mouse\\\nDisplays mouse position and button state.\n\t- Mouse tracking\n\t- Text rendering\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwojciech-graj%2Ftermgl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwojciech-graj%2Ftermgl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwojciech-graj%2Ftermgl/lists"}