packages/pyglGA/scripts/basicCubeGUI.py
def displayCube():
    """
    Uses the previously created shader program, binds the VAO on the client side and renders the cube using triangles
    """
    global shaderProgram
    global VAO
    global wireFrame
    global TranslationMat
    
    #glClearColor(0, 0, 0.3, 1)
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)

    glDisable(GL_CULL_FACE)
    
    # active shader program
    #glUseProgram(shaderProgram)

    if wireFrame:
        glPolygonMode(GL_FRONT_AND_BACK, GL_LINE)
    else:
        glPolygonMode(GL_FRONT_AND_BACK, GL_FILL)

    try:
        glBindVertexArray(VAO)
        glUniformMatrix4fv(TranslateMat, 1, GL_FALSE, TranslationMat)
        # glPolygonMode(GL_FRONT_AND_BACK,GL_LINE)
        # draw cube
        glDrawArrays(GL_TRIANGLES, 0, NumVertices)
    finally:
        glBindVertexArray(0)
        # glUseProgram(0)

    Uses the previously created shader program, binds the VAO on the client side and renders the cube using triangles
    
Uses the previously created shader program, binds the VAO on the client side and renders the cube using triangles
Uses the previously created shader program binds the VAO on the client side and renders the cube using triangles
def displayCube():
    global shaderProgram
    global VAO
    global wireFrame
    global TranslationMat
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)
    glDisable(GL_CULL_FACE)
    if wireFrame:
        glPolygonMode(GL_FRONT_AND_BACK, GL_LINE)
    else:
        glPolygonMode(GL_FRONT_AND_BACK, GL_FILL)
    try:
        glBindVertexArray(VAO)
        glUniformMatrix4fv(TranslateMat, 1, GL_FALSE, TranslationMat)
        glDrawArrays(GL_TRIANGLES, 0, NumVertices)
    finally:
        glBindVertexArray(0)
def displayCube ( ) : global shaderProgram global VAO global wireFrame global TranslationMat glClear ( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ) glDisable ( GL_CULL_FACE ) if wireFrame : glPolygonMode ( GL_FRONT_AND_BACK , GL_LINE ) else : glPolygonMode ( GL_FRONT_AND_BACK , GL_FILL ) try : glBindVertexArray ( VAO ) glUniformMatrix4fv ( TranslateMat , 1 , GL_FALSE , TranslationMat ) glDrawArrays ( GL_TRIANGLES , 0 , NumVertices ) finally : glBindVertexArray ( 0 )
Uses the previously created shader program, binds the VAO on the client side and renders the cube using triangles
Uses the previously created shader program binds the VAO on the client side and renders the cube using triangles
"""
    Uses the previously created shader program, binds the VAO on the client side and renders the cube using triangles
    """ #glClearColor(0, 0, 0.3, 1) # active shader program #glUseProgram(shaderProgram) # glPolygonMode(GL_FRONT_AND_BACK,GL_LINE) # draw cube # glUseProgram(0)