Last active
August 29, 2015 14:24
-
-
Save yorung/f2be94bef04b3557b7dd to your computer and use it in GitHub Desktop.
How to use glBindAttribLocation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static const int POSITION_INDEX = 0; | |
| static const int NORMAL_INDEX = 1; | |
| glBindAttribLocation(program, POSITION_INDEX, "position"); | |
| glBindAttribLocation(program, NORMAL_INDEX, "normal"); | |
| glLinkProgram(program); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #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