Advertisement
Guest User

Untitled

a guest
May 24th, 2016
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.40 KB | None | 0 0
  1.  
  2.    
  3.     public void map(GL4 gl, float[] data)
  4.     {
  5.         gl.glMapBuffer(GL4.GL_UNIFORM_BUFFER, GL4.GL_WRITE_ONLY).asFloatBuffer().put(data);
  6.         gl.glUnmapBuffer(GL4.GL_UNIFORM_BUFFER);
  7.     }
  8.    
  9.     public void bind(GL4 gl, int bind_location, int block_index, int program)
  10.     {
  11.         gl.glBindBufferBase(GL4.GL_UNIFORM_BUFFER, block_index, m_handle[0]);
  12.         gl.glUniformBlockBinding(program, bind_location, block_index);
  13.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement