TML
TML copied to clipboard
🎮 Simple 2D graphics library for C++

TML is a simple library for making games and applications. It provides interfaces for window creation, graphics rendering, audio playback and keyboard/mouse/controller input.
Notable features
- 2D batch renderer, including sprite batching
- No external dependencies
- Modular design
- Written in C++17
- OpenGL 3.3 and up or OpenGL ES 3.0 and up
Modules
- Audio
- Graphics
- Network
- System
- Window
Supported platforms
Windows
Linux
FreeBSD
Currently, I have no way of supporting macOS.
Building
If you wish to build the project from source, there are some instructions in BUILDING.md
Using
Currently, there is no API documentation or tutorials on how to use this library. Once this project is a bit more matured, I will take the time to document the API and make some tutorials.
Basic example
#include <TML/Graphics.h>
using namespace tml;
int main()
{
RenderWindow window(800, 600, "Circle");
while(window.IsOpen())
{
Event event;
while(window.PollEvents(event))
{
if(event.type == Event::Closed)
window.Close();
}
window.Clear();
window.DrawCircle(window.GetSize() / 2, 200, Color::Red);
window.Display();
}
return 0;
}
Contributing
If you're interested in this project, you can help by testing, contributing code, reporting bugs or other issues, and suggesting new features or changes.
License
This project is licensed under the Zlib License.
Credits
| Author | Repo | Library | License |
|---|---|---|---|
| Sean Barret | https://github.com/nothings/stb | stb libraries | Public Domain |
| David Reid | https://github.com/mackron/miniaudio | miniaudio | Public Domain |
| glfw | https://github.com/glfw/glfw | glfw | Zlib |
| David Herberth | https://github.com/Dav1dde/glad | glad | MIT |
| Nwutobo Samuel Ugochukwu | https://github.com/sammycage/lunasvg | lunasvg | MIT |
| Jakob Riedle | https://github.com/DuffsDevice/tiny-utf8 | tiny-utf8 | BSD-3-Clause |
And a special thank you to JetBrains for providing me with a free license for CLion.
Contact
You can contact me by email.