List of usage examples for com.badlogic.gdx.graphics GL20 GL_ARRAY_BUFFER
int GL_ARRAY_BUFFER
To view the source code for com.badlogic.gdx.graphics GL20 GL_ARRAY_BUFFER.
Click Source Link
From source file:com.watabou.glwrap.Vertexbuffer.java
License:Open Source License
public void updateGLData() { if (updateStart == -1) return;//from w w w . j a v a 2 s. c o m vertices.position(updateStart); bind(); if (updateStart == 0 && updateEnd == vertices.limit()) { Gdx.gl.glBufferData(GL20.GL_ARRAY_BUFFER, vertices.limit() * 4, vertices, GL20.GL_DYNAMIC_DRAW); } else { Gdx.gl.glBufferSubData(GL20.GL_ARRAY_BUFFER, updateStart * 4, (updateEnd - updateStart) * 4, vertices); } release(); updateStart = updateEnd = -1; }
From source file:com.watabou.glwrap.Vertexbuffer.java
License:Open Source License
public void bind() { Gdx.gl.glBindBuffer(GL20.GL_ARRAY_BUFFER, id); }
From source file:com.watabou.glwrap.Vertexbuffer.java
License:Open Source License
public void release() { Gdx.gl.glBindBuffer(GL20.GL_ARRAY_BUFFER, 0); }