Software Graphics Library
Created with 🤕 in C!
Lots of things inspired from SDL :D
Copy and paste sgl.h
into your project and do this:
#define SGL_IMPLEMENTATION
in one C/C++ file before you include the cidr.hpp
file.
- A c99 compatible compiler
- SDL2
- CMake
Clone the repo and execute these commands from the sgl/
directory
mkdir build
cd build
cmake ..
make
./sgl
Implement basic drawing functions
- Point
- Rectangles
- Line
- Circles
- Arcs
- Triangles
- Stroke
- Fill
- Color interpolation
- Textured triangles ⌨️
- Images (using stb_image.h)
- Nearest neighbor sampling
- Save to disk
- Linear sampling
- Wrapping options
- Text
- Simple text rendering
- Kerning
- Alignment
- Size
- Shadow
- Shaders
- Alpha blending
- Gamma correction
- HSV
- HSL
- (ordered) Dithering (as a shader? depends on pixel format?)
- implement
sglGetError()
https://wiki.libsdl.org/SDL\_GetError - live demo code update
- generalize
sglBuffer
's andsglBitmap
'sgetPixel()
function to one - make the library header only
- add more pixel formats
- allow drawing extended characters
- text shadows
- optimize
- circle drawing
- arc drawing
- triangles