Module Import alias identifier ImportFrom alias ImportFrom alias ImportFrom alias alias alias alias alias alias alias ImportFrom alias alias ImportFrom alias alias alias alias alias FunctionDef arguments args defaults body Expr Str Expr Call NameLoad NameLoad NameLoad Call AttributeLoad NameLoad attr TupleLoad Num Num Num AttributeLoad NameLoad attr keyword Str decorator_list Call NameLoad FunctionDef arguments args defaults body Expr Str Assign NameStore TupleLoad Num Num Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad attr AttributeLoad NameLoad attr Assign NameStore BinOpAdd NameLoad TupleLoad Num With Call NameLoad keyword SubscriptLoad NameLoad Slice Num NameStore body Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad keyword Str Assign NameStore Call NameLoad NameLoad Str Assign NameStore Call NameLoad keyword NameLoad Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Expr Call NameLoad AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice Num Expr Call NameLoad BinOpAdd TupleLoad Num Num AttributeLoad NameLoad attr With NameLoad body Expr Call NameLoad NameLoad Expr Call NameLoad NameLoad Assign NameStore Call AttributeLoad SubscriptLoad Call NameLoad ExtSlice Slice Num Slice Index Num attr AttributeLoad NameLoad attr Expr Call NameLoad AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Slice Num Expr Call NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr NameLoad Num Expr Call NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr NameLoad Num Expr Call NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr NameLoad Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Print TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call NameLoad keyword Str With NameLoad body Expr Call NameLoad keyword Str Expr Call NameLoad NameLoad Assign NameStore Call AttributeLoad SubscriptLoad Call NameLoad ExtSlice Slice Slice Index Num attr AttributeLoad NameLoad attr Expr Call NameLoad BinOpMult NameLoad Num NameLoad keyword Num Expr Call NameLoad BinOpMult NameLoad Num NameLoad keyword Num decorator_list Call NameLoad FunctionDef arguments args defaults body Expr Str Assign NameStore ListLoad Num Num Num Num Num Num Num Assign TupleStore NameStore NameStore NameStore TupleLoad Call NameLoad NameLoad Num Num Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad AttributeLoad NameLoad attr Assign NameStore Str Assign NameStore Str For TupleStore NameStore NameStore Call NameLoad NameLoad body Assign SubscriptStore NameLoad ExtSlice Index NameLoad Slice Num Slice Num BinOpDiv NameLoad Num With Call NameLoad keyword TupleLoad Num Num NameStore body If UnaryOpNot Call NameLoad body Assign NameStore Call NameLoad NameLoad Expr Call NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Return Assign NameStore Call NameLoad NameLoad NameLoad Assign SubscriptStore NameLoad Index Str ListLoad ListLoad Num Num ListLoad Num Num ListLoad Num Num ListLoad Num Num Assign NameStore Call NameLoad NameLoad keyword Str Expr Call NameLoad AttributeLoad NameLoad attr NameLoad Expr Call NameLoad AttributeLoad NameLoad attr NameLoad Expr Call NameLoad AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Index Str NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad body Expr Call NameLoad Num Num NameLoad NameLoad Expr Call NameLoad keyword Str Assign NameStore BinOpDiv BinOpAdd NameLoad Num Call NameLoad NameLoad Print TupleLoad NameLoad NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Expr Call AttributeLoad NameLoad attr Str Assign NameStore SubscriptLoad Call AttributeLoad SubscriptLoad Call NameLoad ExtSlice Slice Slice Index Num attr NameLoad Slice Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad ExtSlice Slice Num Slice Num NameLoad Expr Call NameLoad NameLoad NameLoad keyword BinOpDiv Num Num decorator_list Call NameLoad FunctionDef arguments args defaults body Expr Str Assign NameStore Str Assign NameStore Str Assign NameStore TupleLoad Num Num With Call NameLoad keyword NameLoad NameStore body Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Expr Call NameLoad AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice Num Assign NameStore TupleLoad Num Num Expr Call NameLoad BinOpAdd TupleLoad Num Num NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Assign SubscriptStore NameLoad Index Str ListLoad ListLoad Num Num ListLoad Num Num ListLoad Num Num ListLoad Num Num Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr TupleLoad Num Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad Expr Call NameLoad BinOpDiv SubscriptLoad NameLoad ExtSlice Slice Slice Index Num Num Call AttributeLoad NameLoad attr NameLoad keyword BinOpDiv Num Num Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad Expr Call NameLoad BinOpDiv SubscriptLoad NameLoad ExtSlice Slice Slice Index Num Num BinOpMult BinOpDiv Num Num Call AttributeLoad NameLoad attr NameLoad keyword BinOpDiv Num Num Expr Call NameLoad NameLoad AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr TupleLoad Num Num AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMult TupleLoad Num Num Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad Expr Call NameLoad BinOpDiv SubscriptLoad NameLoad ExtSlice Slice Slice Index Num Num BinOpMult BinOpDiv Num Num Call AttributeLoad NameLoad attr NameLoad keyword BinOpDiv Num Num decorator_list Call NameLoad Expr Call NameLoad
N/A N/A numpy np numpy.testing assert_allclose vispy.app Canvas vispy.gloo Texture2D Texture3D Program FrameBuffer RenderBuffer set_viewport clear vispy.gloo.util draw_texture _screenshot vispy.testing requires_application has_pyopengl run_tests_if_main assert_raises assert_equal test_use_textures N/A N/A N/A N/A N/A Test using textures and FBO N/A N/A assert_raises ValueError Texture2D N/A N/A np zeros N/A 2 2 3 N/A np float32 format rgba N/A N/A requires_application test_use_framebuffer N/A N/A N/A N/A N/A Test drawing to a framebuffer N/A shape N/A 100 300 N/A data N/A N/A N/A N/A N/A np random rand shape astype N/A np float32 N/A use_shape N/A shape N/A 3 N/A N/A Canvas size N/A shape N/A -1 c N/A N/A orig_tex N/A Texture2D data N/A fbo_tex N/A Texture2D use_shape format rgb N/A rbo N/A RenderBuffer shape color N/A fbo N/A FrameBuffer color fbo_tex N/A N/A N/A N/A N/A c context glir set_verbose True N/A N/A assert_equal N/A c size N/A shape N/A -1 N/A N/A set_viewport N/A N/A 0 0 N/A c size N/A fbo N/A N/A N/A draw_texture orig_tex N/A N/A draw_texture fbo_tex N/A out_tex N/A N/A N/A N/A _screenshot N/A N/A -1 N/A N/A 0 astype N/A np float32 N/A N/A assert_equal N/A out_tex shape N/A N/A c size N/A -1 N/A N/A assert_raises TypeError N/A N/A FrameBuffer color_buffer fset fbo 1.0 N/A N/A assert_raises TypeError N/A N/A FrameBuffer depth_buffer fset fbo 1.0 N/A N/A assert_raises TypeError N/A N/A FrameBuffer stencil_buffer fset fbo 1.0 N/A N/A fbo color_buffer rbo N/A N/A fbo depth_buffer N/A RenderBuffer shape N/A N/A fbo stencil_buffer None N/A N/A N/A fbo color_buffer N/A fbo depth_buffer N/A fbo stencil_buffer N/A N/A clear color black N/A fbo N/A N/A N/A clear color black N/A N/A draw_texture orig_tex N/A out_rbo N/A N/A N/A N/A _screenshot N/A N/A N/A N/A 0 astype N/A np float32 N/A N/A assert_allclose N/A data 255.0 out_tex atol 1 N/A N/A assert_allclose N/A data 255.0 out_rbo atol 1 N/A N/A requires_application test_use_texture3D N/A N/A N/A N/A N/A Test using a 3D texture N/A vals N/A 0 200 100 0 255 0 100 N/A N/A d h w N/A N/A len vals 3 5 N/A data N/A N/A np zeros N/A d h w N/A np float32 N/A VERT_SHADER 
    attribute vec2 a_pos;
    varying vec2 v_pos;

    void main (void)
    {
        v_pos = a_pos;
        gl_Position = vec4(a_pos, 0., 1.);
    }
     N/A FRAG_SHADER 
    uniform sampler3D u_texture;
    varying vec2 v_pos;
    uniform float i;
    void main()
    {
        gl_FragColor = texture3D(u_texture,
                                 vec3((v_pos.y+1.)/2., (v_pos.x+1.)/2., i));
        gl_FragColor.a = 1.;
    }
     N/A N/A ii val N/A enumerate vals N/A N/A N/A data N/A N/A ii N/A 2 N/A 3 N/A val 255.0 N/A N/A Canvas size N/A 100 100 c N/A N/A N/A N/A has_pyopengl N/A N/A t N/A Texture3D data N/A N/A assert_raises ImportError N/A N/A t glir flush N/A N/A N/A c context shared parser N/A N/A program N/A Program VERT_SHADER FRAG_SHADER N/A N/A program N/A a_pos N/A N/A -1.0 -1.0 N/A 1.0 -1.0 N/A -1.0 1.0 N/A 1.0 1.0 N/A tex N/A Texture3D data interpolation nearest N/A N/A assert_equal N/A tex width w N/A N/A assert_equal N/A tex height h N/A N/A assert_equal N/A tex depth d N/A N/A program N/A u_texture tex N/A N/A ii val N/A enumerate vals N/A N/A N/A set_viewport 0 0 w h N/A N/A clear color black N/A iii N/A N/A ii 0.5 N/A float d N/A N/A ii iii N/A N/A program N/A i iii N/A N/A N/A program draw triangle_strip N/A out N/A N/A N/A N/A N/A _screenshot N/A N/A N/A N/A 0 astype int N/A -1 N/A expected N/A N/A np zeros_like out N/A N/A expected N/A N/A 2 N/A 3 val N/A N/A assert_allclose out expected atol N/A 1.0 255.0 N/A N/A requires_application test_use_uniforms N/A N/A N/A N/A N/A Test using uniform arrays N/A VERT_SHADER 
    attribute vec2 a_pos;
    varying vec2 v_pos;

    void main (void)
    {
        v_pos = a_pos;
        gl_Position = vec4(a_pos, 0., 1.);
    }
     N/A FRAG_SHADER 
    varying vec2 v_pos;
    uniform vec3 u_color[2];

    void main()
    {
        gl_FragColor = vec4((u_color[0] + u_color[1]) / 2., 1.);
    }
     N/A shape N/A 300 300 N/A N/A Canvas size shape c N/A N/A N/A N/A N/A N/A c context glir set_verbose True N/A N/A assert_equal N/A c size N/A shape N/A -1 N/A shape N/A 3 3 N/A N/A set_viewport N/A N/A 0 0 shape N/A program N/A Program VERT_SHADER FRAG_SHADER N/A N/A program N/A a_pos N/A N/A -1.0 -1.0 N/A 1.0 -1.0 N/A -1.0 1.0 N/A 1.0 1.0 N/A N/A program N/A u_color N/A N/A np ones N/A 2 3 N/A N/A N/A N/A c context clear k N/A N/A N/A program draw triangle_strip N/A out N/A _screenshot N/A N/A assert_allclose N/A N/A out N/A N/A N/A N/A 0 255.0 N/A N/A np ones shape atol N/A 1.0 255.0 N/A N/A program N/A u_color[1] N/A N/A np zeros 3 N/A np float32 N/A N/A N/A N/A c context clear k N/A N/A N/A program draw triangle_strip N/A out N/A _screenshot N/A N/A assert_allclose N/A N/A out N/A N/A N/A N/A 0 255.0 N/A N/A 127.5 255.0 N/A N/A np ones shape atol N/A 1.0 255.0 N/A N/A assert_raises ValueError N/A program __setitem__ u_color N/A N/A np zeros 3 N/A np float32 N/A N/A program N/A u_color N/A N/A np zeros N/A 2 3 N/A np float32 N/A N/A program N/A u_color[0] N/A N/A np ones 3 N/A np float32 N/A N/A N/A N/A c context clear N/A N/A 0.33 3 N/A N/A N/A program draw triangle_strip N/A out N/A _screenshot N/A N/A assert_allclose N/A N/A out N/A N/A N/A N/A 0 255.0 N/A N/A 127.5 255.0 N/A N/A np ones shape atol N/A 1.0 255.0 N/A N/A requires_application N/A N/A run_tests_if_main