This is a cross-platform C++ library that handles windows and the initialization of Graphics APIs, such as OpenGL while abstracting away the platform specific code and simplifying a lot of the boilerplate code that comes with it.
It's worth mentioning that it is currently under development; consequently, eveything is subject to change and may not work as intendent, furthermore, the only supported platform currently is Windows.
Originally, I wrote this library for my game engine, TeaPot, hence the name TeaCup. I decided to split it off into its own repository to facilitate its use in future projects of mine.
This is pretty much just here so that I can get my hand on various concepts and algorithms and implement them by myself to get a good look and understanding of how they work; I thought: before I throw in a bunch of libraris on my projects, I may as well, for the sake of learning a thing or two, reinvent the wheel in the process.
Feel free to grab code snippets or the whole library if you find it useful, but keep in mind that it is still under development and may not be suitable for production use.
- Windows
- Linux
- MacOS
A quick overview of partially implemented and planed features:
- Imgui integration
- OpenGL support
- GLFW support
- Input handling
- Vulkan support
- DirectX support
- ... and more to come!
There are currently no examples, apart from my game engine TeaPot, that utilizes this library.
This library uses CMake as its build system.
To build and Install the library, you can run the following commands:
# Explicitly specify a build directory.
cmake -B build
# Optionally, you can specify the install directory. By default this will be set to "/usr/local" on UNIX, and "<SystemDrive>/Program Files/<ProjectName>" on Windows
cmake -B build -D CMAKE_INSTALL_PREFIX=PATH_TO_INSTALL_DIR
# Build the library in Release mode. You will find the built library in the `install` directory.
cmake --build build --target INSTALL --config Releaseafterwards, you can link the library to your project by adding the following to your CMakeLists.txt:
find_package(TeaCup REQUIRED)
target_link_libraries(<your-target> PUBLIC TeaCup::TeaCup)make sure to set the TeaCup_DIR to the install directory if you have specified a custom install directory. You may do this trough the folwing ways:
# Set the TeaCup_DIR environment variable to the install directory
cmake -D TeaCup_DIR=PATH_TO_INSTALL_DIRor
set(TeaCup_DIR PATH_TO_INSTALL_DIR)or
list(APPEND CMAKE_PREFIX_PATH path/to/TeaCup/install)This project is licensed under the MIT License - see the LICENSE file for details.