GFX is a simple C++ graphics library that uses GLFW to create a basic multiplatform window, then provide easy to use rendering tools using the GFX:: directive.
Automatic shader hot reloading showcase
- Easy to use VAO, VBO, and EBO classes
- .OBJ file importer made from scratch built for efficiency
- Texture System (needs to be redone)
- Automatic hot reloadable shader compilation
- Compatibility with ALL custom opengl drawing code (theoretically you could use GFX to load OpenGL then use OpenGL code to do the rest)
- Full ImGui implementation
#include <GFX.h>
int main() {
GFX::Renderer renderer = GFX::Renderer();
GFX::Shader shader = GFX::Shader("defaultShader");
GFX::Camera camera = GFX::Camera();
// the definition of a vertex is subject to change.
std::vector<GFX::Vertex> vertices = {
{{0.5, -0.5, 0.0}},
{{-0.5, -0.5, 0.0}},
{{0.0, 0.5, 0.0}}
};
GFX::VertexStack stack = GFX::VertexStack(vertices);
auto draw = [&](float deltaTime) {
shader.updateUniform("camera", camera.createCameraMatrix(&renderer));
stack.draw(&shader);
};
renderer.loop(draw);
return 0;
}