def loadShapeTexture(filename, texID):
 (data, texw, texh) = loadImage(load_data_file(('jfa/' + filename)))
 gl.glActiveTexture(gl.GL_TEXTURE0)
 gl.glBindTexture(gl.GL_TEXTURE_2D, texID)
 gl.glTexImage2D(gl.GL_TEXTURE_2D, 0, gl.GL_LUMINANCE, texw, texh, 0, gl.GL_LUMINANCE, gl.GL_UNSIGNED_BYTE, data)
 gl.glTexParameteri(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_MIN_FILTER, gl.GL_NEAREST)
 gl.glTexParameteri(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_MAG_FILTER, gl.GL_NEAREST)
 gl.glTexParameteri(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_WRAP_S, gl.GL_REPEAT)
 gl.glTexParameteri(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_WRAP_T, gl.GL_REPEAT)
 checkGLError()
 return (texw, texh)

def loadShapeTexture ( filename , texID ) : ( data , texw , texh ) = loadImage ( load_data_file ( ( 'jfa/' + filename ) ) ) gl . glActiveTexture ( gl . GL_TEXTURE0 ) gl . glBindTexture ( gl . GL_TEXTURE_2D , texID ) gl . glTexImage2D ( gl . GL_TEXTURE_2D , 0 , gl . GL_LUMINANCE , texw , texh , 0 , gl . GL_LUMINANCE , gl . GL_UNSIGNED_BYTE , data ) gl . glTexParameteri ( gl . GL_TEXTURE_2D , gl . GL_TEXTURE_MIN_FILTER , gl . GL_NEAREST ) gl . glTexParameteri ( gl . GL_TEXTURE_2D , gl . GL_TEXTURE_MAG_FILTER , gl . GL_NEAREST ) gl . glTexParameteri ( gl . GL_TEXTURE_2D , gl . GL_TEXTURE_WRAP_S , gl . GL_REPEAT ) gl . glTexParameteri ( gl . GL_TEXTURE_2D , gl . GL_TEXTURE_WRAP_T , gl . GL_REPEAT ) checkGLError ( ) return ( texw , texh )
loadshapetexture - load 8-bit shape texture data from a tga file and set up the corresponding texture object .