Created
March 28, 2012 02:23
-
-
Save ddnn55/2222963 to your computer and use it in GitHub Desktop.
Example generated C++
This file contains 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
// example generated C++ | |
class GraphicsApp | |
{ | |
int bufferID; | |
void init() | |
{ | |
float buffer[] = {1., 2., 3., 4.}; | |
glGenBuffers(1, &bufferID); | |
glBindBuffer(GL_ARRAY_BUFFER, bufferID); | |
glBufferData(GL_ARRAY_BUFFER, sizeof(float) * 4, buffer, GL_STATIC_DRAW); | |
} | |
void draw() | |
{ | |
glBindBuffer(GL_ARRAY_BUFFER, bufferID); | |
} | |
void mouseMoved(MouseEvent e) | |
{ | |
// do something | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment