Package com.badlogic.gdx.graphics

Examples of com.badlogic.gdx.graphics.GL20.glUniformMatrix4fv()


    GL20 gl = Gdx.gl20;
    checkManaged();
    int location = fetchUniformLocation(name);
    this.matrix.clear();
    BufferUtils.copy(matrix.val, this.matrix, matrix.val.length, 0);
    gl.glUniformMatrix4fv(location, 1, transpose, this.matrix);
  }

  public void setUniformMatrix (int location, Matrix4 matrix) {
    setUniformMatrix(location, matrix, false);
  }
View Full Code Here


  public void setUniformMatrix (int location, Matrix4 matrix, boolean transpose) {
    GL20 gl = Gdx.gl20;
    checkManaged();
    this.matrix.clear();
    BufferUtils.copy(matrix.val, this.matrix, matrix.val.length, 0);
    gl.glUniformMatrix4fv(location, 1, transpose, this.matrix);
  }

  /** Sets the uniform matrix with the given name. Throws an IllegalArgumentException in case it is not called in between a
   * {@link #begin()}/{@link #end()} block.
   *
 
View Full Code Here

  public void setUniformMatrix4fv (String name, FloatBuffer buffer, int count, boolean transpose) {
    GL20 gl = Gdx.gl20;
    checkManaged();
    buffer.position(0);
    int location = fetchUniformLocation(name);
    gl.glUniformMatrix4fv(location, count, transpose, buffer);
  }

  public void setUniformMatrix4fv (int location, float[] values, int offset, int length) {
    GL20 gl = Gdx.gl20;
    checkManaged();
View Full Code Here

    GL20 gl = Gdx.gl20;
    checkManaged();
    ensureBufferCapacity(length << 2);
    floatBuffer.clear();
    BufferUtils.copy(values, floatBuffer, length, offset);
    gl.glUniformMatrix4fv(location, length / 16, false, floatBuffer);
  }

  public void setUniformMatrix4fv (String name, float[] values, int offset, int length) {
    GL20 gl = Gdx.gl20;
    checkManaged();
View Full Code Here

    checkManaged();
    ensureBufferCapacity(length << 2);
    floatBuffer.clear();
    BufferUtils.copy(values, floatBuffer, length, offset);
    int location = fetchUniformLocation(name);
    gl.glUniformMatrix4fv(location, length / 16, false, floatBuffer);
  }

  /** Sets the uniform with the given name. Throws an IllegalArgumentException in case it is not called in between a
   * {@link #begin()}/{@link #end()} block.
   *
 
View Full Code Here

    GL20 gl = Gdx.graphics.getGL20();
    checkManaged();
    int location = fetchUniformLocation(name);
    this.matrix.clear();
    BufferUtils.copy(matrix.val, this.matrix, matrix.val.length, 0);
    gl.glUniformMatrix4fv(location, 1, transpose, this.matrix);
  }

  /** Sets the uniform matrix with the given name. Throws an IllegalArgumentException in case it is not called in between a
   * {@link #begin()}/{@link #end()} block.
   *
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.