Skip to content

Instantly share code, notes, and snippets.

@ddnn55
Created March 28, 2012 02:23
Show Gist options
  • Save ddnn55/2222963 to your computer and use it in GitHub Desktop.
Save ddnn55/2222963 to your computer and use it in GitHub Desktop.
Example generated C++
// 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