Cgrafix is a lightweight C graphics library that works only on Windows. It uses the native Windows API to render shapes, text, and visuals directly on the screen. No extra dependencies needed.
- Simple and minimal graphics setup in C
- Uses Win32 GDI for drawing
- Fast and native — no external libraries
Windows only
#include "../src/grafix.h"
int main(){
grafixInit();
grafixWindow window;
createGrafixWindow(&window,800,800,"GrafixWindow");
showGrafixWindow(window);
int eventSize;
grafixEvent* event;
while(!isGrafixWindowEnded(window)){
fillGrafixWindow(window,(grafixColor){0,0,0});
manageGrafixEvent(window,&event,&eventSize);
for(int i = 0; i < eventSize; i++){
if(event[i].type == WM_DESTROY){
endGrafixWindow(window);
return 0;
}
}
updateGrafixWindow(window);
updateGrafixTime(window);
tickGrafix(window,20);
}
return 0;
}MIT License