1 eglBindAPI(api = EGL_OPENGL_ES_API) = EGL_TRUE
2 glClearColor(red = 0.4, green = 0.4, blue = 0.4, alpha = 0)
3 glCreateShader(type = GL_FRAGMENT_SHADER) = 1
4 glShaderSource(shader = 1, count = 1, string = &"varying vec4 v_color;
6 gl_FragColor = v_color;
9 glCompileShader(shader = 1)
10 glGetShaderiv(shader = 1, pname = GL_COMPILE_STATUS, params = &1)
11 glCreateShader(type = GL_VERTEX_SHADER) = 2
12 glShaderSource(shader = 2, count = 1, string = &"uniform mat4 modelviewProjection;
17 gl_Position = modelviewProjection * pos;
21 glCompileShader(shader = 2)
22 glGetShaderiv(shader = 2, pname = GL_COMPILE_STATUS, params = &1)
24 glAttachShader(program = 3, shader = 1)
25 glAttachShader(program = 3, shader = 2)
26 glBindAttribLocation(program = 3, index = 1, name = "pos")
27 glBindAttribLocation(program = 3, index = 0, name = "color")
28 glLinkProgram(program = 3)
29 glGetProgramiv(program = 3, pname = GL_LINK_STATUS, params = &1)
30 glUseProgram(program = 3)
31 glBindAttribLocation(program = 3, index = 0, name = "pos")
32 glBindAttribLocation(program = 3, index = 1, name = "color")
33 glBindAttribLocation(program = 3, index = 0, name = "pos")
34 glBindAttribLocation(program = 3, index = 1, name = "color")
35 glLinkProgram(program = 3)
36 glGetUniformLocation(program = 3, name = "modelviewProjection") = 0
37 glViewport(x = 0, y = 0, width = 300, height = 300)
38 glViewport(x = 0, y = 0, width = 300, height = 300)
39 glViewport(x = 0, y = 0, width = 300, height = 300)
40 glUniformMatrix4fv(location = 0, count = 1, transpose = false, value = {0.5, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 1})
41 glClear(mask = GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT)
42 glEnableVertexAttribArray(index = 0)
43 glEnableVertexAttribArray(index = 1)
44 glVertexAttribPointer(index = 0, size = 2, type = GL_FLOAT, normalized = false, stride = 0, pointer = blob(24))
45 glVertexAttribPointer(index = 1, size = 3, type = GL_FLOAT, normalized = false, stride = 0, pointer = blob(36))
46 glDrawArrays(mode = GL_TRIANGLES, first = 0, count = 3)
47 glDisableVertexAttribArray(index = 0)
48 glDisableVertexAttribArray(index = 1)