Skip to content

A robust 2D, lightweight, C++ graphics framework.

Notifications You must be signed in to change notification settings


Folders and files

Last commit message
Last commit date

Latest commit



28 Commits

Repository files navigation


The 2D spiritual successor to SGAL.

This is a lightweight 2D graphics framework written in C++. It (will be) entirely self-contained, (for the most part). The intention is for only a OpenGL loader and stb to be dependencies.

Currently, GLFW is required for this to work, but I'll be removing this requirement eventually.

I will also eventually implement Vulkan, but for now OpenGL will do.

Current Structure

There's a Graphics folder and an Engine folder. Each compiles into dynamic library files which are found in the lib folder. The libcpp2d-engine library requires the libcpp2d-graphics library, but the graphics library can be used alone. Including cpp2d/Engine.h also, by default, includes cpp2d/Graphics.h. The raw, barebones graphics objects and functionality is in the Graphics library. The engine provides more functionality on top of that, including an entity-component system powered by ENTT. Currently ENTT is required as an include to your client project, which I don't like, but it's packaged in as a submodule and is located in include/entt. So, in your build, add include/entt/single_include to your include directories.

What doesn't work

Currently, in order to build, I need to add a make command to the src/CMakeLists.txt that runs for extern/glew/auto which retreives the OpenGL extension files. Other than that, the compile should run on MacOS perfectly.


A robust 2D, lightweight, C++ graphics framework.






No releases published


No packages published