Module Expr Str Import alias Import alias identifier ImportFrom alias ImportFrom alias alias alias alias alias alias ImportFrom alias FunctionDef arguments args defaults body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str decorator_list Call NameLoad FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str decorator_list Call NameLoad FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Str decorator_list Call NameLoad Call NameLoad FunctionDef arguments args defaults body Expr Str If NameLoad body Raise Call NameLoad Str If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr Str body Raise Call NameLoad Str Expr Call NameLoad Str decorator_list Call NameLoad FunctionDef arguments args defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad With Call NameLoad NameStore body Expr Call NameLoad Assign TupleStore NameStore NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Num NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num Num NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num Num Num Num Assign NameStore Call NameLoad Expr Call NameLoad Expr Call NameLoad Expr Call NameLoad Expr Call NameLoad Expr Call NameLoad Expr Call NameLoad For TupleStore NameStore NameStore NameLoad body Expr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr decorator_list Assign NameStore Str Assign NameStore Str Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr TupleLoad BinOpMult NameLoad Num BinOpMult NameLoad Num Num AttributeLoad NameLoad attr Assign SubscriptStore NameLoad ExtSlice Slice NameLoad Slice NameLoad Index Num Num Assign SubscriptStore NameLoad ExtSlice Slice NameLoad Slice NameLoad Index Num Num Assign SubscriptStore NameLoad ExtSlice Slice NameLoad Slice NameLoad Index Num Num Assign NameStore SubscriptLoad NameLoad ExtSlice Slice Slice Index Num Assert CompareIs SubscriptLoad AttributeLoad NameLoad attr Index Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListLoad ListLoad Num Num Num ListLoad Num Num Num ListLoad Num Num Num ListLoad Num Num Num ListLoad Num Num Num ListLoad Num Num Num AttributeLoad NameLoad attr Assign NameStore BinOpMult SubscriptLoad AttributeLoad NameLoad attr Index Num Num Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr ListLoad BinOpAdd NameLoad TupleLoad Num Num Num BinOpAdd NameLoad TupleLoad Num Num Num BinOpAdd NameLoad TupleLoad Num Num Num BinOpAdd NameLoad TupleLoad Num Num Num attr AttributeLoad NameLoad attr Assign NameStore SubscriptLoad BinOpMult BinOpAdd NameLoad Num Num ExtSlice Slice Slice Num Assert CompareIs SubscriptLoad AttributeLoad NameLoad attr Index Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad Num AttributeLoad NameLoad attr Assign SubscriptStore NameLoad ExtSlice Slice Num Num Index Num Num Assign SubscriptStore NameLoad ExtSlice Slice Num Num Index Num Num Assign SubscriptStore NameLoad ExtSlice Slice Num Num Index Num Num Assign SubscriptStore NameLoad ExtSlice Slice Index Num Num Assign NameStore SubscriptLoad NameLoad ExtSlice Slice Slice Num Assign NameStore SubscriptLoad Call AttributeLoad Call AttributeLoad NameLoad attr Num NameLoad Num attr AttributeLoad NameLoad attr Slice Num Assign NameStore NameLoad FunctionDef arguments args defaults body Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr TupleLoad AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr TupleLoad AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr TupleLoad AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad Call AttributeLoad NameLoad attr NameLoad Str Expr Call NameLoad Call AttributeLoad NameLoad attr NameLoad Str Expr Call NameLoad Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Num Expr Call NameLoad Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Num Str Expr Call AttributeLoad NameLoad attr NameLoad Num Str Expr Call AttributeLoad NameLoad attr NameLoad Num Str Expr Call AttributeLoad NameLoad attr NameLoad Num Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad Call NameLoad NameLoad Call NameLoad ListLoad NameLoad NameLoad Expr Call NameLoad Call AttributeLoad NameLoad attr NameLoad Str Expr Call NameLoad Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad CompareIn Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call NameLoad NameLoad Num Expr Call NameLoad NameLoad BinOpAdd BinOpAdd BinOpAdd Num Num Num Num Assign NameStore Dict For NameStore Call NameLoad NameLoad body Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad Expr Call NameLoad NameLoad Num For NameStore Call NameLoad NameLoad body Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad Expr Call NameLoad NameLoad Num Expr Call NameLoad SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr Expr Call NameLoad SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr Expr Call NameLoad SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr Expr Call NameLoad SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr Expr Call NameLoad SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr For TupleStore NameStore NameStore Call NameLoad ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call NameLoad SubscriptLoad NameLoad Index BinOpMod Str BinOpAdd NameLoad Num NameLoad For TupleStore NameStore NameStore Call NameLoad ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call NameLoad SubscriptLoad NameLoad Index BinOpMod Str BinOpAdd NameLoad Num NameLoad For TupleStore NameStore NameStore Call NameLoad ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call NameLoad SubscriptLoad NameLoad Index BinOpMod Str BinOpAdd NameLoad Num NameLoad Expr Call NameLoad Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr TupleLoad AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Slice Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Num Num AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Slice Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Num Num AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Num Expr Call AttributeLoad NameLoad attr BinOpAdd AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call NameLoad NameLoad AttributeLoad NameLoad attr Expr Call NameLoad Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr TupleLoad AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Num AttributeLoad NameLoad attr NameLoad BinOpMult Num Num Num Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call NameLoad NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call NameLoad NameLoad BinOpMult Num Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call NameLoad NameLoad Num Expr Call NameLoad Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr TupleLoad AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Num AttributeLoad NameLoad attr NameLoad BinOpMult Num Num Num Expr Call NameLoad Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Num AttributeLoad NameLoad attr NameLoad BinOpMult Num Num NameLoad Expr Call NameLoad Call AttributeLoad NameLoad attr Num Global identifier Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr TupleLoad AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call NameLoad Call AttributeLoad NameLoad attr Num For TupleStore NameStore NameStore NameStore ListLoad TupleLoad Num AttributeLoad NameLoad attr AttributeLoad NameLoad attr TupleLoad Num AttributeLoad NameLoad attr AttributeLoad NameLoad attr TupleLoad Num AttributeLoad NameLoad attr AttributeLoad NameLoad attr TupleLoad Num AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore BinOpMod Str NameLoad Assign NameStore BinOpMult ListLoad Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad Num NameLoad For TupleStore NameStore NameStore NameStore ListLoad TupleLoad Num AttributeLoad NameLoad attr AttributeLoad NameLoad attr TupleLoad Num AttributeLoad NameLoad attr AttributeLoad NameLoad attr TupleLoad Num AttributeLoad NameLoad attr AttributeLoad NameLoad attr TupleLoad Num AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore BinOpMod Str NameLoad Assign NameStore BinOpMult ListLoad Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr Num keyword Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Num NameLoad SubscriptLoad NameLoad ExtSlice Slice Num Slice Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Num keyword Str Expr Call AttributeLoad NameLoad attr NameLoad Num NameLoad SubscriptLoad NameLoad ExtSlice Slice Num Slice Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Num keyword Str Expr Call AttributeLoad NameLoad attr NameLoad Num NameLoad SubscriptLoad NameLoad ExtSlice Slice Num Slice Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Expr Call NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Expr Call NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad TupleLoad Num Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Expr Call NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad TupleLoad Num Num Expr Call NameLoad Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Num Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Num Num Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Num Num Num Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num NameLoad Expr Call AttributeLoad NameLoad attr Expr Call NameLoad decorator_list FunctionDef arguments args defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Expr Call NameLoad decorator_list FunctionDef arguments args defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Expr Call NameLoad decorator_list FunctionDef arguments args NameParam defaults NameLoad body Expr Str Assign TupleStore NameStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr TupleLoad NameLoad NameLoad Num Assign NameStore Call NameLoad SubscriptLoad NameLoad Index TupleLoad Call NameLoad BinOpDiv BinOpMult Num NameLoad Num Call NameLoad BinOpDiv BinOpMult Num NameLoad Num Assign NameStore Call NameLoad SubscriptLoad NameLoad Index TupleLoad Call NameLoad BinOpDiv BinOpMult Num NameLoad Num Call NameLoad BinOpDiv BinOpMult Num NameLoad Num Assign NameStore Call NameLoad SubscriptLoad NameLoad Index TupleLoad Call NameLoad BinOpDiv BinOpMult Num NameLoad Num Call NameLoad BinOpDiv BinOpMult Num NameLoad Num Assign NameStore Call NameLoad SubscriptLoad NameLoad Index TupleLoad Call NameLoad BinOpDiv BinOpMult Num NameLoad Num Call NameLoad BinOpDiv BinOpMult Num NameLoad Num If NameLoad body Expr Call NameLoad NameLoad TupleLoad Num Num Num Expr Call NameLoad NameLoad TupleLoad Num Num Num Expr Call NameLoad NameLoad TupleLoad Num Num Num Expr Call NameLoad NameLoad TupleLoad Num Num Num decorator_list Expr Call NameLoad
N/A N/A  Test to verify the functionality of the OpenGL backends. This test
sets up a real visualization with shaders and all. This tests setting
source code, setting texture and buffer data, and we touch many other
functions of the API too. The end result is an image with four colored
quads. The result is tested for pixel color.

The visualization
-----------------

We create a visualization where the screen is divided in 4 quadrants,
and each quadrant is drawn a different color (black, red, green,
blue). The drawing is done for 50% using attribute data, and 50%
using a texture. The end result should be fully saturated colors.

Remember: the bottom left is (-1, -1) and the first quadrant.
 N/A sys N/A numpy np vispy.app Canvas vispy.testing requires_application requires_pyopengl SkipTest run_tests_if_main assert_equal assert_true vispy.gloo gl teardown_module N/A N/A N/A N/A N/A N/A N/A gl use_gl N/A test_functionality_desktop N/A N/A N/A N/A N/A  Test desktop GL backend for full functionality.  N/A N/A _test_functionality gl2 N/A N/A requires_application test_functionality_proxy N/A N/A N/A N/A N/A  Test GL proxy class for full functionality.  N/A N/A _test_functionality gl2 debug N/A N/A requires_application test_functionality_pyopengl N/A N/A N/A N/A N/A  Test pyopengl GL backend for full functionality.  N/A N/A _test_functionality pyopengl2 N/A N/A requires_application N/A requires_pyopengl test_functionality_es2 N/A N/A N/A N/A N/A  Test es2 GL backend for full functionality.  N/A True N/A N/A N/A SkipTest Skip es2 functionality test for now. N/A N/A N/A N/A N/A sys platform startswith win N/A N/A N/A SkipTest Can only test es2 functionality on Windows. N/A N/A _test_functionality es2 N/A N/A requires_application _clear_screen N/A N/A N/A N/A N/A N/A N/A gl glClear N/A gl GL_COLOR_BUFFER_BIT N/A N/A N/A gl glFinish N/A _test_functionality N/A N/A backend N/A N/A N/A  Create app and canvas so we have a context. Then run tests.
     N/A N/A N/A gl use_gl backend N/A N/A Canvas canvas N/A N/A N/A _clear_screen N/A N/A w h N/A canvas size N/A N/A N/A gl glViewport 0 0 w h N/A N/A N/A gl glScissor 0 0 w h N/A N/A N/A gl glClearColor 0.0 0.0 0.0 1.0 N/A objects N/A _prepare_vis N/A N/A _clear_screen N/A N/A _draw1 N/A N/A _clear_screen N/A N/A _draw2 N/A N/A _clear_screen N/A N/A _draw3 N/A N/A delete_func handle objects N/A N/A N/A delete_func handle N/A N/A N/A gl glFinish N/A N/A VERT 
