Insight is lightweight, data oriented game engine and framework written in C99. The engine is designed to be fast and could be used in any project and, also, it could be easily implemented with C++. The only dependecies it needs are an GLFW and OpenGL library and stb_image
and stb_image_write header
files.
The engine is designed with speed in mind, and does all the work for you have to use data oriented aproach.
- Lightweight
- Use only what you need
- Written in C99
- Small codebase (~1kLOC)
- Simple and portable
- Documentation (In development)
This library is written in a single header file, there is no need of buildage.
You would need to implement the headers files like this:
#define INSIGHT_WINDOW_IMPL /* Implements all the window functions */
#include "Window.h"
Insight Init:
#define INSIGHT_INSIGHT_IMPL
#define INSIGHT_WINDOW_IMPL
#include "Insight.h"
#include "Window.h"
int main(void) {
if (!INSIGHT_EASY_INIT()) {
return -1;
}
Insight_Window* wnd = insight_window(1280, 720, "Hello, World!!!", INSIGHT_FALSE);
assert(wnd);
while (insight_window_running(wnd)) {
glClear(GL_COLOR_BUFFER_BIT);
glClearColor(1.0F, 0.0F, 0.0F, 1.0F);
}
insight_window_finalize(wnd);
INSIGHT_EASY_TERMINATE();
return 0;
}
- GLFW https://www.glfw.org/
- OpenGL https://glad.dav1d.de/ or http://glew.sourceforge.net/
- stb_image https://github.com/nothings/stb/blob/master/stb_image.h
- stb_image_write https://github.com/nothings/stb/blob/master/stb_image_write.h
- cglm https://github.com/recp/cglm
If you are using GLAD
gcc main.c glad.c -I[path to the includes] -L[path to the linkers] -glfw -opengl32
If you are using GLEW
gcc main.c -I[path to the includes] -L[path to the linkers] -glfw -opengl32 -glew32