deltaluca

Untitled

Apr 10th, 2013
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Haxe 0.41 KB | None | 0 0
  1. var buf:Buffer = GL.allocBuffer(GL.FLOAT, 10);
  2. buf[0] = 0; // set first float to 0
  3. buf[1] = 2; // set second float to 2
  4.  
  5. var fbuf:FloatBuffer = buf;
  6. fbuf[0] = 0; // set first float to 0, but faster
  7. fbuf[1] = 2; // set second float to 2, but faster
  8.  
  9. The Buffer array access functions have to check the GL type of the buffer to see what functions to use
  10. Casting to FloatBuffer (checked cast) permits faster access :)
Advertisement
Add Comment
Please, Sign In to add comment