Examples of glUniform1i()


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

   * @param value the value */
  public void setUniformi (String name, int value) {
    GL20 gl = Gdx.gl20;
    checkManaged();
    int location = fetchUniformLocation(name);
    gl.glUniform1i(location, value);
  }

  public void setUniformi (int location, int value) {
    GL20 gl = Gdx.gl20;
    checkManaged();
View Full Code Here

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

  }

  public void setUniformi (int location, int value) {
    GL20 gl = Gdx.gl20;
    checkManaged();
    gl.glUniform1i(location, value);
  }

  /** 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.glUniform1i()

   * @param value the value */
  public void setUniformi (String name, int value) {
    GL20 gl = Gdx.graphics.getGL20();
    checkManaged();
    int location = fetchUniformLocation(name);
    gl.glUniform1i(location, value);
  }

  /** 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 javax.media.opengl.GL3.glUniform1i()

            gl3.glEnableVertexAttribArray(1);
            {
                gl3.glActiveTexture(GL3.GL_TEXTURE0);
                texture.enable(gl3);
                texture.bind(gl3);
                gl3.glUniform1i(textureUnLoc, 0);
               
                gl3.glVertexAttribPointer(0, 4, GL3.GL_FLOAT, false, 0, 0);
                gl3.glVertexAttribPointer(1, 2, GL3.GL_FLOAT, false, 0, 4 * 4 * 4);

                gl3.glDrawArrays(GL3.GL_QUADS, 0, 4);
View Full Code Here

Examples of javax.media.opengl.GL3.glUniform1i()

        try {
            final GL3 gl = drawable.getGL().getGL3();
            shaderState.bind(gl);
            vao.bind(gl);
            int spaceshipLoc = gl.glGetUniformLocation(shaderProgram.program(), "spaceshipTex");
            gl.glUniform1i(spaceshipLoc, 0);
            gl.glActiveTexture(GL.GL_TEXTURE0);
            gl.glBindTexture(GL.GL_TEXTURE_2D, spaceshipTex.getTextureObject(gl));

            int explosionLoc = gl.glGetUniformLocation(shaderProgram.program(), "explosionTex");
            gl.glUniform1i(explosionLoc, 1);
View Full Code Here

Examples of javax.media.opengl.GL3.glUniform1i()

            gl.glUniform1i(spaceshipLoc, 0);
            gl.glActiveTexture(GL.GL_TEXTURE0);
            gl.glBindTexture(GL.GL_TEXTURE_2D, spaceshipTex.getTextureObject(gl));

            int explosionLoc = gl.glGetUniformLocation(shaderProgram.program(), "explosionTex");
            gl.glUniform1i(explosionLoc, 1);
            gl.glActiveTexture(GL.GL_TEXTURE0 + 1);
            gl.glBindTexture(GL.GL_TEXTURE_2D, explosionTex.getTextureObject(gl));

            vertices.clear();
            colors.clear();
View Full Code Here

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

        _lightAmbientLoc = gl.glGetUniformLocation(_program, "lightAmbient");
        _lightDiffuseLoc = gl.glGetUniformLocation(_program, "lightDiffuse");
        _textureLoc = gl.glGetUniformLocation(_program, "texture");

        // Set uniform values
        gl.glUniform1i(_textureLoc, 0);

        // Light direction (normalized)
        gl.glUniform3f(_lightDirectionLoc, 0.0f, 0.0f, -1.0f);

        // Ambient light color
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.