def test_example1():
 code = Function(vert_template)
 t1 = Function(transformScale)
 t2 = Function(transformZOffset)
 t3 = Function(transformScale)
 pos = Variable('attribute vec4 a_position')
 code['position'] = t1(t2(pos))
 code['correction'] = t1(pos)
 code['endtransform'] = t3
 code['nlights'] = '4'
 t1['scale'] = t2
 t3['scale'] = (3.0, 4.0, 5.0)
 t2['offset'] = '1.0'
 code2 = Function(frag_template)
 code2['color'] = Varying('v_position')
 code['gl_PointSize'] = '3.0'
 code[code2['color']] = pos
 print code

def test_example1 ( ) : code = Function ( vert_template ) t1 = Function ( transformScale ) t2 = Function ( transformZOffset ) t3 = Function ( transformScale ) pos = Variable ( 'attribute vec4 a_position' ) code [ 'position' ] = t1 ( t2 ( pos ) ) code [ 'correction' ] = t1 ( pos ) code [ 'endtransform' ] = t3 code [ 'nlights' ] = '4' t1 [ 'scale' ] = t2 t3 [ 'scale' ] = ( 3.0 , 4.0 , 5.0 ) t2 [ 'offset' ] = '1.0' code2 = Function ( frag_template ) code2 [ 'color' ] = Varying ( 'v_position' ) code [ 'gl_PointSize' ] = '3.0' code [ code2 [ 'color' ] ] = pos print code
just a few simple compositions .