#version 120

attribute float a_1;
attribute vec2 a_2;
attribute vec3 a_3;
attribute vec4 a_4;

uniform float u_f1;
uniform vec2 u_f2;
uniform vec3 u_f3;
uniform vec4 u_f4;

uniform int u_i1;
uniform ivec2 u_i2;
uniform ivec3 u_i3;
uniform ivec4 u_i4;

uniform mat2 u_m2;
uniform mat3 u_m3;
uniform mat4 u_m4;

varying vec2 v_2;  // tex coords
varying vec4 v_4;  // attr colors

void main()
{   
    float zero = float(u_i1);
    
    // Combine int with float uniforms (i.e. ints are "used")
    float u1 = u_f1 + float(u_i1);
    vec2 u2 = u_f2 + vec2(u_i2);
    vec3 u3 = u_f3 + vec3(u_i3);
    vec4 u4 = u_f4 + vec4(u_i4);
    
    // Set varyings (use every 2D and 4D variable, and u1)
    v_2 = a_1 * a_2 + zero*u_m2 * a_2 * u2 * u1;
    v_4 = u_m4 * a_4 * u4;
    
    // Set position (use 3D variables)
    gl_Position = vec4(u_m3* a_3* u3, 1.0);
}
 N/A FRAG 
#version 120

