Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var buf:Buffer = GL.allocBuffer(GL.FLOAT, 10);
- buf[0] = 0; // set first float to 0
- buf[1] = 2; // set second float to 2
- var fbuf:FloatBuffer = buf;
- fbuf[0] = 0; // set first float to 0, but faster
- fbuf[1] = 2; // set second float to 2, but faster
- The Buffer array access functions have to check the GL type of the buffer to see what functions to use
- Casting to FloatBuffer (checked cast) permits faster access :)
Advertisement
Add Comment
Please, Sign In to add comment