def draw_texture(tex):
 from .program import Program
 program = Program(vert_draw, frag_draw)
 program['u_texture'] = tex
 program['a_position'] = [[(-1.0), (-1.0)], [(-1.0), 1.0], [1.0, (-1.0)], [1.0, 1.0]]
 program['a_texcoord'] = [[0.0, 1.0], [0.0, 0.0], [1.0, 1.0], [1.0, 0.0]]
 program.draw('triangle_strip')

def draw_texture ( tex ) : from . program import Program program = Program ( vert_draw , frag_draw ) program [ 'u_texture' ] = tex program [ 'a_position' ] = [ [ ( - 1.0 ) , ( - 1.0 ) ] , [ ( - 1.0 ) , 1.0 ] , [ 1.0 , ( - 1.0 ) ] , [ 1.0 , 1.0 ] ] program [ 'a_texcoord' ] = [ [ 0.0 , 1.0 ] , [ 0.0 , 0.0 ] , [ 1.0 , 1.0 ] , [ 1.0 , 0.0 ] ] program . draw ( 'triangle_strip' )
draw a 2d texture to the current viewport parameters tex : instance of texture2d the texture to draw .