<s> from __future__ import absolute_import , division , print_function , unicode_literals <EOL> """<STR_LIT>""" <EOL> import ctypes <EOL> import demo <EOL> import pi3d <EOL> WIDTH = <NUM_LIT> <EOL> HEIGHT = <NUM_LIT> <EOL> DISPLAY = pi3d . Display . create ( w = WIDTH , h = HEIGHT ) <EOL> CAMERA = pi3d . Camera ( is_3d = False ) <EOL> shader = pi3d . Shader ( "<STR_LIT>" ) <EOL> tex = [ ] <EOL> tex . append ( pi3d . Texture ( "<STR_LIT>" , mipmap = False ) ) <EOL> tex . append ( pi3d . Texture ( "<STR_LIT>" , mipmap = False ) ) <EOL> sprite = pi3d . Sprite ( camera = CAMERA , w = WIDTH , h = HEIGHT , x = <NUM_LIT:0.0> , y = <NUM_LIT:0.0> , z = <NUM_LIT:1.0> ) <EOL> sprite . set_draw_details ( shader , [ tex [ <NUM_LIT:0> ] ] ) <EOL> sprite . set_2d_size ( WIDTH , HEIGHT , <NUM_LIT:0.0> , <NUM_LIT:0.0> ) <EOL> ti = <NUM_LIT:0> <EOL> mykeys = pi3d . Keyboard ( ) <EOL> while DISPLAY . loop_running ( ) : <EOL> sprite . draw ( ) <EOL> ti = ( ti + <NUM_LIT:1> ) % <NUM_LIT:2> <EOL> pi3d . opengles . glBindTexture ( pi3d . GL_TEXTURE_2D , tex [ ti ] . _tex ) <EOL> pi3d . opengles . glCopyTexImage2D ( pi3d . GL_TEXTURE_2D , <NUM_LIT:0> , pi3d . GL_RGB , <NUM_LIT:0> , <NUM_LIT:0> , WIDTH , HEIGHT , <NUM_LIT:0> ) <EOL> sprite . set_draw_details ( shader , [ tex [ ti ] ] ) <EOL> if mykeys . read ( ) == <NUM_LIT> : <EOL> mykeys . close ( ) <EOL> DISPLAY . destroy ( ) <EOL> break </s>
