Skip to content

OpenSource 3D Engine, written in C and using OpenGL. Still in development.

Notifications You must be signed in to change notification settings

TheMisterOdd/Insight

Repository files navigation

Insight

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.

Features:

  • Lightweight
  • Use only what you need
  • Written in C99
  • Small codebase (~1kLOC)
  • Simple and portable
  • Documentation (In development)

Building

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" 

Examples

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;
}

Output

window output

Dependencies and Suggestions:

Compilation (With GCC)

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
Examples

window output

window output

window output

window output

About

OpenSource 3D Engine, written in C and using OpenGL. Still in development.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages