src/main/java/com/spinyowl/legui/demo/SingleClassExampleGuiOverGL.java
public void attachVertexShader(String vertexShaderSource) {
    // Create the shader and set the source
    vertexShaderID = glCreateShader(GL_VERTEX_SHADER);
    glShaderSource(vertexShaderID, vertexShaderSource);

    // Compile the shader
    glCompileShader(vertexShaderID);

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

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