src/main/java/com/spinyowl/legui/demo/SingleClassExampleGuiOverGL.java
public void attachFragmentShader(String fragmentShaderSource) {

    // Create the shader and set the source
    fragmentShaderID = glCreateShader(GL_FRAGMENT_SHADER);
    glShaderSource(fragmentShaderID, fragmentShaderSource);

    // Compile the shader
    glCompileShader(fragmentShaderID);

    // Check for errors
    if (glGetShaderi(fragmentShaderID, GL_COMPILE_STATUS) == GL_FALSE) {
      throw new RuntimeException("Error creating fragment shader\n"
          + glGetShaderInfoLog(fragmentShaderID,
          glGetShaderi(fragmentShaderID, GL_INFO_LOG_LENGTH)));
    }

    // Attach the shader
    glAttachShader(programID, fragmentShaderID);
  }
/**
   * Attach a Fragment Shader to this program.
   *
   * @param fragmentShaderSource source code of the Fragment Shader.
   */
Attach a Fragment Shader to this program.
@param fragmentShaderSource source code of the Fragment Shader.
Attach a Fragment Shader to this program . @param fragmentShaderSource source code of the Fragment Shader .
public void attachFragmentShader(String fragmentShaderSource) {
    fragmentShaderID = glCreateShader(GL_FRAGMENT_SHADER);
    glShaderSource(fragmentShaderID, fragmentShaderSource);
    glCompileShader(fragmentShaderID);
    if (glGetShaderi(fragmentShaderID, GL_COMPILE_STATUS) == GL_FALSE) {
      throw new RuntimeException("Error creating fragment shader\n"
          + glGetShaderInfoLog(fragmentShaderID,
          glGetShaderi(fragmentShaderID, GL_INFO_LOG_LENGTH)));
    }
    glAttachShader(programID, fragmentShaderID);
  }
public void attachFragmentShader ( String fragmentShaderSource ) { fragmentShaderID = glCreateShader ( GL_FRAGMENT_SHADER ) ; glShaderSource ( fragmentShaderID , fragmentShaderSource ) ; glCompileShader ( fragmentShaderID ) ; if ( glGetShaderi ( fragmentShaderID , GL_COMPILE_STATUS ) == GL_FALSE ) { throw new RuntimeException ( "Error creating fragment shader\n" + glGetShaderInfoLog ( fragmentShaderID , glGetShaderi ( fragmentShaderID , GL_INFO_LOG_LENGTH ) ) ) ; } glAttachShader ( programID , fragmentShaderID ) ; }
Attach a Fragment Shader to this program.
Attach a Fragment Shader to this program .
// Create the shader and set the source // Compile the shader // Check for errors // Attach the shader