Example usage for org.lwjgl.opengl GL20 glDetachShader

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

Introduction

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

Prototype

public static void glDetachShader(@NativeType("GLuint") int program, @NativeType("GLuint") int shader) 

Source Link

Document

Detaches a shader object from a program object to which it is attached.

Usage

From source file:wrath.client.graphics.ShaderProgram.java

License:Open Source License

@Override
public void close() {
    GL20.glUseProgram(0);//from  w w  w.  ja  v a 2 s  .c o m
    GL20.glDetachShader(programID, vertShaderID);
    GL20.glDetachShader(programID, fragShaderID);
    GL20.glDeleteShader(vertShaderID);
    GL20.glDeleteShader(fragShaderID);
    GL20.glDeleteProgram(programID);
    Game.getCurrentInstance().removeFromTrashCleanup(this);
}