gltraceprinter

Updated: April 19, 2023

A readable print of the trace (log) file generated from gltracelogger

Syntax:

gltraceprinter tracefile
            

Runs on:

QNX Neutrino

Options:

tracefile

Specify the location of the .glev file generated from the gltracelogger.

Description:

The gltraceprinter utility creates a readable form of the logs generated by gltracelogger. You can run gltraceprinter from a shell.

Examples:

# gltraceprinter /tmp/tracebuffer-ctx-0.glev
            
            
[PROPERTIES]
OS: QNX
procname: gles3-gears
pid-tid: 1007647-1
context: 0
starting frame: 1

[EVENTS]
[0 tid:1] eglCreateContext(dpy: 0x2783611590, config: 0x2783761cc0, share_context: NULL, attrib_list: [EGL_CONTEXT_MAJOR_VERSION, 3, EGL_NONE]) == 0x278363a630
[1 tid:1] eglGetConfigAttrib(dpy: 0x2783611590, config: 0x2783761cc0, attribute: EGL_BUFFER_SIZE, value: [32]) == EGL_TRUE
[2 tid:1] eglGetConfigAttrib(dpy: 0x2783611590, config: 0x2783761cc0, attribute: EGL_ALPHA_SIZE, value: [8]) == EGL_TRUE
[3 tid:1] eglCreateWindowSurface(dpy: 0x2783611590, config: 0x2783761cc0, win: 0x2783618170, attrib_list: [EGL_NONE]) == 0x27837942a0
[4 tid:1] eglMakeCurrent(dpy: 0x2783611590, draw: 0x27837942a0, read: 0x27837942a0, ctx: 0x278363a630) == EGL_TRUE
[5 tid:1] eglSwapInterval(dpy: 0x2783611590, interval: 1) == EGL_TRUE
[6 tid:1] glClearColor(red: 0.000000, green: 0.000000, blue: 1.000000, alpha: 0.000000)
[7 tid:1] glEnable(cap: GL_CULL_FACE)
[8 tid:1] glEnable(cap: GL_DEPTH_TEST)
[9 tid:1] glCreateProgram() == 1
[10 tid:1] glCreateShader(type: GL_VERTEX_SHADER) == 2
[11 tid:1] glAttachShader(program: 1, shader: 2)
[12 tid:1] glShaderSource(shader: 2, count: 1, string: ['#version 300 es
// gears.vs
//
// Emulates a fixed-function pipeline with:
//  GL_ALPHA_TEST is disabled by default
//  GL_BLEND is disabled by default
//  GL_CLIP_PLANEi is disabled
//  GL_LIGHTING and GL_LIGHT0 enabled
//  GL_FOG disabled
//  GL_TEXTURE_xx disabled
//  GL_TEXTURE_GEN_x disabled
//
//  GL_LIGHT_MODEL_AMBIENT is never set -> default value is (0.2, 0.2, 0.2, 1.0)
//
//  GL_LIGHT0 position is (5, 5, 10, 0)
//  GL_LIGHT0 ambient is never set -> default value is (0, 0, 0, 1)
//  GL_LIGHT0 diffuse is never set -> default value is (1, 1, 1, 1)
//  GL_LIGHT0 specular is never set -> default value is (1, 1, 1, 1)
//
//  GL_AMBIENT and GL_DIFFUSE are (red/green/blue)
//  GL_SPECULAR is never set -> default value is (0, 0, 0, 1)
//  GL_EMISSION is never set -> default value is (0, 0, 0, 1)
//  GL_SHININESS is never set -> default value is 0
//
//  Combining material with light settings gives us directional diffuse with
//  ambient from light model.
//
//  Since alpha test and blend are both disabled, there is no need to keep track
//  of the alpha component when shading. This saves the interpolation of one
//  float between vertices and brings the performance back to the level of the
//  'fixed function pipeline' when the window is maximized.
//
//  App is responsible for normalizing LightPosition.

// should be set to gl_ProjectionMatrix * gl_ModelViewMatrix
uniform mat4 ModelViewProjectionMatrix;

// should be same as mat3(gl_ModelViewMatrix) because gl_ModelViewMatrix is orthogonal
uniform mat3 NormalMatrix;

// should be set to 'normalize(5.0, 5.0, 10.0)'
uniform vec3 LightPosition;

// should be set to AmbientDiffuse * vec4(0.2, 0.2, 0.2, 1.0)
uniform vec3 LightModelProduct;

// will be set to red/green/blue
uniform vec3 AmbientDiffuse;

// user defined attribute to replace gl_Vertex
in vec4 Vertex;

// user defined attribute to replace gl_Normal
in vec3 Normal;

// interpolate per-vertex lighting
out vec3 Color;

void main(void)
{
  // transform the vertex and normal in eye space
  gl_Position = ModelViewProjectionMatrix * Vertex;
  vec3 NormEye = normalize(NormalMatrix * Normal);

  // do one directional light (diffuse only); no need to clamp for this example
  Color = LightModelProduct + AmbientDiffuse * max(0.0, dot(NormEye, LightPosition));
}
], length: NULL)
[13 tid:1] glCompileShader(shader: 2)
[14 tid:1] glGetShaderiv(shader: 2, pname: GL_COMPILE_STATUS, params: [1])
[15 tid:1] glCreateShader(type: GL_FRAGMENT_SHADER) == 3
[16 tid:1] glAttachShader(program: 1, shader: 3)
[17 tid:1] glShaderSource(shader: 3, count: 1, string: ['#version 300 es
// gears.fs
//
// Emulates a fixed function pipeline with:
//  GL_ALPHA_TEST is disabled by default
//  GL_BLEND is disabled by default
//  GL_FOG disabled
//  GL_TEXTURE_xx disabled
//
//  Since alpha test and blend are both disabled, there is no need to keep track
//  of the alpha component in the fragment shader.

// global foreground alpha
uniform lowp float fgAlpha;

// interpolated per-vertex lighting
in lowp vec3 Color;

// result color
out lowp vec4 FragColor;

void main(void)
{
  // this is the second-simplest fragment shader
  FragColor = vec4(Color, fgAlpha);
}
], length: NULL)
[18 tid:1] glCompileShader(shader: 3)
[19 tid:1] glGetShaderiv(shader: 3, pname: GL_COMPILE_STATUS, params: [1])
[20 tid:1] glLinkProgram(program: 1)
[21 tid:1] glGetProgramiv(program: 1, pname: GL_LINK_STATUS, params: [1])
[22 tid:1] glUseProgram(program: 1)
[23 tid:1] glGetUniformLocation(program: 1, name: 'ModelViewProjectionMatrix') == 0
[24 tid:1] glGetUniformLocation(program: 1, name: 'NormalMatrix') == 1
[25 tid:1] glGetUniformLocation(program: 1, name: 'LightPosition') == 2
[26 tid:1] glGetUniformLocation(program: 1, name: 'LightModelProduct') == 3
[27 tid:1] glGetUniformLocation(program: 1, name: 'AmbientDiffuse') == 4
[28 tid:1] glGetUniformLocation(program: 1, name: 'fgAlpha') == 5
[29 tid:1] glGetAttribLocation(program: 1, name: 'Vertex') == 0
[30 tid:1] glGetAttribLocation(program: 1, name: 'Normal') == 1
[31 tid:1] glUniform3fv(location: 2, count: 1, v: [0.408200, 0.408200, 0.816500])
[32 tid:1] glGenBuffers(n: 2, buffers: [1, 2])
[33 tid:1] glBindBuffer(target: GL_ARRAY_BUFFER, buffer: 1)
[34 tid:1] glBindBuffer(target: GL_ELEMENT_ARRAY_BUFFER, buffer: 2)
[35 tid:1] glBufferData(target: GL_ARRAY_BUFFER, size: 27024, data: NULL, usage: GL_STATIC_DRAW)
[36 tid:1] glBufferData(target: GL_ELEMENT_ARRAY_BUFFER, size: 4836, data: NULL, usage: GL_STATIC_DRAW)
[37 tid:1] glBufferSubData(target: GL_ARRAY_BUFFER, offset: 0, size: 13488, data: 'blob(13488 bytes)')
[38 tid:1] glBufferSubData(target: GL_ARRAY_BUFFER, offset: 13488, size: 6768, data: 'blob(6768 bytes)')
[39 tid:1] glBufferSubData(target: GL_ARRAY_BUFFER, offset: 20256, size: 6768, data: 'blob(6768 bytes)')
[40 tid:1] glBufferSubData(target: GL_ELEMENT_ARRAY_BUFFER, offset: 0, size: 2412, data: 'blob(2412 bytes)')
[41 tid:1] glBufferSubData(target: GL_ELEMENT_ARRAY_BUFFER, offset: 2412, size: 1212, data: 'blob(1212 bytes)')
[42 tid:1] glBufferSubData(target: GL_ELEMENT_ARRAY_BUFFER, offset: 3624, size: 1212, data: 'blob(1212 bytes)')
[43 tid:1] glEnableVertexAttribArray(index: 0)
[44 tid:1] glVertexAttribPointer(indx: 0, size: 0x3, type: GL_FLOAT, normalized: GL_FALSE, stride: 24, ptr: NULL)
[45 tid:1] glEnableVertexAttribArray(index: 1)
[46 tid:1] glVertexAttribPointer(indx: 1, size: 0x3, type: GL_FLOAT, normalized: GL_FALSE, stride: 24, ptr: 0xc)
[47 tid:1] glClear(mask: 16640)
[48 tid:1] glUniformMatrix4fv(location: 0, count: 1, transpose: GL_FALSE, value: [4.330127, 1.520090, 0.555273, 0.469846, 0.000000, 8.352823, -0.404206, -0.342020, 2.500000, -2.632872, -0.961761, -0.813798, -12.990380, -21.265917, 35.506226, 39.274502])
[49 tid:1] glUniformMatrix3fv(location: 1, count: 1, transpose: GL_FALSE, value: [0.866025, 0.171010, -0.469846, 0.000000, 0.939693, 0.342020, 0.500000, -0.296198, 0.813798])
[50 tid:1] glUniform3fv(location: 4, count: 1, v: [0.800000, 0.100000, 0.000000])
[51 tid:1] glUniform3fv(location: 3, count: 1, v: [0.160000, 0.020000, 0.000000])
[52 tid:1] glUniform1fv(location: 5, count: 1, v: [1.000000])
[53 tid:1] glDrawElementsInstanced(mode: GL_TRIANGLES, count: 1206, type: GL_UNSIGNED_SHORT, indices: NULL, instanceCount: 1)
[54 tid:1] glUniformMatrix4fv(location: 0, count: 1, transpose: GL_FALSE, value: [4.276816, 0.194705, 0.611668, 0.517565, 0.677381, 8.487782, -0.312365, -0.264309, 2.500000, -2.632872, -0.961761, -0.813798, 13.423393, -11.993371, 38.893391, 42.140564])
[55 tid:1] glUniformMatrix3fv(location: 1, count: 1, transpose: GL_FALSE, value: [0.855363, 0.021904, -0.517565, 0.135476, 0.954875, 0.264309, 0.500000, -0.296198, 0.813798])
[56 tid:1] glUniform3fv(location: 4, count: 1, v: [0.000000, 0.800000, 0.200000])
[57 tid:1] glUniform3fv(location: 3, count: 1, v: [0.000000, 0.160000, 0.040000])
[58 tid:1] glDrawElementsInstanced(mode: GL_TRIANGLES, count: 606, type: GL_UNSIGNED_SHORT, indices: 0x96c, instanceCount: 1)
[59 tid:1] glUniformMatrix4fv(location: 0, count: 1, transpose: GL_FALSE, value: [3.924428, -2.152387, 0.674073, 0.570369, 1.829991, 8.212646, -0.131666, -0.111410, 2.500000, -2.632872, -0.961761, -0.813798, -13.423393, 30.369581, 32.944622, 37.106991])
[60 tid:1] glUniformMatrix3fv(location: 1, count: 1, transpose: GL_FALSE, value: [0.784886, -0.242144, -0.570369, 0.365998, 0.923923, 0.111410, 0.500000, -0.296198, 0.813798])
[61 tid:1] glUniform3fv(location: 4, count: 1, v: [0.200000, 0.200000, 1.000000])
[62 tid:1] glUniform3fv(location: 3, count: 1, v: [0.040000, 0.040000, 0.200000])
[63 tid:1] glDrawElementsInstanced(mode: GL_TRIANGLES, count: 606, type: GL_UNSIGNED_SHORT, indices: 0xe28, instanceCount: 1)
[64 tid:1] eglSwapBuffers(dpy: 0x2783611590, surface: 0x27837942a0) == EGL_TRUE