Skip to content

Latest commit

 

History

History
23 lines (15 loc) · 709 Bytes

README.md

File metadata and controls

23 lines (15 loc) · 709 Bytes

canvas

canvas is a general purpose rendering library based on OpenGL. It uses glfw for windowing and glad as an OpenGL loader.

Example usage

A simple example is pseudo code:

Renderer renderer;

VertexDefinition def;
def.addAttribute(ComponentType::Float32, ca::ComponentCount::Three);
auto vertexBuffer = renderer.create_vertex_buffer(def, vertices, 6);

auto program = renderer.create_program(ShaderSource{vs}, ShaderSource{fs});

renderer.draw(DrawType::Triangles), 6, program, vertexBuffer);

See examples/Minimal/Minimap.cpp for more detailed example.