Skip to content

Instantly share code, notes, and snippets.

@yorung
Last active August 29, 2015 14:24
Show Gist options
  • Save yorung/f2be94bef04b3557b7dd to your computer and use it in GitHub Desktop.
Save yorung/f2be94bef04b3557b7dd to your computer and use it in GitHub Desktop.
How to use glBindAttribLocation
static const int POSITION_INDEX = 0;
static const int NORMAL_INDEX = 1;
glBindAttribLocation(program, POSITION_INDEX, "position");
glBindAttribLocation(program, NORMAL_INDEX, "normal");
glLinkProgram(program);
#version 100
attribute vec3 position;
attribute vec3 normal;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment