Skip to content
Vlod edited this page Nov 23, 2023 · 8 revisions

GL2D C++ Library Documentation

Version: 1.5.0
Author: Luta Vlad
GitHub Repository: gl2d

Overview

GL2D is a C++ library providing functionality for 2D graphics using OpenGL. It includes features such as drawing shapes with rotation, texture transparency, text rendering with fonts and shadows, camera manipulation, shaders, Vsync control, texture atlases, frame buffer rendering, and a particle system with custom shaders.

Dependencies

Usage

Initialization

#include "gl2d.h"

int main() 
{
    gl2d::init();
    // Your code here

    gl2d::clearnup(); // Clean up before exiting if needed (the os will also do that for you)
    return 0;
}

Error Handling

GL2D provides a default error function that writes to the console. You can set a custom error function using:

Clone this wiki locally