use of com.badlogic.gdx.graphics.GL20 in project libgdx by libgdx.
the class IndexBufferObject method dispose.
/** Disposes this IndexBufferObject and all its associated OpenGL resources. */
public void dispose() {
GL20 gl = Gdx.gl20;
gl.glBindBuffer(GL20.GL_ELEMENT_ARRAY_BUFFER, 0);
gl.glDeleteBuffer(bufferHandle);
bufferHandle = 0;
}
use of com.badlogic.gdx.graphics.GL20 in project libgdx by libgdx.
the class PolygonSpriteBatch method end.
@Override
public void end() {
if (!drawing)
throw new IllegalStateException("PolygonSpriteBatch.begin must be called before end.");
if (vertexIndex > 0)
flush();
lastTexture = null;
drawing = false;
GL20 gl = Gdx.gl;
gl.glDepthMask(true);
if (isBlendingEnabled())
gl.glDisable(GL20.GL_BLEND);
if (customShader != null)
customShader.end();
else
shader.end();
}
use of com.badlogic.gdx.graphics.GL20 in project libgdx by libgdx.
the class ShaderProgram method setVertexAttribute.
public void setVertexAttribute(int location, int size, int type, boolean normalize, int stride, int offset) {
GL20 gl = Gdx.gl20;
checkManaged();
gl.glVertexAttribPointer(location, size, type, normalize, stride, offset);
}
use of com.badlogic.gdx.graphics.GL20 in project libgdx by libgdx.
the class ShaderProgram method setAttributef.
/** Sets the given attribute
*
* @param name the name of the attribute
* @param value1 the first value
* @param value2 the second value
* @param value3 the third value
* @param value4 the fourth value */
public void setAttributef(String name, float value1, float value2, float value3, float value4) {
GL20 gl = Gdx.gl20;
int location = fetchAttributeLocation(name);
gl.glVertexAttrib4f(location, value1, value2, value3, value4);
}
use of com.badlogic.gdx.graphics.GL20 in project libgdx by libgdx.
the class ShaderProgram method setUniform4fv.
public void setUniform4fv(String name, float[] values, int offset, int length) {
GL20 gl = Gdx.gl20;
checkManaged();
int location = fetchUniformLocation(name);
gl.glUniform4fv(location, length / 4, values, offset);
}
Aggregations