Skip to content

Instantly share code, notes, and snippets.

@payload
Last active August 29, 2015 14:04
Show Gist options
  • Save payload/7ee23d58252d22d5ef99 to your computer and use it in GitHub Desktop.
Save payload/7ee23d58252d22d5ef99 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from libavg import avg, app, player
class RemoteTestDiv(app.MainDiv):
def onInit(self):
self.canvas1 = player.createCanvas(id="1", size=(400,300))
self.canvas2 = player.createCanvas(id="2", size=(400,300))
self.words = [
avg.WordsNode(pos=(100,100), text="x",
parent=self.canvas1.getRootNode()),
avg.WordsNode(pos=(200,100), text="y",
parent=self.canvas1.getRootNode())]
avg.ImageNode(href="canvas:1", parent=self, pos=( 0,0))
avg.ImageNode(href="canvas:2", parent=self, pos=(100,0))
avg.ImageNode(href="rgb24-64x64.png", parent=self.canvas1.getRootNode())
avg.ImageNode(href="rgb24-64x64.png", parent=self.canvas2.getRootNode())
def onFrame(self):
pass
player.setFramerate(60)
app.App().run(RemoteTestDiv(), app_resolution='400x300')
0 eglGetDisplay(display_id = 0x19628d0) = 0x1b1d300
1 eglInitialize(dpy = 0x1b1d300, major = NULL, minor = NULL) = EGL_TRUE
2 eglChooseConfig(dpy = 0x1b1d300, attrib_list = {EGL_RED_SIZE, 1, EGL_GREEN_SIZE, 1, EGL_BLUE_SIZE, 1, EGL_DEPTH_SIZE, 0, EGL_STENCIL_SIZE, 1, EGL_ALPHA_SIZE, 0, EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, EGL_NONE}, configs = &0x1b36450, config_size = 1, num_config = &1) = EGL_TRUE
4 eglBindAPI(api = EGL_OPENGL_ES_API) = EGL_TRUE
5 eglCreateWindowSurface(dpy = 0x1b1d300, config = 0x1b36450, win = 0x4a00013, attrib_list = {}) = 0x1b36ba0
6 eglCreateContext(dpy = 0x1b1d300, config = 0x1b36450, share_context = NULL, attrib_list = {EGL_CONTEXT_MAJOR_VERSION, 2, EGL_NONE}) = 0x1b37570
7 eglMakeCurrent(dpy = 0x1b1d300, draw = 0x1b36ba0, read = 0x1b36ba0, ctx = 0x1b37570) = EGL_TRUE
8 glBlendEquation(mode = GL_FUNC_ADD)
9 glBlendFuncSeparate(sfactorRGB = GL_SRC_ALPHA, dfactorRGB = GL_ONE_MINUS_SRC_ALPHA, sfactorAlpha = GL_ONE, dfactorAlpha = GL_ONE_MINUS_SRC_ALPHA)
11 glEnable(cap = GL_BLEND)
12 glDisable(cap = GL_DEPTH_TEST)
13 glEnable(cap = GL_STENCIL_TEST)
14 eglMakeCurrent(dpy = 0x1b1d300, draw = 0x1b36ba0, read = 0x1b36ba0, ctx = 0x1b37570) = EGL_TRUE
15 glViewport(x = 0, y = 0, width = 400, height = 300)
16 glScissor(x = 0, y = 0, width = 400, height = 300)
17 glGetIntegerv(pname = GL_MAX_TEXTURE_SIZE, params = &8192)
18 eglMakeCurrent(dpy = 0x1b1d300, draw = 0x1b36ba0, read = 0x1b36ba0, ctx = 0x1b37570) = EGL_TRUE
19 glGenBuffers(n = 1, buffer = &1)
20 glGenBuffers(n = 1, buffer = &2)
21 glActiveTexture(texture = GL_TEXTURE0)
22 glBindTexture(target = GL_TEXTURE_2D, texture = 10000001)
23 glTexParameterf(target = GL_TEXTURE_2D, pname = GL_TEXTURE_MAG_FILTER, param = GL_LINEAR)
24 glTexParameteri(target = GL_TEXTURE_2D, pname = GL_TEXTURE_WRAP_S, param = GL_CLAMP_TO_EDGE)
25 glTexParameteri(target = GL_TEXTURE_2D, pname = GL_TEXTURE_WRAP_T, param = GL_CLAMP_TO_EDGE)
26 glTexImage2D(target = GL_TEXTURE_2D, level = 0, internalformat = GL_ALPHA, width = 61, height = 10, border = 0, format = GL_ALPHA, type = GL_UNSIGNED_BYTE, pixels = NULL)
27 glTexParameterf(target = GL_TEXTURE_2D, pname = GL_TEXTURE_MIN_FILTER, param = GL_LINEAR)
28 glTexSubImage2D(target = GL_TEXTURE_2D, level = 0, xoffset = 0, yoffset = 0, width = 61, height = 10, format = GL_ALPHA, type = GL_UNSIGNED_BYTE, pixels = blob(637))
29 glBindFramebuffer(target = GL_FRAMEBUFFER, framebuffer = 0)
30 glViewport(x = 0, y = 0, width = 400, height = 300)
31 glBindBuffer(target = GL_ARRAY_BUFFER, buffer = 1)
32 glBufferData(target = GL_ARRAY_BUFFER, size = 288, data = blob(288), usage = GL_STREAM_DRAW)
33 glBindBuffer(target = GL_ELEMENT_ARRAY_BUFFER, buffer = 2)
34 glBufferData(target = GL_ELEMENT_ARRAY_BUFFER, size = 72, data = blob(72), usage = GL_STREAM_DRAW)
35 glClearColor(red = 0, green = 0, blue = 0, alpha = 1)
36 glStencilMask(mask = 4294967295)
37 glClearStencil(s = 0)
38 glClear(mask = GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT | GL_COLOR_BUFFER_BIT)
39 glStencilMask(mask = 0)
40 glBindBuffer(target = GL_ARRAY_BUFFER, buffer = 1)
41 glBindBuffer(target = GL_ELEMENT_ARRAY_BUFFER, buffer = 2)
42 glVertexAttribPointer(index = 0, size = 2, type = GL_SHORT, normalized = GL_FALSE, stride = 16, pointer = NULL)
43 glVertexAttribPointer(index = 1, size = 2, type = GL_FLOAT, normalized = GL_FALSE, stride = 16, pointer = 0x4)
44 glVertexAttribPointer(index = 2, size = 4, type = GL_UNSIGNED_BYTE, normalized = GL_TRUE, stride = 16, pointer = 0xc)
45 glEnableVertexAttribArray(index = 0)
46 glEnableVertexAttribArray(index = 1)
47 glEnableVertexAttribArray(index = 2)
48 glGenBuffers(n = 1, buffer = &4)
49 glGenBuffers(n = 1, buffer = &5)
50 glCreateProgram() = 4
51 glBindAttribLocation(program = 4, index = 0, name = "a_TexCoord")
52 glBindAttribLocation(program = 4, index = 2, name = "a_Color")
53 glBindAttribLocation(program = 4, index = 1, name = "a_Pos")
54 glCreateShader(type = GL_VERTEX_SHADER) = 5
55 glShaderSource(shader = 5, count = 2, string = {"#define ENABLE_YUV_CONVERSION
precision mediump float;
", "#line 0
//
// libavg - Media Playback Engine.
// Copyright (C) 2003-2011 Ulrich von Zadow
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// Current versions can be found at www.libavg.de
//
uniform mat4 transform;
attribute vec4 a_Color;
attribute vec2 a_TexCoord;
attribute vec2 a_Pos;
varying vec2 v_TexCoord;
varying vec4 v_Color;
void main(void)
{
gl_Position = transform * vec4(a_Pos, 0, 1);
v_TexCoord = a_TexCoord/4096.;
v_Color = a_Color;
}
"}, length = NULL)
56 glCompileShader(shader = 5)
57 glAttachShader(program = 4, shader = 5)
58 glCreateShader(type = GL_FRAGMENT_SHADER) = 6
59 glShaderSource(shader = 6, count = 2, string = {"#define ENABLE_YUV_CONVERSION
#extension GL_OES_standard_derivatives : enable
precision mediump float;
", "#line 0
//
// libavg - Media Playback Engine.
// Copyright (C) 2003-2011 Ulrich von Zadow
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// Current versions can be found at www.libavg.de
//
uniform sampler2D u_Texture;
uniform sampler2D u_CBTexture;
uniform sampler2D u_CRTexture;
uniform sampler2D u_ATexture;
uniform sampler2D u_MaskTexture;
uniform int u_ColorModel; // 0=rgb, 1=yuv, 2=alpha, 3=yuva
uniform float u_Alpha;
uniform vec4 u_ColorCoeff0;
uniform vec4 u_ColorCoeff1;
uniform vec4 u_ColorCoeff2;
uniform vec4 u_ColorCoeff3;
uniform bool u_bUseColorCoeff;
uniform vec4 u_Gamma;
uniform bool u_bPremultipliedAlpha;
uniform bool u_bUseMask;
uniform vec2 u_MaskPos;
uniform vec2 u_MaskSize;
#ifndef FRAGMENT_ONLY
varying vec2 v_TexCoord;
varying vec4 v_Color;
#endif
vec4 convertYCbCr(mat4 colorCoeff, vec4 tex)
{
vec4 yuv;
yuv = vec4(tex.r,
texture2D(u_CBTexture, v_TexCoord).r,
texture2D(u_CRTexture, v_TexCoord).r,
1.0);
vec4 rgb;
rgb = colorCoeff*yuv;
return vec4(rgb.rgb, u_Alpha);
}
void main(void)
{
vec4 rgba;
mat4 colorCoeff;
colorCoeff[0] = u_ColorCoeff0;
colorCoeff[1] = u_ColorCoeff1;
colorCoeff[2] = u_ColorCoeff2;
colorCoeff[3] = u_ColorCoeff3;
vec4 tex = texture2D(u_Texture, v_TexCoord);
if (u_ColorModel == 0 || u_ColorModel == 2) {
float a;
if (u_ColorModel == 0) { // 0 = rgb
rgba = tex;
a = u_Alpha;
} else { // 2 = alpha
rgba = v_Color;
a = tex.a*u_Alpha;
}
if (u_bUseColorCoeff) {
rgba = colorCoeff*rgba;
}
rgba.a *= a;
#ifdef ENABLE_YUV_CONVERSION
} else if (u_ColorModel == 1) { // yuv
rgba = convertYCbCr(colorCoeff, tex);
} else if (u_ColorModel == 3) { // yuva
rgba = convertYCbCr(colorCoeff, tex);
rgba.a *= texture2D(u_ATexture, v_TexCoord).r;
#endif
} else {
rgba = vec4(1,1,1,1);
}
rgba = max(rgba, vec4(0.,0.,0.,0.));
rgba = pow(rgba, u_Gamma);
if (u_bUseMask) {
float mask = texture2D(u_MaskTexture, (v_TexCoord/u_MaskSize)-u_MaskPos).r;
if (u_bPremultipliedAlpha) {
rgba.rgb *= mask;
}
rgba.a *= mask;
}
gl_FragColor = rgba;
}
"}, length = NULL)
60 glCompileShader(shader = 6)
61 glAttachShader(program = 4, shader = 6)
62 glBindAttribLocation(program = 4, index = 2, name = "a_Color")
63 glBindAttribLocation(program = 4, index = 0, name = "a_TexCoord")
64 glBindAttribLocation(program = 4, index = 1, name = "a_Pos")
65 glLinkProgram(program = 4)
66 glGetProgramiv(program = 4, pname = GL_LINK_STATUS, params = &1)
67 glGetShaderiv(shader = 5, pname = GL_INFO_LOG_LENGTH, params = &1)
68 glGetShaderiv(shader = 6, pname = GL_INFO_LOG_LENGTH, params = &1)
69 glGetProgramiv(program = 4, pname = GL_INFO_LOG_LENGTH, params = &1)
70 glGetUniformLocation(program = 4, name = "transform") = 0
71 glGetUniformLocation(program = 4, name = "u_ColorModel") = 6
72 glGetUniformLocation(program = 4, name = "u_Alpha") = 7
73 glGetUniformLocation(program = 4, name = "u_ColorCoeff0") = 8
74 glGetUniformLocation(program = 4, name = "u_ColorCoeff1") = 9
75 glGetUniformLocation(program = 4, name = "u_ColorCoeff2") = 10
76 glGetUniformLocation(program = 4, name = "u_ColorCoeff3") = 11
77 glGetUniformLocation(program = 4, name = "u_Gamma") = 13
78 glGetUniformLocation(program = 4, name = "u_bUseColorCoeff") = 12
79 glGetUniformLocation(program = 4, name = "u_bPremultipliedAlpha") = 14
80 glGetUniformLocation(program = 4, name = "u_bUseMask") = 15
81 glGetUniformLocation(program = 4, name = "u_MaskPos") = 16
82 glGetUniformLocation(program = 4, name = "u_MaskSize") = 17
83 glUseProgram(program = 4)
84 glGetUniformLocation(program = 4, name = "u_Texture") = 1
85 glUniform1i(location = 1, v0 = 0)
86 glGetUniformLocation(program = 4, name = "u_CBTexture") = 2
87 glUniform1i(location = 2, v0 = 1)
88 glGetUniformLocation(program = 4, name = "u_CRTexture") = 3
89 glUniform1i(location = 3, v0 = 2)
90 glGetUniformLocation(program = 4, name = "u_ATexture") = 4
91 glUniform1i(location = 4, v0 = 3)
92 glGetUniformLocation(program = 4, name = "u_MaskTexture") = 5
93 glUniform1i(location = 5, v0 = 4)
94 glCreateProgram() = 7
95 glBindAttribLocation(program = 7, index = 0, name = "a_TexCoord")
96 glBindAttribLocation(program = 7, index = 2, name = "a_Color")
97 glBindAttribLocation(program = 7, index = 1, name = "a_Pos")
98 glCreateShader(type = GL_VERTEX_SHADER) = 8
99 glShaderSource(shader = 8, count = 2, string = {"#define ENABLE_YUV_CONVERSION
precision mediump float;
", "#line 0
//
// libavg - Media Playback Engine.
// Copyright (C) 2003-2011 Ulrich von Zadow
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// Current versions can be found at www.libavg.de
//
uniform mat4 transform;
attribute vec4 a_Color;
attribute vec2 a_TexCoord;
attribute vec2 a_Pos;
varying vec2 v_TexCoord;
varying vec4 v_Color;
void main(void)
{
gl_Position = transform * vec4(a_Pos, 0, 1);
v_TexCoord = a_TexCoord/4096.;
v_Color = a_Color;
}
"}, length = NULL)
100 glCompileShader(shader = 8)
101 glAttachShader(program = 7, shader = 8)
102 glCreateShader(type = GL_FRAGMENT_SHADER) = 9
103 glShaderSource(shader = 9, count = 2, string = {"#define ENABLE_YUV_CONVERSION
#extension GL_OES_standard_derivatives : enable
precision mediump float;
", "#line 0
//
// libavg - Media Playback Engine.
// Copyright (C) 2003-2011 Ulrich von Zadow
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// Current versions can be found at www.libavg.de
//
uniform sampler2D u_Texture;
uniform float u_Alpha;
#ifndef FRAGMENT_ONLY
varying vec2 v_TexCoord;
varying vec4 v_Color;
#endif
// A minimal shader for use on low-end systems where the standard shader hurts
// performance.
void main(void)
{
vec4 rgba = texture2D(u_Texture, v_TexCoord);
rgba.a *= u_Alpha;
gl_FragColor = rgba;
}
"}, length = NULL)
104 glCompileShader(shader = 9)
105 glAttachShader(program = 7, shader = 9)
106 glBindAttribLocation(program = 7, index = 0, name = "a_TexCoord")
107 glBindAttribLocation(program = 7, index = 1, name = "a_Pos")
108 glLinkProgram(program = 7)
109 glGetProgramiv(program = 7, pname = GL_LINK_STATUS, params = &1)
110 glGetShaderiv(shader = 8, pname = GL_INFO_LOG_LENGTH, params = &1)
111 glGetShaderiv(shader = 9, pname = GL_INFO_LOG_LENGTH, params = &1)
112 glGetProgramiv(program = 7, pname = GL_INFO_LOG_LENGTH, params = &1)
113 glGetUniformLocation(program = 7, name = "transform") = 0
114 glUseProgram(program = 7)
115 glGetUniformLocation(program = 7, name = "u_Texture") = 1
116 glUniform1i(location = 1, v0 = 0)
117 glGetUniformLocation(program = 7, name = "u_Alpha") = 2
118 glActiveTexture(texture = GL_TEXTURE0)
119 glBindTexture(target = GL_TEXTURE_2D, texture = 10000002)
120 glTexParameterf(target = GL_TEXTURE_2D, pname = GL_TEXTURE_MAG_FILTER, param = GL_LINEAR)
121 glTexParameteri(target = GL_TEXTURE_2D, pname = GL_TEXTURE_WRAP_S, param = GL_CLAMP_TO_EDGE)
122 glTexParameteri(target = GL_TEXTURE_2D, pname = GL_TEXTURE_WRAP_T, param = GL_CLAMP_TO_EDGE)
123 glTexImage2D(target = GL_TEXTURE_2D, level = 0, internalformat = GL_LUMINANCE, width = 1, height = 1, border = 0, format = GL_LUMINANCE, type = GL_UNSIGNED_BYTE, pixels = NULL)
124 glTexParameterf(target = GL_TEXTURE_2D, pname = GL_TEXTURE_MIN_FILTER, param = GL_LINEAR)
125 glTexSubImage2D(target = GL_TEXTURE_2D, level = 0, xoffset = 0, yoffset = 0, width = 1, height = 1, format = GL_LUMINANCE, type = GL_UNSIGNED_BYTE, pixels = blob(1))
126 glUseProgram(program = 4)
127 glUniformMatrix4fv(location = 0, count = 1, transpose = GL_FALSE, value = {0.005, 0, 0, 0, 0, -0.006666667, 0, 0, 0, 0, -1, 0, -1, 1, 0, 1})
128 glUniform1i(location = 6, v0 = 2)
129 glUniform1f(location = 7, v0 = 0.5)
130 glUniform1i(location = 12, v0 = 0)
131 glUniform4f(location = 8, v0 = 1, v1 = 0, v2 = 0, v3 = 0)
132 glUniform4f(location = 9, v0 = 0, v1 = 1, v2 = 0, v3 = 0)
133 glUniform4f(location = 10, v0 = 0, v1 = 0, v2 = 1, v3 = 0)
134 glUniform4f(location = 11, v0 = 0, v1 = 0, v2 = 0, v3 = 1)
135 glUniform4f(location = 13, v0 = 1, v1 = 1, v2 = 1, v3 = 1)
136 glUniform1i(location = 14, v0 = 0)
137 glUniform1i(location = 15, v0 = 0)
139 eglSwapBuffers(dpy = 0x1b1d300, surface = 0x1b36ba0) = EGL_TRUE
140 eglMakeCurrent(dpy = 0x1b1d300, draw = 0x1b36ba0, read = 0x1b36ba0, ctx = 0x1b37570) = EGL_TRUE
141 glActiveTexture(texture = GL_TEXTURE0)
142 glBindTexture(target = GL_TEXTURE_2D, texture = 10000003)
143 glTexParameterf(target = GL_TEXTURE_2D, pname = GL_TEXTURE_MAG_FILTER, param = GL_LINEAR)
144 glTexParameteri(target = GL_TEXTURE_2D, pname = GL_TEXTURE_WRAP_S, param = GL_CLAMP_TO_EDGE)
145 glTexParameteri(target = GL_TEXTURE_2D, pname = GL_TEXTURE_WRAP_T, param = GL_CLAMP_TO_EDGE)
146 glTexImage2D(target = GL_TEXTURE_2D, level = 0, internalformat = GL_RGBA, width = 400, height = 300, border = 0, format = GL_RGBA, type = GL_UNSIGNED_BYTE, pixels = NULL)
147 glTexParameterf(target = GL_TEXTURE_2D, pname = GL_TEXTURE_MIN_FILTER, param = GL_LINEAR)
148 glGenFramebuffers(n = 1, framebuffers = &1)
149 glBindFramebuffer(target = GL_FRAMEBUFFER, framebuffer = 1)
150 glFramebufferTexture2D(target = GL_FRAMEBUFFER, attachment = GL_COLOR_ATTACHMENT0, textarget = GL_TEXTURE_2D, texture = 10000003, level = 0)
151 glGenRenderbuffers(n = 1, renderbuffers = &1)
152 glBindRenderbuffer(target = GL_RENDERBUFFER, renderbuffer = 1)
153 glRenderbufferStorage(target = GL_RENDERBUFFER, internalformat = GL_STENCIL_INDEX8, width = 400, height = 300)
154 glFramebufferRenderbuffer(target = GL_FRAMEBUFFER, attachment = GL_STENCIL_ATTACHMENT, renderbuffertarget = GL_RENDERBUFFER, renderbuffer = 1)
155 glCheckFramebufferStatus(target = GL_FRAMEBUFFER) = GL_FRAMEBUFFER_COMPLETE
156 glBindFramebuffer(target = GL_FRAMEBUFFER, framebuffer = 0)
157 eglMakeCurrent(dpy = 0x1b1d300, draw = 0x1b36ba0, read = 0x1b36ba0, ctx = 0x1b37570) = EGL_TRUE
158 eglMakeCurrent(dpy = 0x1b1d300, draw = 0x1b36ba0, read = 0x1b36ba0, ctx = 0x1b37570) = EGL_TRUE
159 glGenBuffers(n = 1, buffer = &6)
160 glGenBuffers(n = 1, buffer = &7)
161 glActiveTexture(texture = GL_TEXTURE0)
162 glBindTexture(target = GL_TEXTURE_2D, texture = 10000004)
163 glTexParameterf(target = GL_TEXTURE_2D, pname = GL_TEXTURE_MAG_FILTER, param = GL_LINEAR)
164 glTexParameteri(target = GL_TEXTURE_2D, pname = GL_TEXTURE_WRAP_S, param = GL_CLAMP_TO_EDGE)
165 glTexParameteri(target = GL_TEXTURE_2D, pname = GL_TEXTURE_WRAP_T, param = GL_CLAMP_TO_EDGE)
166 glTexImage2D(target = GL_TEXTURE_2D, level = 0, internalformat = GL_RGBA, width = 400, height = 300, border = 0, format = GL_RGBA, type = GL_UNSIGNED_BYTE, pixels = NULL)
167 glTexParameterf(target = GL_TEXTURE_2D, pname = GL_TEXTURE_MIN_FILTER, param = GL_LINEAR)
168 glGenFramebuffers(n = 1, framebuffers = &2)
169 glBindFramebuffer(target = GL_FRAMEBUFFER, framebuffer = 2)
170 glFramebufferTexture2D(target = GL_FRAMEBUFFER, attachment = GL_COLOR_ATTACHMENT0, textarget = GL_TEXTURE_2D, texture = 10000004, level = 0)
171 glGenRenderbuffers(n = 1, renderbuffers = &2)
172 glBindRenderbuffer(target = GL_RENDERBUFFER, renderbuffer = 2)
173 glRenderbufferStorage(target = GL_RENDERBUFFER, internalformat = GL_STENCIL_INDEX8, width = 400, height = 300)
174 glFramebufferRenderbuffer(target = GL_FRAMEBUFFER, attachment = GL_STENCIL_ATTACHMENT, renderbuffertarget = GL_RENDERBUFFER, renderbuffer = 2)
175 glCheckFramebufferStatus(target = GL_FRAMEBUFFER) = GL_FRAMEBUFFER_COMPLETE
176 glBindFramebuffer(target = GL_FRAMEBUFFER, framebuffer = 0)
177 eglMakeCurrent(dpy = 0x1b1d300, draw = 0x1b36ba0, read = 0x1b36ba0, ctx = 0x1b37570) = EGL_TRUE
178 eglMakeCurrent(dpy = 0x1b1d300, draw = 0x1b36ba0, read = 0x1b36ba0, ctx = 0x1b37570) = EGL_TRUE
179 eglMakeCurrent(dpy = 0x1b1d300, draw = 0x1b36ba0, read = 0x1b36ba0, ctx = 0x1b37570) = EGL_TRUE
180 glGenBuffers(n = 1, buffer = &8)
181 glGenBuffers(n = 1, buffer = &9)
182 glActiveTexture(texture = GL_TEXTURE0)
183 glBindTexture(target = GL_TEXTURE_2D, texture = 10000005)
184 glTexParameterf(target = GL_TEXTURE_2D, pname = GL_TEXTURE_MAG_FILTER, param = GL_LINEAR)
185 glTexParameteri(target = GL_TEXTURE_2D, pname = GL_TEXTURE_WRAP_S, param = GL_CLAMP_TO_EDGE)
186 glTexParameteri(target = GL_TEXTURE_2D, pname = GL_TEXTURE_WRAP_T, param = GL_CLAMP_TO_EDGE)
187 glTexImage2D(target = GL_TEXTURE_2D, level = 0, internalformat = GL_RGBA, width = 64, height = 64, border = 0, format = GL_RGBA, type = GL_UNSIGNED_BYTE, pixels = NULL)
188 glTexParameterf(target = GL_TEXTURE_2D, pname = GL_TEXTURE_MIN_FILTER, param = GL_LINEAR)
189 glActiveTexture(texture = GL_TEXTURE0)
190 glBindTexture(target = GL_TEXTURE_2D, texture = 10000006)
191 glTexParameterf(target = GL_TEXTURE_2D, pname = GL_TEXTURE_MAG_FILTER, param = GL_LINEAR)
192 glTexParameteri(target = GL_TEXTURE_2D, pname = GL_TEXTURE_WRAP_S, param = GL_CLAMP_TO_EDGE)
193 glTexParameteri(target = GL_TEXTURE_2D, pname = GL_TEXTURE_WRAP_T, param = GL_CLAMP_TO_EDGE)
194 glTexImage2D(target = GL_TEXTURE_2D, level = 0, internalformat = GL_RGBA, width = 64, height = 64, border = 0, format = GL_RGBA, type = GL_UNSIGNED_BYTE, pixels = NULL)
195 glTexParameterf(target = GL_TEXTURE_2D, pname = GL_TEXTURE_MIN_FILTER, param = GL_LINEAR)
196 glActiveTexture(texture = GL_TEXTURE0)
197 glBindTexture(target = GL_TEXTURE_2D, texture = 10000007)
198 glTexParameterf(target = GL_TEXTURE_2D, pname = GL_TEXTURE_MAG_FILTER, param = GL_LINEAR)
199 glTexParameteri(target = GL_TEXTURE_2D, pname = GL_TEXTURE_WRAP_S, param = GL_CLAMP_TO_EDGE)
200 glTexParameteri(target = GL_TEXTURE_2D, pname = GL_TEXTURE_WRAP_T, param = GL_CLAMP_TO_EDGE)
201 glTexImage2D(target = GL_TEXTURE_2D, level = 0, internalformat = GL_ALPHA, width = 9, height = 9, border = 0, format = GL_ALPHA, type = GL_UNSIGNED_BYTE, pixels = NULL)
202 glTexParameterf(target = GL_TEXTURE_2D, pname = GL_TEXTURE_MIN_FILTER, param = GL_LINEAR)
203 glActiveTexture(texture = GL_TEXTURE0)
204 glBindTexture(target = GL_TEXTURE_2D, texture = 10000008)
205 glTexParameterf(target = GL_TEXTURE_2D, pname = GL_TEXTURE_MAG_FILTER, param = GL_LINEAR)
206 glTexParameteri(target = GL_TEXTURE_2D, pname = GL_TEXTURE_WRAP_S, param = GL_CLAMP_TO_EDGE)
207 glTexParameteri(target = GL_TEXTURE_2D, pname = GL_TEXTURE_WRAP_T, param = GL_CLAMP_TO_EDGE)
208 glTexImage2D(target = GL_TEXTURE_2D, level = 0, internalformat = GL_ALPHA, width = 9, height = 12, border = 0, format = GL_ALPHA, type = GL_UNSIGNED_BYTE, pixels = NULL)
209 glTexParameterf(target = GL_TEXTURE_2D, pname = GL_TEXTURE_MIN_FILTER, param = GL_LINEAR)
210 glActiveTexture(texture = GL_TEXTURE0)
211 glBindTexture(target = GL_TEXTURE_2D, texture = 10000007)
212 glTexSubImage2D(target = GL_TEXTURE_2D, level = 0, xoffset = 0, yoffset = 0, width = 9, height = 9, format = GL_ALPHA, type = GL_UNSIGNED_BYTE, pixels = blob(105))
213 glActiveTexture(texture = GL_TEXTURE0)
214 glBindTexture(target = GL_TEXTURE_2D, texture = 10000008)
215 glTexSubImage2D(target = GL_TEXTURE_2D, level = 0, xoffset = 0, yoffset = 0, width = 9, height = 12, format = GL_ALPHA, type = GL_UNSIGNED_BYTE, pixels = blob(141))
216 glActiveTexture(texture = GL_TEXTURE0)
217 glBindTexture(target = GL_TEXTURE_2D, texture = 10000006)
218 glTexSubImage2D(target = GL_TEXTURE_2D, level = 0, xoffset = 0, yoffset = 0, width = 64, height = 64, format = GL_RGBA, type = GL_UNSIGNED_BYTE, pixels = blob(16384))
219 glActiveTexture(texture = GL_TEXTURE0)
220 glBindTexture(target = GL_TEXTURE_2D, texture = 10000005)
221 glTexSubImage2D(target = GL_TEXTURE_2D, level = 0, xoffset = 0, yoffset = 0, width = 64, height = 64, format = GL_RGBA, type = GL_UNSIGNED_BYTE, pixels = blob(16384))
222 glBindFramebuffer(target = GL_FRAMEBUFFER, framebuffer = 1)
223 glCheckFramebufferStatus(target = GL_FRAMEBUFFER) = GL_FRAMEBUFFER_COMPLETE
224 glViewport(x = 0, y = 0, width = 400, height = 300)
225 glBindBuffer(target = GL_ARRAY_BUFFER, buffer = 6)
226 glBufferData(target = GL_ARRAY_BUFFER, size = 192, data = blob(192), usage = GL_STREAM_DRAW)
227 glBindBuffer(target = GL_ELEMENT_ARRAY_BUFFER, buffer = 7)
228 glBufferData(target = GL_ELEMENT_ARRAY_BUFFER, size = 36, data = blob(36), usage = GL_STREAM_DRAW)
229 glClearColor(red = 0, green = 0, blue = 0, alpha = 0)
230 glStencilMask(mask = 4294967295)
231 glClearStencil(s = 0)
232 glClear(mask = GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT | GL_COLOR_BUFFER_BIT)
233 glStencilMask(mask = 0)
234 glBindBuffer(target = GL_ARRAY_BUFFER, buffer = 6)
235 glBindBuffer(target = GL_ELEMENT_ARRAY_BUFFER, buffer = 7)
236 glVertexAttribPointer(index = 0, size = 2, type = GL_SHORT, normalized = GL_FALSE, stride = 16, pointer = NULL)
237 glVertexAttribPointer(index = 1, size = 2, type = GL_FLOAT, normalized = GL_FALSE, stride = 16, pointer = 0x4)
238 glVertexAttribPointer(index = 2, size = 4, type = GL_UNSIGNED_BYTE, normalized = GL_TRUE, stride = 16, pointer = 0xc)
239 glEnableVertexAttribArray(index = 0)
240 glEnableVertexAttribArray(index = 1)
241 glEnableVertexAttribArray(index = 2)
242 glBlendColor(red = 1, green = 1, blue = 1, alpha = 1)
243 glActiveTexture(texture = GL_TEXTURE0)
244 glBindTexture(target = GL_TEXTURE_2D, texture = 10000007)
245 glUniform1f(location = 7, v0 = 1)
246 glUniformMatrix4fv(location = 0, count = 1, transpose = GL_FALSE, value = {0.045, 0, 0, 0, 0, 0.06, 0, 0, 0, 0, -1, 0, -0.5, -0.3, 0, 1})
247 glDrawElements(mode = GL_TRIANGLES, count = 6, type = GL_UNSIGNED_SHORT, indices = NULL)
248 glActiveTexture(texture = GL_TEXTURE0)
249 glBindTexture(target = GL_TEXTURE_2D, texture = 10000008)
250 glUniformMatrix4fv(location = 0, count = 1, transpose = GL_FALSE, value = {0.045, 0, 0, 0, 0, 0.08, 0, 0, 0, 0, -1, 0, 0, -0.3, 0, 1})
251 glDrawElements(mode = GL_TRIANGLES, count = 6, type = GL_UNSIGNED_SHORT, indices = 0xc)
252 glActiveTexture(texture = GL_TEXTURE0)
253 glBindTexture(target = GL_TEXTURE_2D, texture = 10000005)
254 glUseProgram(program = 7)
255 glUniformMatrix4fv(location = 0, count = 1, transpose = GL_FALSE, value = {0.045, 0, 0, 0, 0, 0.08, 0, 0, 0, 0, -1, 0, 0, -0.3, 0, 1})
256 glUniform1f(location = 2, v0 = 1)
257 glUniformMatrix4fv(location = 0, count = 1, transpose = GL_FALSE, value = {0.32, 0, 0, 0, 0, 0.4266667, 0, 0, 0, 0, -1, 0, -1, -1, 0, 1})
258 glDrawElements(mode = GL_TRIANGLES, count = 6, type = GL_UNSIGNED_SHORT, indices = 0x18)
259 glGenBuffers(n = 1, buffer = &10)
260 glGenBuffers(n = 1, buffer = &11)
261 glActiveTexture(texture = GL_TEXTURE0)
262 glBindTexture(target = GL_TEXTURE_2D, texture = 10000002)
263 glUseProgram(program = 4)
264 glUniformMatrix4fv(location = 0, count = 1, transpose = GL_FALSE, value = {0.005, 0, 0, 0, 0, 0.006666667, 0, 0, 0, 0, -1, 0, -1, -1, 0, 1})
265 glUniform1f(location = 7, v0 = 0.5)
266 eglMakeCurrent(dpy = 0x1b1d300, draw = 0x1b36ba0, read = 0x1b36ba0, ctx = 0x1b37570) = EGL_TRUE
267 eglMakeCurrent(dpy = 0x1b1d300, draw = 0x1b36ba0, read = 0x1b36ba0, ctx = 0x1b37570) = EGL_TRUE
268 glBindFramebuffer(target = GL_FRAMEBUFFER, framebuffer = 2)
269 glCheckFramebufferStatus(target = GL_FRAMEBUFFER) = GL_FRAMEBUFFER_COMPLETE
270 glViewport(x = 0, y = 0, width = 400, height = 300)
271 glBindBuffer(target = GL_ARRAY_BUFFER, buffer = 8)
272 glBufferData(target = GL_ARRAY_BUFFER, size = 64, data = blob(64), usage = GL_STREAM_DRAW)
273 glBindBuffer(target = GL_ELEMENT_ARRAY_BUFFER, buffer = 9)
274 glBufferData(target = GL_ELEMENT_ARRAY_BUFFER, size = 12, data = blob(12), usage = GL_STREAM_DRAW)
275 glClearColor(red = 0, green = 0, blue = 0, alpha = 0)
276 glStencilMask(mask = 4294967295)
277 glClearStencil(s = 0)
278 glClear(mask = GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT | GL_COLOR_BUFFER_BIT)
279 glStencilMask(mask = 0)
280 glBindBuffer(target = GL_ARRAY_BUFFER, buffer = 8)
281 glBindBuffer(target = GL_ELEMENT_ARRAY_BUFFER, buffer = 9)
282 glVertexAttribPointer(index = 0, size = 2, type = GL_SHORT, normalized = GL_FALSE, stride = 16, pointer = NULL)
283 glVertexAttribPointer(index = 1, size = 2, type = GL_FLOAT, normalized = GL_FALSE, stride = 16, pointer = 0x4)
284 glVertexAttribPointer(index = 2, size = 4, type = GL_UNSIGNED_BYTE, normalized = GL_TRUE, stride = 16, pointer = 0xc)
285 glEnableVertexAttribArray(index = 0)
286 glEnableVertexAttribArray(index = 1)
287 glEnableVertexAttribArray(index = 2)
288 glActiveTexture(texture = GL_TEXTURE0)
289 glBindTexture(target = GL_TEXTURE_2D, texture = 10000006)
290 glUseProgram(program = 7)
291 glUniformMatrix4fv(location = 0, count = 1, transpose = GL_FALSE, value = {0.005, 0, 0, 0, 0, 0.006666667, 0, 0, 0, 0, -1, 0, -1, -1, 0, 1})
292 glUniformMatrix4fv(location = 0, count = 1, transpose = GL_FALSE, value = {0.32, 0, 0, 0, 0, 0.4266667, 0, 0, 0, 0, -1, 0, -1, -1, 0, 1})
293 glDrawElements(mode = GL_TRIANGLES, count = 6, type = GL_UNSIGNED_SHORT, indices = NULL)
294 glGenBuffers(n = 1, buffer = &12)
295 glGenBuffers(n = 1, buffer = &13)
296 glActiveTexture(texture = GL_TEXTURE0)
297 glBindTexture(target = GL_TEXTURE_2D, texture = 10000002)
298 glUseProgram(program = 4)
299 eglMakeCurrent(dpy = 0x1b1d300, draw = 0x1b36ba0, read = 0x1b36ba0, ctx = 0x1b37570) = EGL_TRUE
// framebuffer 0
300 glBindFramebuffer(target = GL_FRAMEBUFFER, framebuffer = 0)
301 glViewport(x = 0, y = 0, width = 400, height = 300)
302 glBindBuffer(target = GL_ARRAY_BUFFER, buffer = 1)
303 glBufferData(target = GL_ARRAY_BUFFER, size = 416, data = blob(416), usage = GL_STREAM_DRAW)
304 glBindBuffer(target = GL_ELEMENT_ARRAY_BUFFER, buffer = 2)
305 glBufferData(target = GL_ELEMENT_ARRAY_BUFFER, size = 96, data = blob(96), usage = GL_STREAM_DRAW)
306 glClearColor(red = 0, green = 0, blue = 0, alpha = 1)
307 glStencilMask(mask = 4294967295)
308 glClearStencil(s = 0)
309 glClear(mask = GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT | GL_COLOR_BUFFER_BIT)
310 glStencilMask(mask = 0)
311 glBindBuffer(target = GL_ARRAY_BUFFER, buffer = 1)
312 glBindBuffer(target = GL_ELEMENT_ARRAY_BUFFER, buffer = 2)
313 glVertexAttribPointer(index = 0, size = 2, type = GL_SHORT, normalized = GL_FALSE, stride = 16, pointer = NULL)
314 glVertexAttribPointer(index = 1, size = 2, type = GL_FLOAT, normalized = GL_FALSE, stride = 16, pointer = 0x4)
315 glVertexAttribPointer(index = 2, size = 4, type = GL_UNSIGNED_BYTE, normalized = GL_TRUE, stride = 16, pointer = 0xc)
316 glEnableVertexAttribArray(index = 0)
317 glEnableVertexAttribArray(index = 1)
318 glEnableVertexAttribArray(index = 2)
319 glActiveTexture(texture = GL_TEXTURE0)
320 glBindTexture(target = GL_TEXTURE_2D, texture = 10000003)
321 glUseProgram(program = 7)
322 glUniformMatrix4fv(location = 0, count = 1, transpose = GL_FALSE, value = {0.005, 0, 0, 0, 0, 0.006666667, 0, 0, 0, 0, -1, 0, -1, -1, 0, 1})
323 glBlendEquation(mode = GL_FUNC_ADD)
324 glBlendFuncSeparate(sfactorRGB = GL_CONSTANT_ALPHA, dfactorRGB = GL_ONE_MINUS_SRC_ALPHA, sfactorAlpha = GL_ONE, dfactorAlpha = GL_ONE_MINUS_SRC_ALPHA)
325 glUniformMatrix4fv(location = 0, count = 1, transpose = GL_FALSE, value = {2, 0, 0, 0, 0, -2, 0, 0, 0, 0, -1, 0, -1, 1, 0, 1})
326 glDrawElements(mode = GL_TRIANGLES, count = 6, type = GL_UNSIGNED_SHORT, indices = NULL)
327 glActiveTexture(texture = GL_TEXTURE0)
328 glBindTexture(target = GL_TEXTURE_2D, texture = 10000004)
329 glUniformMatrix4fv(location = 0, count = 1, transpose = GL_FALSE, value = {2, 0, 0, 0, 0, -2, 0, 0, 0, 0, -1, 0, -0.5, 1, 0, 1})
330 glDrawElements(mode = GL_TRIANGLES, count = 6, type = GL_UNSIGNED_SHORT, indices = 0xc)
// last draw call, next to last frame
// all following calls are for the next frame
331 glGenBuffers(n = 1, buffer = &14) // XXX never used
332 glGenBuffers(n = 1, buffer = &15) // XXX never used
333 glBlendEquation(mode = GL_FUNC_ADD) // redundant, used for all frames
334 glBlendFuncSeparate(sfactorRGB = GL_SRC_ALPHA, dfactorRGB = GL_ONE_MINUS_SRC_ALPHA, sfactorAlpha = GL_ONE, dfactorAlpha = GL_ONE_MINUS_SRC_ALPHA) // redundant, used for all frames
335 glActiveTexture(texture = GL_TEXTURE0) // overwritten REDUNDANTLY until next Draw
336 glBindTexture(target = GL_TEXTURE_2D, texture = 10000002) // overwritten until next Draw
337 glUseProgram(program = 4) // used for Draw 1 and 2
338 glUniformMatrix4fv(location = 0, count = 1, transpose = GL_FALSE, value = {0.005, 0, 0, 0, 0, -0.006666667, 0, 0, 0, 0, -1, 0, -1, 1, 0, 1}) // overwritten until next Draw
340 eglSwapBuffers(dpy = 0x1b1d300, surface = 0x1b36ba0) = EGL_TRUE
// last frame
341 eglMakeCurrent(dpy = 0x1b1d300, draw = 0x1b36ba0, read = 0x1b36ba0, ctx = 0x1b37570) = EGL_TRUE
342 eglMakeCurrent(dpy = 0x1b1d300, draw = 0x1b36ba0, read = 0x1b36ba0, ctx = 0x1b37570) = EGL_TRUE
// framebuffer 1
343 glBindFramebuffer(target = GL_FRAMEBUFFER, framebuffer = 1)
344 glCheckFramebufferStatus(target = GL_FRAMEBUFFER) = GL_FRAMEBUFFER_COMPLETE
345 glViewport(x = 0, y = 0, width = 400, height = 300)
346 glBindBuffer(target = GL_ARRAY_BUFFER, buffer = 6)
347 glBufferData(target = GL_ARRAY_BUFFER, size = 192, data = blob(192), usage = GL_STREAM_DRAW)
348 glBindBuffer(target = GL_ELEMENT_ARRAY_BUFFER, buffer = 7)
349 glBufferData(target = GL_ELEMENT_ARRAY_BUFFER, size = 36, data = blob(36), usage = GL_STREAM_DRAW)
350 glClearColor(red = 0, green = 0, blue = 0, alpha = 0)
351 glStencilMask(mask = 4294967295)
352 glClearStencil(s = 0)
353 glClear(mask = GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT | GL_COLOR_BUFFER_BIT)
354 glStencilMask(mask = 0)
355 glBindBuffer(target = GL_ARRAY_BUFFER, buffer = 6) // redundant
356 glBindBuffer(target = GL_ELEMENT_ARRAY_BUFFER, buffer = 7) // redundant
357 glVertexAttribPointer(index = 0, size = 2, type = GL_SHORT, normalized = GL_FALSE, stride = 16, pointer = NULL)
358 glVertexAttribPointer(index = 1, size = 2, type = GL_FLOAT, normalized = GL_FALSE, stride = 16, pointer = 0x4)
359 glVertexAttribPointer(index = 2, size = 4, type = GL_UNSIGNED_BYTE, normalized = GL_TRUE, stride = 16, pointer = 0xc)
360 glEnableVertexAttribArray(index = 0)
361 glEnableVertexAttribArray(index = 1)
362 glEnableVertexAttribArray(index = 2)
// draw 1
363 glActiveTexture(texture = GL_TEXTURE0)
364 glBindTexture(target = GL_TEXTURE_2D, texture = 10000007)
365 glUniform1f(location = 7, v0 = 1)
366 glUniformMatrix4fv(location = 0, count = 1, transpose = GL_FALSE, value = {0.045, 0, 0, 0, 0, 0.06, 0, 0, 0, 0, -1, 0, -0.5, -0.3, 0, 1})
367 glDrawElements(mode = GL_TRIANGLES, count = 6, type = GL_UNSIGNED_SHORT, indices = NULL)
// end draw 1
// draw 2
368 glActiveTexture(texture = GL_TEXTURE0)
369 glBindTexture(target = GL_TEXTURE_2D, texture = 10000008)
370 glUniformMatrix4fv(location = 0, count = 1, transpose = GL_FALSE, value = {0.045, 0, 0, 0, 0, 0.08, 0, 0, 0, 0, -1, 0, 0, -0.3, 0, 1})
371 glDrawElements(mode = GL_TRIANGLES, count = 6, type = GL_UNSIGNED_SHORT, indices = 0xc)
// also Program 4, Uniform 7
// end draw 2
// draw 3
372 glActiveTexture(texture = GL_TEXTURE0)
373 glBindTexture(target = GL_TEXTURE_2D, texture = 10000005)
374 glUseProgram(program = 7)
// XXX double Uniform 0
375 glUniformMatrix4fv(location = 0, count = 1, transpose = GL_FALSE, value = {0.045, 0, 0, 0, 0, 0.08, 0, 0, 0, 0, -1, 0, 0, -0.3, 0, 1})
376 glUniformMatrix4fv(location = 0, count = 1, transpose = GL_FALSE, value = {0.32, 0, 0, 0, 0, 0.4266667, 0, 0, 0, 0, -1, 0, -1, -1, 0, 1})
377 glDrawElements(mode = GL_TRIANGLES, count = 6, type = GL_UNSIGNED_SHORT, indices = 0x18)
// also Uniform 7
// end draw 3
// uses texture 7, 8, 5
// uses buffer 6, 7
// end frame 1
// all following calls go to framebuffer 2
378 glGenBuffers(n = 1, buffer = &16)
379 glGenBuffers(n = 1, buffer = &17)
380 glActiveTexture(texture = GL_TEXTURE0)
381 glBindTexture(target = GL_TEXTURE_2D, texture = 10000002)
382 glUseProgram(program = 4)
383 glUniformMatrix4fv(location = 0, count = 1, transpose = GL_FALSE, value = {0.005, 0, 0, 0, 0, 0.006666667, 0, 0, 0, 0, -1, 0, -1, -1, 0, 1})
384 glUniform1f(location = 7, v0 = 0.5)
385 eglMakeCurrent(dpy = 0x1b1d300, draw = 0x1b36ba0, read = 0x1b36ba0, ctx = 0x1b37570) = EGL_TRUE
386 eglMakeCurrent(dpy = 0x1b1d300, draw = 0x1b36ba0, read = 0x1b36ba0, ctx = 0x1b37570) = EGL_TRUE
// framebuffer 2
387 glBindFramebuffer(target = GL_FRAMEBUFFER, framebuffer = 2)
388 glCheckFramebufferStatus(target = GL_FRAMEBUFFER) = GL_FRAMEBUFFER_COMPLETE
389 glViewport(x = 0, y = 0, width = 400, height = 300)
390 glBindBuffer(target = GL_ARRAY_BUFFER, buffer = 8)
391 glBufferData(target = GL_ARRAY_BUFFER, size = 64, data = blob(64), usage = GL_STREAM_DRAW)
392 glBindBuffer(target = GL_ELEMENT_ARRAY_BUFFER, buffer = 9)
393 glBufferData(target = GL_ELEMENT_ARRAY_BUFFER, size = 12, data = blob(12), usage = GL_STREAM_DRAW)
394 glClearColor(red = 0, green = 0, blue = 0, alpha = 0)
395 glStencilMask(mask = 4294967295)
396 glClearStencil(s = 0)
397 glClear(mask = GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT | GL_COLOR_BUFFER_BIT)
398 glStencilMask(mask = 0)
399 glBindBuffer(target = GL_ARRAY_BUFFER, buffer = 8)
400 glBindBuffer(target = GL_ELEMENT_ARRAY_BUFFER, buffer = 9)
401 glVertexAttribPointer(index = 0, size = 2, type = GL_SHORT, normalized = GL_FALSE, stride = 16, pointer = NULL)
402 glVertexAttribPointer(index = 1, size = 2, type = GL_FLOAT, normalized = GL_FALSE, stride = 16, pointer = 0x4)
403 glVertexAttribPointer(index = 2, size = 4, type = GL_UNSIGNED_BYTE, normalized = GL_TRUE, stride = 16, pointer = 0xc)
404 glEnableVertexAttribArray(index = 0)
405 glEnableVertexAttribArray(index = 1)
406 glEnableVertexAttribArray(index = 2)
407 glActiveTexture(texture = GL_TEXTURE0)
408 glBindTexture(target = GL_TEXTURE_2D, texture = 10000006)
409 glUseProgram(program = 7)
410 glUniformMatrix4fv(location = 0, count = 1, transpose = GL_FALSE, value = {0.005, 0, 0, 0, 0, 0.006666667, 0, 0, 0, 0, -1, 0, -1, -1, 0, 1})
411 glUniformMatrix4fv(location = 0, count = 1, transpose = GL_FALSE, value = {0.32, 0, 0, 0, 0, 0.4266667, 0, 0, 0, 0, -1, 0, -1, -1, 0, 1})
// first Draw call, framebuffer 2
412 glDrawElements(mode = GL_TRIANGLES, count = 6, type = GL_UNSIGNED_SHORT, indices = NULL)
// uses texture 6
// uses buffer 8, 9
// end frame 2
413 glGenBuffers(n = 1, buffer = &18)
414 glGenBuffers(n = 1, buffer = &19)
415 glActiveTexture(texture = GL_TEXTURE0)
416 glBindTexture(target = GL_TEXTURE_2D, texture = 10000002)
417 glUseProgram(program = 4)
418 eglMakeCurrent(dpy = 0x1b1d300, draw = 0x1b36ba0, read = 0x1b36ba0, ctx = 0x1b37570) = EGL_TRUE
// framebuffer 0
419 glBindFramebuffer(target = GL_FRAMEBUFFER, framebuffer = 0)
420 glViewport(x = 0, y = 0, width = 400, height = 300)
421 glBindBuffer(target = GL_ARRAY_BUFFER, buffer = 1)
422 glBufferData(target = GL_ARRAY_BUFFER, size = 416, data = blob(416), usage = GL_STREAM_DRAW)
423 glBindBuffer(target = GL_ELEMENT_ARRAY_BUFFER, buffer = 2)
424 glBufferData(target = GL_ELEMENT_ARRAY_BUFFER, size = 96, data = blob(96), usage = GL_STREAM_DRAW)
425 glClearColor(red = 0, green = 0, blue = 0, alpha = 1)
426 glStencilMask(mask = 4294967295)
427 glClearStencil(s = 0)
428 glClear(mask = GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT | GL_COLOR_BUFFER_BIT)
429 glStencilMask(mask = 0)
430 glBindBuffer(target = GL_ARRAY_BUFFER, buffer = 1)
431 glBindBuffer(target = GL_ELEMENT_ARRAY_BUFFER, buffer = 2)
432 glVertexAttribPointer(index = 0, size = 2, type = GL_SHORT, normalized = GL_FALSE, stride = 16, pointer = NULL)
433 glVertexAttribPointer(index = 1, size = 2, type = GL_FLOAT, normalized = GL_FALSE, stride = 16, pointer = 0x4)
434 glVertexAttribPointer(index = 2, size = 4, type = GL_UNSIGNED_BYTE, normalized = GL_TRUE, stride = 16, pointer = 0xc)
435 glEnableVertexAttribArray(index = 0)
436 glEnableVertexAttribArray(index = 1)
437 glEnableVertexAttribArray(index = 2)
438 glActiveTexture(texture = GL_TEXTURE0)
439 glBindTexture(target = GL_TEXTURE_2D, texture = 10000003)
440 glUseProgram(program = 7)
441 glUniformMatrix4fv(location = 0, count = 1, transpose = GL_FALSE, value = {0.005, 0, 0, 0, 0, 0.006666667, 0, 0, 0, 0, -1, 0, -1, -1, 0, 1})
// ??? why now Blend?
442 glBlendEquation(mode = GL_FUNC_ADD)
443 glBlendFuncSeparate(sfactorRGB = GL_CONSTANT_ALPHA, dfactorRGB = GL_ONE_MINUS_SRC_ALPHA, sfactorAlpha = GL_ONE, dfactorAlpha = GL_ONE_MINUS_SRC_ALPHA)
444 glUniformMatrix4fv(location = 0, count = 1, transpose = GL_FALSE, value = {2, 0, 0, 0, 0, -2, 0, 0, 0, 0, -1, 0, -1, 1, 0, 1})
445 glDrawElements(mode = GL_TRIANGLES, count = 6, type = GL_UNSIGNED_SHORT, indices = NULL)
446 glActiveTexture(texture = GL_TEXTURE0)
447 glBindTexture(target = GL_TEXTURE_2D, texture = 10000004)
448 glUniformMatrix4fv(location = 0, count = 1, transpose = GL_FALSE, value = {2, 0, 0, 0, 0, -2, 0, 0, 0, 0, -1, 0, -0.5, 1, 0, 1})
449 glDrawElements(mode = GL_TRIANGLES, count = 6, type = GL_UNSIGNED_SHORT, indices = 0xc)
// uses texture 3, 4
// uses buffer 1, 2
// end frame 0
// end
450 glGenBuffers(n = 1, buffer = &20)
451 glGenBuffers(n = 1, buffer = &21)
452 glBlendEquation(mode = GL_FUNC_ADD)
453 glBlendFuncSeparate(sfactorRGB = GL_SRC_ALPHA, dfactorRGB = GL_ONE_MINUS_SRC_ALPHA, sfactorAlpha = GL_ONE, dfactorAlpha = GL_ONE_MINUS_SRC_ALPHA)
454 glActiveTexture(texture = GL_TEXTURE0)
455 glBindTexture(target = GL_TEXTURE_2D, texture = 10000002)
456 glUseProgram(program = 4)
457 glUniformMatrix4fv(location = 0, count = 1, transpose = GL_FALSE, value = {0.005, 0, 0, 0, 0, -0.006666667, 0, 0, 0, 0, -1, 0, -1, 1, 0, 1})
459 eglSwapBuffers(dpy = 0x1b1d300, surface = 0x1b36ba0) = EGL_TRUE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment