My Codebase for C programming. Based a little on https://www.youtube.com/c/Mr4thProgramming but a lot more is added here
Mainly made to use as few libraries as possible and for my own exploration and use.
- A Base Layer:
- Basic Memory Allocators
- String Utilities
- Thread Context
- Math
- Logging
- Generic Data structure defining macros
- An OS Layer: (Only win32 and x11 linux implemented):
- Basic File handling
- Dynamic Library Loading
- Windowing
- Input
- Timing
- Threading
- A Core Graphics Layer:
- Multiple Backends (OpenGL 3.3, OpenGL 4.6 and D3D11)
- OS Specific Device/Context Creation
- OpenGL Function Loading
- Thin wrapper over backend specific calls (Buffers, Pipelines and Shaders are generic to all backends)
- Several Optional Layers
- Simple 2D Renderer
- User Interface (Somewhat complete)
- Simple 2D Physics (Only collision detection and resolution done. No dynamics yet)
I would recommend you to make your own :)
However if you still want to:
It has a simple build script file.
Just cd into the directory and run build.bat
or build.sh
!
You need clang OR MSVC installed as I have not tested this with gcc. AFAIK it should just work with gcc anyways.
Not tested EXTENSIVELY with linux but the codebase does work
-
Linux
- Windowing with X11
- Input Handling
- OpenGL 3.3 backend layer
- OpenGL 4.6 backend layer
-
Optional Layers
- More UI Widgets
-
D3D11
- Framebuffer support
-
Cleanup
- Switch from X-Lists to Metaprogram tables for OpenGL function loading
- Remove Backend specific links (d3d11) by loading functions from dll
-
Major Goals
- Custom Build system (so I can combine .bat and .sh build files)
-
Maybes
- Implement functions that are insanely tedious (OS_ThreadWaitForAll/Any and others)