Is "Hello, Triangle!" missing a cleanup bindBuffer?

Issue #100 open
Inês Almeida
created an issue

In the display function, in "Chapter 1. Hello, Triangle!", after glDrawArrays, the AttribPointer is disabled, as well as the program, but not the vertex buffer object. Is it missing?


    glBindBuffer(GL_ARRAY_BUFFER, positionBufferObject);
    glVertexAttribPointer(0, 4, GL_FLOAT, GL_FALSE, 0, 0);

    glDrawArrays(GL_TRIANGLES, 0, 3);

    // glBindBuffer(GL_ARRAY_BUFFER, 0);  // ?


Also, you have a minor typo at the very beginning of: "Chapter 2. Playing with Colors", in: "The methods are to using the fragment's position to compute a color and to using per-vertex data to compute a color."

Comments (1)

  1. Log in to comment