Core Framework
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
What’s This???
Core framework is a work in progress! It is intended to be an easy to use, cross platform 2D graphics/window/input/storage management wrapper around SDL3, using SDL_GPU to draw stuff to the screen, designed to work on any system SDL3 works. It supports a variety of image and primitive transformations, such as rotation, scaling and skewing, as well as camera controls, rendering to textures, resolution independent coordinates. It also wraps parts of SDL3’s input code, making it easy to use controllers, keyboards as controllers, mouse stuff etc. and have them be re-mappable.
This was largely created to port my old Blitzmax games over to C with minimal effort, as such the cg2d drawing routines mirror the output of Blitzmax’s Max2d rendering module, though internally cg2d uses the modern SDL_GPU rendering pipeline rather than Max2d’s OpenGL 1.4. The shader used to draw everything is expanded from the PullSpriteBatch.c SDL3 example.
Usage is pretty straight forward, initialize the framework, load some images, create some layers and draw to them, then render. The examples should make this pretty obvious.
I’m aiming for this to work unintrusively in code, staying out of the way as much as possible so code stays readable and maintainable in future by keeping the back end hidden as best possible from the front end.
At present, this is still a work in progress and hasn’t been tested extensively. I intent to keep working on this as I port more of my games over to C, adding more examples and games to the project as i go.
All the source code is currently available on my github repo
Planned features:
- custom shader support, it’s sort of doable as is, but it’s not flexible
- audio interface for SDL_Mixer
- online data receive/fetch, probably using curl or similar
- Windows build scripts - the code should compile with MinGW, but existing scripts are linux only at present.
- lightweight gui interface integration. possibly dear imgui or nuklear
- steamworks integration
- more error checking.





