Example usage for org.lwjgl.opengl GL20 glUseProgram

List of usage examples for org.lwjgl.opengl GL20 glUseProgram

Introduction

In this page you can find the example usage for org.lwjgl.opengl GL20 glUseProgram.

Prototype

public static void glUseProgram(@NativeType("GLuint") int program) 

Source Link

Document

Installs a program object as part of current rendering state.

Usage

From source file:com.adavr.player.globjects.Program.java

License:Open Source License

public static void bind(Program p) {
    GL20.glUseProgram(p.id);
}

From source file:com.adavr.player.globjects.Program.java

License:Open Source License

public static void unbind() {
    GL20.glUseProgram(0);
}

From source file:com.auroraengine.opengl.shaders.GLProgram.java

License:Open Source License

/**
 * Sets this program as being currently in use.
 *
 * Note that this may not be the best way of using this.
 *
 * @throws GLException/*from   w w w  . ja v a  2 s .co m*/
 */
@Override
public void update() throws GLException {
    GL20.glUseProgram(index);
}

From source file:com.badlogic.gdx.backends.jglfw.JglfwGL20.java

License:Apache License

public void glUseProgram(int program) {
    GL20.glUseProgram(program);
}

From source file:com.flowpowered.caustic.lwjgl.gl20.GL20Program.java

License:MIT License

@Override
public void use() {
    checkCreated();
    // Bind the program
    GL20.glUseProgram(id);
    // Check for errors
    LWJGLUtil.checkForGLError();
}

From source file:com.geekyaubergine.geekyjgameutil.shader.ShaderProgram.java

License:Open Source License

/**
 * Starts the current shader
 */
public void start() {
    GL20.glUseProgram(programID);
}

From source file:com.geekyaubergine.geekyjgameutil.shader.ShaderProgram.java

License:Open Source License

/**
 * Stops the current shader
 */
public void stop() {
    GL20.glUseProgram(0);
}

From source file:com.github.begla.blockmania.rendering.manager.ShaderManager.java

License:Apache License

/**
 * @param s Name of the shader to activate
 *//*w w  w . jav  a 2 s. c om*/
public void enableShader(String s) {
    if (s == null) {
        GL20.glUseProgram(0);
        return;
    }

    int shader = getShader(s);
    GL20.glUseProgram(shader);
}

From source file:com.github.begla.blockmania.rendering.ShaderManager.java

License:Apache License

/**
 * @param s Name of the shader to activate
 *///www. j  a  v  a 2  s  .  co  m
public void enableShader(@org.jetbrains.annotations.Nullable String s) {
    if (s == null) {
        GL20.glUseProgram(0);
        return;
    }

    int shader = getShader(s);
    GL20.glUseProgram(shader);
}

From source file:com.github.kajdreef.mazerunnermvn.MazeRunner.ShaderProgram.java

public void useProgram() {
    GL20.glUseProgram(programId);
}