def bind_texture(texture):
    """Draw a single texture"""
    if not getattr(texture, 'image', None):
        texture.image = load_image(texture.path)

    glEnable(texture.image.target)
    glBindTexture(texture.image.target, texture.image.id)
    gl.glTexParameterf(texture.image.target,
                       gl.GL_TEXTURE_WRAP_S, gl.GL_CLAMP_TO_EDGE)
    gl.glTexParameterf(texture.image.target,
                       gl.GL_TEXTURE_WRAP_T, gl.GL_CLAMP_TO_EDGE)
def bind_texture ( texture ) : if not getattr ( texture , 'image' , None ) : texture . image = load_image ( texture . path ) glEnable ( texture . image . target ) glBindTexture ( texture . image . target , texture . image . id ) gl . glTexParameterf ( texture . image . target , gl . GL_TEXTURE_WRAP_S , gl . GL_CLAMP_TO_EDGE ) gl . glTexParameterf ( texture . image . target , gl . GL_TEXTURE_WRAP_T , gl . GL_CLAMP_TO_EDGE )
Draw a single texture