uniform sampler2D s_1;
uniform int u_i1;
varying vec2 v_2;  // rex coords
varying vec4 v_4;  // attr colors

void main()
{   
    float zero = float(u_i1);
    gl_FragColor = (texture2D(s_1, v_2) + v_4);
}
 N/A texquad 5 N/A im1 N/A N/A np zeros N/A N/A texquad 2 N/A texquad 2 3 N/A np uint8 N/A N/A im1 N/A N/A texquad N/A texquad N/A 0 128 N/A N/A im1 N/A N/A texquad N/A texquad N/A 1 128 N/A N/A im1 N/A N/A texquad N/A texquad N/A 2 128 N/A im2 N/A im1 N/A N/A N/A N/A 0 N/A N/A N/A N/A im2 flags N/A C_CONTIGUOUS False N/A quad N/A N/A np array N/A N/A 0 0 0 N/A -1 0 0 N/A -1 -1 0 N/A 0 0 0 N/A -1 -1 0 N/A 0 -1 0 N/A np float32 N/A N N/A N/A N/A quad shape N/A 0 4 N/A buf3 N/A N/A N/A N/A np row_stack N/A N/A quad N/A 0 0 0 N/A quad N/A 0 1 0 N/A quad N/A 1 1 0 N/A quad N/A 1 0 0 astype N/A np float32 N/A buf2 N/A N/A N/A buf3 1.0 0.5 N/A N/A N/A 2 N/A N/A N/A N/A buf2 flags N/A C_CONTIGUOUS False N/A buf4 N/A N/A np zeros N/A N 5 N/A np float32 N/A N/A buf4 N/A N/A 6 12 N/A 0 0.5 N/A N/A buf4 N/A N/A 12 18 N/A 1 0.5 N/A N/A buf4 N/A N/A 18 24 N/A 2 0.5 N/A N/A buf4 N/A N/A N/A 3 1.0 N/A buf4 N/A buf4 N/A N/A N/A 4 N/A elements N/A N/A N/A N/A N/A np arange 0 N 0.5 astype N/A np uint8 N/A 2 N/A helements None _prepare_vis N/A N/A N/A N/A N/A objects N/A N/A hprog N/A N/A gl glCreateProgram N/A hvert N/A N/A gl glCreateShader N/A gl GL_VERTEX_SHADER N/A hfrag N/A N/A gl glCreateShader N/A gl GL_FRAGMENT_SHADER N/A N/A N/A objects append N/A N/A gl glDeleteProgram hprog N/A N/A N/A objects append N/A N/A gl glDeleteShader hvert N/A N/A N/A objects append N/A N/A gl glDeleteShader hfrag N/A N/A N/A gl glShaderSource hvert VERT N/A N/A N/A gl glShaderSource hfrag FRAG N/A N/A N/A gl glCompileShader hvert N/A N/A N/A gl glCompileShader hfrag N/A N/A assert_equal N/A N/A gl glGetShaderInfoLog hvert N/A N/A assert_equal N/A N/A gl glGetShaderInfoLog hfrag N/A N/A assert_equal N/A N/A gl glGetShaderParameter hvert N/A gl GL_COMPILE_STATUS 1 N/A N/A assert_equal N/A N/A gl glGetShaderParameter hfrag N/A gl GL_COMPILE_STATUS 1 N/A N/A N/A gl glAttachShader hprog hvert N/A N/A N/A gl glAttachShader hprog hfrag N/A N/A N/A gl glDetachShader hprog hvert N/A N/A N/A gl glAttachShader hprog hvert N/A N/A N/A gl glBindAttribLocation hprog 1 a_1 N/A N/A N/A gl glBindAttribLocation hprog 2 a_2 N/A N/A N/A gl glBindAttribLocation hprog 3 a_3 N/A N/A N/A gl glBindAttribLocation hprog 4 a_4 N/A N/A N/A gl glLinkProgram hprog N/A attached_shaders N/A N/A gl glGetAttachedShaders hprog N/A N/A assert_equal N/A set attached_shaders N/A set N/A hvert hfrag N/A N/A assert_equal N/A N/A gl glGetProgramInfoLog hprog N/A N/A assert_equal N/A N/A gl glGetProgramParameter hprog N/A gl GL_LINK_STATUS 1 N/A N/A N/A gl glValidateProgram hprog N/A N/A assert_equal N/A N/A gl glGetProgramParameter hprog N/A gl GL_VALIDATE_STATUS 1 N/A N/A N/A gl glUseProgram hprog N/A N/A assert_equal N/A N/A gl glGetError 0 N/A vert_source N/A N/A gl glGetShaderSource hvert N/A N/A assert_true N/A attribute vec2 a_2; vert_source N/A natt N/A N/A gl glGetProgramParameter hprog N/A gl GL_ACTIVE_ATTRIBUTES N/A nuni N/A N/A gl glGetProgramParameter hprog N/A gl GL_ACTIVE_UNIFORMS N/A N/A assert_equal natt 4 N/A N/A assert_equal nuni N/A N/A N/A 4 4 3 1 N/A names N/A N/A i N/A range natt N/A N/A N/A name count type N/A N/A gl glGetActiveAttrib hprog i N/A N/A names N/A name type N/A N/A assert_equal count 1 N/A i N/A range nuni N/A N/A N/A name count type N/A N/A gl glGetActiveUniform hprog i N/A N/A names N/A name type N/A N/A assert_equal count 1 N/A N/A assert_equal N/A names N/A a_1 N/A gl GL_FLOAT N/A N/A assert_equal N/A names N/A a_2 N/A gl GL_FLOAT_VEC2 N/A N/A assert_equal N/A names N/A a_3 N/A gl GL_FLOAT_VEC3 N/A N/A assert_equal N/A names N/A a_4 N/A gl GL_FLOAT_VEC4 N/A N/A assert_equal N/A names N/A s_1 N/A gl GL_SAMPLER_2D N/A N/A i type N/A enumerate N/A N/A gl GL_FLOAT N/A gl GL_FLOAT_VEC2 N/A gl GL_FLOAT_VEC3 N/A gl GL_FLOAT_VEC4 N/A N/A N/A assert_equal N/A names N/A N/A u_f%i N/A i 1 type N/A N/A i type N/A enumerate N/A N/A gl GL_INT N/A gl GL_INT_VEC2 N/A gl GL_INT_VEC3 N/A gl GL_INT_VEC4 N/A N/A N/A assert_equal N/A names N/A N/A u_i%i N/A i 1 type N/A N/A i type N/A enumerate N/A N/A gl GL_FLOAT_MAT2 N/A gl GL_FLOAT_MAT3 N/A gl GL_FLOAT_MAT4 N/A N/A N/A assert_equal N/A names N/A N/A u_m%i N/A i 2 type N/A N/A assert_equal N/A N/A gl glGetError 0 N/A htex N/A N/A gl glCreateTexture N/A N/A N/A objects append N/A N/A gl glDeleteTexture htex N/A N/A N/A gl glPixelStorei N/A gl GL_UNPACK_ALIGNMENT 1 N/A N/A N/A gl glBindTexture N/A gl GL_TEXTURE_2D htex N/A N/A N/A gl glTexImage2D N/A gl GL_TEXTURE_2D 0 N/A gl GL_LUMINANCE N/A gl GL_LUMINANCE N/A gl GL_UNSIGNED_BYTE im2 N/A N/A N/A gl glTexImage2D N/A gl GL_TEXTURE_2D 0 N/A gl GL_LUMINANCE N/A gl GL_LUMINANCE N/A gl GL_UNSIGNED_BYTE N/A N/A im2 shape N/A 2 N/A N/A N/A gl glTexSubImage2D N/A gl GL_TEXTURE_2D 0 0 0 N/A gl GL_LUMINANCE N/A gl GL_UNSIGNED_BYTE im2 N/A T N/A gl GL_TEXTURE_2D N/A N/A N/A gl glTexParameterf T N/A gl GL_TEXTURE_MIN_FILTER N/A gl GL_LINEAR N/A N/A N/A gl glTexParameteri T N/A gl GL_TEXTURE_MAG_FILTER N/A gl GL_LINEAR N/A N/A N/A gl glTexImage2D N/A gl GL_TEXTURE_2D 0 N/A gl GL_RGB N/A gl GL_RGB N/A gl GL_UNSIGNED_BYTE N/A N/A im1 shape N/A 2 N/A N/A N/A gl glTexSubImage2D N/A gl GL_TEXTURE_2D 0 0 0 N/A gl GL_RGB N/A gl GL_UNSIGNED_BYTE im1 N/A loc N/A N/A gl glGetUniformLocation hprog s_1 N/A unit 0 N/A N/A N/A gl glActiveTexture N/A N/A gl GL_TEXTURE0 unit N/A N/A N/A gl glUniform1i loc unit N/A N/A N/A gl glGenerateMipmap N/A gl GL_TEXTURE_2D N/A minfilt N/A N/A gl glGetTexParameter N/A gl GL_TEXTURE_2D N/A gl GL_TEXTURE_MIN_FILTER N/A N/A assert_equal minfilt N/A gl GL_LINEAR N/A N/A assert_equal N/A N/A gl glGetError 0 N/A hbuf2 N/A N/A gl glCreateBuffer N/A N/A N/A objects append N/A N/A gl glDeleteBuffer hbuf2 N/A N/A N/A gl glBindBuffer N/A gl GL_ARRAY_BUFFER hbuf2 N/A N/A N/A gl glBufferData N/A gl GL_ARRAY_BUFFER N/A buf2 nbytes N/A gl GL_DYNAMIC_DRAW N/A N/A N/A gl glBufferSubData N/A gl GL_ARRAY_BUFFER 0 buf2 N/A loc N/A N/A gl glGetAttribLocation hprog a_2 N/A N/A N/A gl glDisableVertexAttribArray loc N/A N/A N/A gl glEnableVertexAttribArray loc N/A N/A N/A gl glVertexAttribPointer loc 2 N/A gl GL_FLOAT False N/A 2 4 0 N/A size N/A N/A gl glGetBufferParameter N/A gl GL_ARRAY_BUFFER N/A gl GL_BUFFER_SIZE N/A N/A assert_equal size N/A buf2 nbytes N/A stride N/A N/A gl glGetVertexAttrib loc N/A gl GL_VERTEX_ATTRIB_ARRAY_STRIDE N/A N/A assert_equal stride N/A 2 4 N/A offset N/A N/A gl glGetVertexAttribOffset loc N/A gl GL_VERTEX_ATTRIB_ARRAY_POINTER N/A N/A assert_equal offset 0 N/A N/A assert_equal N/A N/A gl glGetError 0 N/A hbuf3 N/A N/A gl glCreateBuffer N/A N/A N/A objects append N/A N/A gl glDeleteBuffer hbuf3 N/A N/A N/A gl glBindBuffer N/A gl GL_ARRAY_BUFFER hbuf3 N/A N/A N/A gl glBufferData N/A gl GL_ARRAY_BUFFER N/A buf3 nbytes N/A gl GL_DYNAMIC_DRAW N/A N/A N/A gl glBufferSubData N/A gl GL_ARRAY_BUFFER 0 buf3 N/A loc N/A N/A gl glGetAttribLocation hprog a_3 N/A N/A N/A gl glEnableVertexAttribArray loc N/A N/A N/A gl glVertexAttribPointer loc 3 N/A gl GL_FLOAT False N/A 3 4 0 N/A N/A assert_equal N/A N/A gl glGetError 0 N/A N/A N/A gl glBindBuffer N/A gl GL_ARRAY_BUFFER 0 N/A loc N/A N/A gl glGetAttribLocation hprog a_4 N/A N/A N/A gl glEnableVertexAttribArray loc N/A N/A N/A gl glVertexAttribPointer loc 4 N/A gl GL_FLOAT False N/A 4 4 buf4 N/A N/A assert_equal N/A N/A gl glGetError 0 N/A helements N/A helements N/A N/A gl glCreateBuffer N/A N/A N/A objects append N/A N/A gl glDeleteBuffer helements N/A N/A N/A gl glBindBuffer N/A gl GL_ELEMENT_ARRAY_BUFFER helements N/A N/A N/A gl glBufferData N/A gl GL_ELEMENT_ARRAY_BUFFER elements N/A gl GL_DYNAMIC_DRAW N/A N/A N/A gl glBufferSubData N/A gl GL_ELEMENT_ARRAY_BUFFER 0 elements N/A N/A N/A gl glBindBuffer N/A gl GL_ELEMENT_ARRAY_BUFFER 0 N/A N/A assert_equal N/A N/A gl glGetError 0 N/A N/A i fun1 fun2 N/A N/A 1 N/A gl glUniform1i N/A gl glUniform1iv N/A 2 N/A gl glUniform2i N/A gl glUniform2iv N/A 3 N/A gl glUniform3i N/A gl glUniform3iv N/A 4 N/A gl glUniform4i N/A gl glUniform4iv N/A N/A name N/A u_i%i i N/A value N/A N/A 0 i N/A loc N/A N/A gl glGetUniformLocation hprog name N/A N/A fun1 loc value N/A N/A fun2 loc 1 value N/A N/A i fun1 fun2 N/A N/A 1 N/A gl glUniform1f N/A gl glUniform1fv N/A 2 N/A gl glUniform2f N/A gl glUniform2fv N/A 3 N/A gl glUniform3f N/A gl glUniform3fv N/A 4 N/A gl glUniform4f N/A gl glUniform4fv N/A N/A name N/A u_f%i i N/A value N/A N/A 1.0 i N/A loc N/A N/A gl glGetUniformLocation hprog name N/A N/A fun1 loc value N/A N/A fun2 loc 1 value N/A m N/A N/A np eye 5 dtype float32 N/A loc N/A N/A gl glGetUniformLocation hprog u_m2 N/A N/A N/A gl glUniformMatrix2fv loc 1 False N/A m N/A N/A 2 N/A 2 N/A loc N/A N/A gl glGetUniformLocation hprog u_m3 N/A m N/A N/A np eye 3 dtype float32 N/A N/A N/A gl glUniformMatrix3fv loc 1 False N/A m N/A N/A 3 N/A 3 N/A loc N/A N/A gl glGetUniformLocation hprog u_m4 N/A m N/A N/A np eye 4 dtype float32 N/A N/A N/A gl glUniformMatrix4fv loc 1 False N/A m N/A N/A 4 N/A 4 N/A loc N/A N/A gl glGetUniformLocation hprog u_i1 N/A N/A assert_equal N/A N/A gl glGetUniform hprog loc 0 N/A loc N/A N/A gl glGetUniformLocation hprog u_i2 N/A N/A assert_equal N/A N/A gl glGetUniform hprog loc N/A 0 0 N/A loc N/A N/A gl glGetUniformLocation hprog u_f2 N/A N/A assert_equal N/A N/A gl glGetUniform hprog loc N/A 1.0 1.0 N/A N/A assert_equal N/A N/A gl glGetError 0 N/A loc N/A N/A gl glGetAttribLocation hprog a_1 N/A N/A N/A gl glVertexAttrib1f loc 1.0 N/A loc N/A N/A gl glGetAttribLocation hprog a_2 N/A N/A N/A gl glVertexAttrib2f loc 1.0 1.0 N/A loc N/A N/A gl glGetAttribLocation hprog a_3 N/A N/A N/A gl glVertexAttrib3f loc 1.0 1.0 1.0 N/A loc N/A N/A gl glGetAttribLocation hprog a_4 N/A N/A N/A gl glVertexAttrib4f loc 1.0 1.0 1.0 1.0 N/A N/A N/A gl glFlush N/A N/A N/A gl glFinish N/A objects N/A _draw1 N/A N/A N/A N/A N/A N/A N/A gl glDrawArrays N/A gl GL_TRIANGLES 0 N N/A N/A N/A gl glFinish N/A N/A _check_result N/A _draw2 N/A N/A N/A N/A N/A N/A N/A gl glBindBuffer N/A gl GL_ELEMENT_ARRAY_BUFFER helements N/A N/A N/A gl glDrawElements N/A gl GL_TRIANGLES N/A elements size N/A gl GL_UNSIGNED_BYTE 0 N/A N/A N/A gl glBindBuffer N/A gl GL_ELEMENT_ARRAY_BUFFER 0 N/A N/A N/A gl glFinish N/A N/A _check_result N/A _draw3 N/A N/A N/A N/A N/A N/A N/A gl glDrawElements N/A gl GL_TRIANGLES N/A elements size N/A gl GL_UNSIGNED_BYTE elements N/A N/A N/A gl glFinish N/A N/A _check_result N/A _check_result N/A N/A assert_result N/A True N/A N/A  Test the color of each quadrant by picking the center pixel 
    of each quadrant and comparing it with the reference color.
     N/A N/A x y w h N/A N/A gl glGetParameter N/A gl GL_VIEWPORT N/A data N/A N/A gl glReadPixels x y w h N/A gl GL_RGB N/A gl GL_UNSIGNED_BYTE N/A im N/A N/A np frombuffer data N/A np uint8 N/A N/A im shape N/A h w 3 N/A pix1 N/A tuple N/A im N/A N/A N/A int N/A N/A 1 h 4 N/A int N/A N/A 1 w 4 N/A pix2 N/A tuple N/A im N/A N/A N/A int N/A N/A 3 h 4 N/A int N/A N/A 1 w 4 N/A pix3 N/A tuple N/A im N/A N/A N/A int N/A N/A 3 h 4 N/A int N/A N/A 3 w 4 N/A pix4 N/A tuple N/A im N/A N/A N/A int N/A N/A 1 h 4 N/A int N/A N/A 3 w 4 N/A assert_result N/A N/A N/A assert_equal pix1 N/A 0 0 0 N/A N/A assert_equal pix2 N/A 255 0 0 N/A N/A assert_equal pix3 N/A 0 255 0 N/A N/A assert_equal pix4 N/A 0 0 255 N/A N/A N/A run_tests_if_main