Examples of glUniformMatrix4fv()


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

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

  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

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

  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

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

    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

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

    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

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

    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

Examples of net.rim.device.api.opengles.GL20.glUniformMatrix4fv()

        // There are no matrix modes in GL20.
        // Multiply the model-view matrix with the projection
        // matrix and pass it to the shader program.
        Matrix4f.multiply(_projection, _matrix, _matrix);
        gl.glUniformMatrix4fv(_matrixLoc, 1, false, _matrix.getArray(), 0);

        // Set the attribute location of the position, normal and texture
        // coordinates
        _cube.enableVertexAttrib(_positionLoc);
        _cube.enableTexcoordAttrib(_texCoordLoc);
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.