Example usage for com.badlogic.gdx.graphics GL20 glUniformMatrix3fv

List of usage examples for com.badlogic.gdx.graphics GL20 glUniformMatrix3fv

Introduction

In this page you can find the example usage for com.badlogic.gdx.graphics GL20 glUniformMatrix3fv.

Prototype

public void glUniformMatrix3fv(int location, int count, boolean transpose, FloatBuffer value);

Source Link

Usage

From source file:net.mgsx.game.examples.gpu.utils.ShaderProgramEx.java

License:Apache License

/** Sets an array of uniform matrices with the given name. The {@link ShaderProgram} must be bound for this to work.
 * /*w  w w.  ja v  a 2 s  .c  o m*/
 * @param name the name of the uniform
 * @param buffer buffer containing the matrix data
 * @param transpose whether the uniform matrix should be transposed */
public void setUniformMatrix3fv(String name, FloatBuffer buffer, int count, boolean transpose) {
    GL20 gl = Gdx.gl20;
    checkManaged();
    buffer.position(0);
    int location = fetchUniformLocation(name);
    gl.glUniformMatrix3fv(location, count, transpose, buffer);
}