Skip to content

Instantly share code, notes, and snippets.

View sasmaster's full-sized avatar

Michael IV sasmaster

View GitHub Profile
@sasmaster
sasmaster / Triangle_opengl_3_1.cpp
Created June 13, 2011 21:11 — forked from dlivingstone/Triangle_opengl_3_1.cpp
OpenGL 3.0+ Rendering Example - A complete and fairly minimal example of rendering with shaders
// Triangle_opengl_3_1
// A cross platform version of
// http://www.opengl.org/wiki/Tutorial:_OpenGL_3.1_The_First_Triangle_%28C%2B%2B/Win%29
// with some code from http://www.lighthouse3d.com/opengl/glsl/index.php?oglexample1
// and from the book OpenGL Shading Language 3rd Edition, p215-216
// Daniel Livingstone, October 2010
#include <GL/glew.h>
#define FREEGLUT_STATIC
#include <GL/freeglut.h>