Created
March 28, 2012 02:54
-
-
Save ddnn55/2223148 to your computer and use it in GitHub Desktop.
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 JavaScript | |
var buffer; | |
function init(gl) | |
{ | |
var myData = new DavidsFloatData([1., 2., 3., 4.]); | |
buffer = gl.createBuffer(); // corresponding C function is glGenBuffers(GLsizei n, GLuint *buffers) | |
gl.bindBuffer(GL_ARRAY_BUFFER, buffer); | |
gl.bufferData(GL_ARRAY_BUFFER, DavidsSizeOf(myData), GL_STATIC_DRAW); | |
} | |
function draw(gl) | |
{ | |
gl.bindBuffer(GL_ARRAY_BUFFER, buffer); | |
} | |
function mouseMoved(e) | |
{ | |
// do something | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment