def createBufferTexture(texID, texw, texh):
 gl.glActiveTexture(gl.GL_TEXTURE0)
 gl.glBindTexture(gl.GL_TEXTURE_2D, texID)
 black = (0.0, 0.0, 0.0, 0.0)
 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_CLAMP_TO_EDGE)
 gl.glTexParameteri(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_WRAP_T, gl.GL_CLAMP_TO_EDGE)
 gl.glTexParameterfv(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_BORDER_COLOR, black)
 gl.glTexImage2D(gl.GL_TEXTURE_2D, 0, gl.GL_RGBA, texw, texh, 0, gl.GL_RGBA, gl.GL_UNSIGNED_BYTE, ((('\x00' * texw) * texh) * 4))
 gl.glBindTexture(gl.GL_TEXTURE_2D, 0)
 checkGLError()

def createBufferTexture ( texID , texw , texh ) : gl . glActiveTexture ( gl . GL_TEXTURE0 ) gl . glBindTexture ( gl . GL_TEXTURE_2D , texID ) black = ( 0.0 , 0.0 , 0.0 , 0.0 ) 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_CLAMP_TO_EDGE ) gl . glTexParameteri ( gl . GL_TEXTURE_2D , gl . GL_TEXTURE_WRAP_T , gl . GL_CLAMP_TO_EDGE ) gl . glTexParameterfv ( gl . GL_TEXTURE_2D , gl . GL_TEXTURE_BORDER_COLOR , black ) gl . glTexImage2D ( gl . GL_TEXTURE_2D , 0 , gl . GL_RGBA , texw , texh , 0 , gl . GL_RGBA , gl . GL_UNSIGNED_BYTE , ( ( ( '\x00' * texw ) * texh ) * 4 ) ) gl . glBindTexture ( gl . GL_TEXTURE_2D , 0 ) checkGLError ( )
createbuffertexture - create an 8-bit texture render target .