packages/pyglGA/scripts/basicTriangle.py
def displayTriangle():
    """
    Uses the previously created shader program, binds the VAO on the client side and draws using triangles
    """
    global shaderProgram
    global VAO
    glClearColor(0, 0, 0.3, 1)
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)

    # active shader program
    glUseProgram(shaderProgram)

    try:
        glBindVertexArray(VAO)
        # glPolygonMode(GL_FRONT_AND_BACK,GL_LINE)
        # draw triangle
        glDrawArrays(GL_TRIANGLES, 0, 3)
    finally:
        glBindVertexArray(0)
        glUseProgram(0)

    Uses the previously created shader program, binds the VAO on the client side and draws using triangles
    
Uses the previously created shader program, binds the VAO on the client side and draws using triangles
Uses the previously created shader program binds the VAO on the client side and draws using triangles
def displayTriangle():
    global shaderProgram
    global VAO
    glClearColor(0, 0, 0.3, 1)
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)
    glUseProgram(shaderProgram)
    try:
        glBindVertexArray(VAO)
        glDrawArrays(GL_TRIANGLES, 0, 3)
    finally:
        glBindVertexArray(0)
        glUseProgram(0)
def displayTriangle ( ) : global shaderProgram global VAO glClearColor ( 0 , 0 , 0.3 , 1 ) glClear ( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ) glUseProgram ( shaderProgram ) try : glBindVertexArray ( VAO ) glDrawArrays ( GL_TRIANGLES , 0 , 3 ) finally : glBindVertexArray ( 0 ) glUseProgram ( 0 )
Uses the previously created shader program, binds the VAO on the client side and draws using triangles
Uses the previously created shader program binds the VAO on the client side and draws using triangles
"""
    Uses the previously created shader program, binds the VAO on the client side and draws using triangles
    """ # active shader program # glPolygonMode(GL_FRONT_AND_BACK,GL_LINE) # draw triangle