Source:
// draw_triangle.json - Draws 1 white triangle on a gray background
{
"meta" : { "cur_frame" : 0, "eof" : true }, "sof" : { "pointer_sizes" : 4 },
"packets" : [
{ "func" : "glXCreateContext", "context" : "0x0", "params" : { "dpy" : "0x1", "vis" : "0x1", "shareList" : "0x0", "direct" : true }, "return" : "0x1" },
{ "func" : "glXMakeCurrent", "context" : "0x0", "params" : { "dpy" : "0x1", "drawable" : "0x1", "context" : "0x1" }, "return" : true },
{ "func" : "glViewport", "params" : { "x" : 0, "y" : 0, "width" : 400, "height" : 200 } },
{ "func" : "glClearColor", "params" : { "red" : 0.25, "green" : .25, "blue" : .25, "alpha" : 1. } },
{ "func" : "glClear", "params" : { "mask" : "0x4000" } },
{ "func" : "glMatrixMode", "params" : { "mode" : "GL_PROJECTION" }, },
{ "func" : "glLoadIdentity" },
{ "func" : "glMatrixMode", "params" : { "mode" : "GL_MODELVIEW" } },
{ "func" : "glLoadIdentity" },
{ "func" : "glColor3f", "params" : { "red" : 1., "green" : 1., "blue" : 1. }, },
{ "func" : "glScalef", "params" : { "x" : 0.2, "y" : 0.2, "z" : 1. } },
{ "func" : "glTranslatef", "params" : { "x" : -1.5, "y" : 0., "z" : 0. } },
{ "func" : "glBegin", "params" : { "mode" : "GL_TRIANGLES" } },
{ "func" : "glVertex2f", "params" : { "x" : 0., "y" : 4. } },
{ "func" : "glVertex2f", "params" : { "x" : 4., "y" : 0. }, },
{ "func" : "glVertex2f", "params" : { "x" : 0., "y" : 0. } },
{ "func" : "glEnd" },
{ "func" : "glXSwapBuffers", "params" : {"dpy" : "0x1", "drawable" : "0x1" } }
]
}
Output from voglreplay draw_triangle.json -dump_screenshots:
No comments:
Post a Comment