Skip to content

Instantly share code, notes, and snippets.

View apples's full-sized avatar
🏳️‍🌈

Apples apples

🏳️‍🌈
View GitHub Profile
@apples
apples / vao.cpp
Last active August 29, 2015 14:05
// ULTIMATE VERTEX ARRAY OBJECT EXAMPLE
// No guarantee of correctness.
// Warranty void upon successful compile.
// No warranty.
// This software is released into the public domain.
#include <GL/glew.h> // or whatever loader you want.
#include <glm/glm.hpp> // or whatever math library you want.
#include <cstddef>
#include <tuple>
#include <utility>
// Smart pointers
struct SampleStruct
{
int x = 0;
SampleStruct(int a, int b, int c)