Figured I’d re-use this thread to ask, is this call flow correct for uniform structs (same as those shown in the same.glsl
given in a previous post of this thread)
make test
...
cd ../../bin && ./tryextra._x86_64_linux_cc_debug.elf -D APP_DATA=../run
Opened module './libvfxglfw._x86_64_linux_cc_debug.so'
Opened module './libvfxgl._x86_64_linux_cc_debug.so'
~/...libvfxgl/opengl_vfxapp.c: 43: app->ref = glCreateProgram();
Creating program 'flat'
Generating shader 'point' with path '../run/shaders/spec.glsl':
~/...libvfxgl/opengl_shader.c: 95: glCreateShader( GL_VERTEX_SHADER );
~/...libvfxgl/opengl_shader.c: 106: glShaderSource( 2, 1, [0x56338ca1c9b0], (nil) );
~/...libvfxgl/opengl_shader.c: 113: glCompileShader( 2 );
~/...libvfxgl/opengl_shader.c: 114: glGetShaderiv( 2, GL_COMPILE_STATUS, 0x7ffd37c71130 );
~/...libvfxgl/opengl_vfxapp.c: 53: glAttachShader( 1, 2 );
Success
Generating shader 'color' with path '../run/shaders/frag.glsl':
~/...libvfxgl/opengl_shader.c: 95: glCreateShader( GL_FRAGMENT_SHADER );
~/...libvfxgl/opengl_shader.c: 106: glShaderSource( 3, 1, [0x56338cfa9430], (nil) );
~/...libvfxgl/opengl_shader.c: 113: glCompileShader( 3 );
~/...libvfxgl/opengl_shader.c: 114: glGetShaderiv( 3, GL_COMPILE_STATUS, 0x7ffd37c71130 );
~/...libvfxgl/opengl_vfxapp.c: 53: glAttachShader( 1, 3 );
Success
Linking program...
~/...libvfxgl/opengl_vfxapp.c: 72: glLinkProgram( 1 );
~/...libvfxgl/opengl_vfxapp.c: 73: glGetProgramiv( 1, GL_LINK_STATUS, 0x7ffd37c712dc );
Success
Testing program...
~/...libvfxgl/opengl_vfxapp.c: 88: glValidateProgram( 1 );
~/...libvfxgl/opengl_vfxapp.c: 89: glGetProgramiv( 1, GL_VALIDATE_STATUS, 0x7ffd37c712dc );
Success
~/...libvfxgl/opengl_vfxapp.c: 136: glUseProgram( 1 );
==============================================[0] '(null)' [], name count = 1
~/...libvfxgl/opengl_vfxcfg.c: 24: glGenVertexArrays( 1, &ref );
~/...libvfxgl/opengl_vfxbuf.c: 27: glGenBuffers( 1, &ref );
~/...libvfxgl/opengl_vfxcfg.c: 6: glBindVertexArray( 1 );
~/...libvfxgl/opengl_vfxbuf.c: 90: glBindBuffer( GL_ARRAY_BUFFER, 1 );
~/...libvfxgl/opengl_vfxbuf.c: 93: glBufferData( GL_ARRAY_BUFFER, 112, 0x56338cf7dd20, GL_STATIC_DRAW );
> [0][0] 'NulPoint' uint
~/...libvfxgl/opengl_vfxbuf.c: 27: glGenBuffers( 1, &ref );
~/...libvfxgl/opengl_vfxcfg.c: 6: glBindVertexArray( 1 );
~/...libvfxgl/opengl_vfxbuf.c: 90: glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, 2 );
~/...libvfxgl/opengl_vfxbuf.c: 93: glBufferData( GL_ELEMENT_ARRAY_BUFFER, 28, 0x56338cfa0470, GL_STATIC_DRAW );
~/...libvfxgl/opengl_vfxvar.c: 24: var->loc = (GLint)glGetAttribLocation( 1, 'NulPoint' );
~/...libvfxgl/opengl_vfxcfg.c: 6: glBindVertexArray( 1 );
~/...libvfxgl/opengl_vfxbuf.c: 62: glVertexArrayElementBuffer( 1, 2 );
~/...libvfxgl/opengl_vfxvar.c: 254: glVertexAttribPointer( 0, 1, GL_UNSIGNED_INT, GL_FALSE, 4, (nil) );
==============================================[1] 'UINTS' [], name count = 2
~/...libvfxgl/opengl_vfxcfg.c: 24: glGenVertexArrays( 1, &ref );
~/...libvfxgl/opengl_vfxbuf.c: 27: glGenBuffers( 1, &ref );
~/...libvfxgl/opengl_vfxcfg.c: 6: glBindVertexArray( 2 );
~/...libvfxgl/opengl_vfxbuf.c: 90: glBindBuffer( GL_UNIFORM_BUFFER, 3 );
~/...libvfxgl/opengl_vfxbuf.c: 93: glBufferData( GL_UNIFORM_BUFFER, 12, 0x56338cfa3160, GL_DYNAMIC_DRAW );
~/...libvfxgl/opengl_vfxvar.c: 32: var->loc = (GLint)glGetUniformBlockIndex( 1, 'UINTS' );
> [1][0] 'VtxCount' uint
~/...libvfxgl/opengl_vfxbuf.c: 27: glGenBuffers( 1, &ref );
~/...libvfxgl/opengl_vfxcfg.c: 6: glBindVertexArray( 2 );
~/...libvfxgl/opengl_vfxbuf.c: 52: Ignored VFXVAR 'VtxCount'
~/...libvfxgl/opengl_vfxvar.c: 507: glBindBuffer( GL_UNIFORM_BUFFER, 3 );
~/...libvfxgl/opengl_vfxvar.c: 510: glBufferSubData( GL_UNIFORM_BUFFER, 0, 4, 0x56338cfac090 );
> [1][1] 'FlatLine' uint
~/...libvfxgl/opengl_vfxbuf.c: 27: glGenBuffers( 1, &ref );
~/...libvfxgl/opengl_vfxcfg.c: 6: glBindVertexArray( 2 );
~/...libvfxgl/opengl_vfxbuf.c: 52: Ignored VFXVAR 'FlatLine'
~/...libvfxgl/opengl_vfxvar.c: 507: glBindBuffer( GL_UNIFORM_BUFFER, 3 );
~/...libvfxgl/opengl_vfxvar.c: 510: glBufferSubData( GL_UNIFORM_BUFFER, 0, 4, 0x56338cf98270 );
==============================================[2] 'DINTS' [], name count = 2
~/...libvfxgl/opengl_vfxcfg.c: 24: glGenVertexArrays( 1, &ref );
~/...libvfxgl/opengl_vfxbuf.c: 27: glGenBuffers( 1, &ref );
~/...libvfxgl/opengl_vfxcfg.c: 6: glBindVertexArray( 3 );
~/...libvfxgl/opengl_vfxbuf.c: 90: glBindBuffer( GL_UNIFORM_BUFFER, 6 );
~/...libvfxgl/opengl_vfxbuf.c: 93: glBufferData( GL_UNIFORM_BUFFER, 24, 0x56338cf78760, GL_DYNAMIC_DRAW );
~/...libvfxgl/opengl_vfxvar.c: 32: var->loc = (GLint)glGetUniformBlockIndex( 1, 'DINTS' );
> [2][0] 'WinPoint' ivec2
~/...libvfxgl/opengl_vfxbuf.c: 27: glGenBuffers( 1, &ref );
~/...libvfxgl/opengl_vfxcfg.c: 6: glBindVertexArray( 3 );
~/...libvfxgl/opengl_vfxbuf.c: 52: Ignored VFXVAR 'WinPoint'
~/...libvfxgl/opengl_vfxvar.c: 507: glBindBuffer( GL_UNIFORM_BUFFER, 6 );
~/...libvfxgl/opengl_vfxvar.c: 510: glBufferSubData( GL_UNIFORM_BUFFER, 0, 8, 0x56338cf7e880 );
> [2][1] 'WinSpace' ivec3
~/...libvfxgl/opengl_vfxbuf.c: 27: glGenBuffers( 1, &ref );
~/...libvfxgl/opengl_vfxcfg.c: 6: glBindVertexArray( 3 );
~/...libvfxgl/opengl_vfxbuf.c: 52: Ignored VFXVAR 'WinSpace'
~/...libvfxgl/opengl_vfxvar.c: 507: glBindBuffer( GL_UNIFORM_BUFFER, 6 );
~/...libvfxgl/opengl_vfxvar.c: 510: glBufferSubData( GL_UNIFORM_BUFFER, 0, 12, 0x56338cf9dee0 );
==============================================[3] 'FNUMS' [], name count = 5
~/...libvfxgl/opengl_vfxcfg.c: 24: glGenVertexArrays( 1, &ref );
~/...libvfxgl/opengl_vfxbuf.c: 27: glGenBuffers( 1, &ref );
~/...libvfxgl/opengl_vfxcfg.c: 6: glBindVertexArray( 4 );
~/...libvfxgl/opengl_vfxbuf.c: 90: glBindBuffer( GL_UNIFORM_BUFFER, 9 );
~/...libvfxgl/opengl_vfxbuf.c: 93: glBufferData( GL_UNIFORM_BUFFER, 64, 0x56338cf9bbe0, GL_DYNAMIC_DRAW );
~/...libvfxgl/opengl_vfxvar.c: 32: var->loc = (GLint)glGetUniformBlockIndex( 1, 'FNUMS' );
> [3][0] 'WinScale' vec3
~/...libvfxgl/opengl_vfxbuf.c: 27: glGenBuffers( 1, &ref );
~/...libvfxgl/opengl_vfxcfg.c: 6: glBindVertexArray( 4 );
~/...libvfxgl/opengl_vfxbuf.c: 52: Ignored VFXVAR 'WinScale'
~/...libvfxgl/opengl_vfxvar.c: 507: glBindBuffer( GL_UNIFORM_BUFFER, 9 );
~/...libvfxgl/opengl_vfxvar.c: 510: glBufferSubData( GL_UNIFORM_BUFFER, 0, 12, 0x56338cfa76d0 );
> [3][1] 'RegScale' vec3
~/...libvfxgl/opengl_vfxbuf.c: 27: glGenBuffers( 1, &ref );
~/...libvfxgl/opengl_vfxcfg.c: 6: glBindVertexArray( 4 );
~/...libvfxgl/opengl_vfxbuf.c: 52: Ignored VFXVAR 'RegScale'
~/...libvfxgl/opengl_vfxvar.c: 507: glBindBuffer( GL_UNIFORM_BUFFER, 9 );
~/...libvfxgl/opengl_vfxvar.c: 510: glBufferSubData( GL_UNIFORM_BUFFER, 0, 12, 0x56338cfa76f0 );
> [3][2] 'RegPoint' vec3
~/...libvfxgl/opengl_vfxbuf.c: 27: glGenBuffers( 1, &ref );
~/...libvfxgl/opengl_vfxcfg.c: 6: glBindVertexArray( 4 );
~/...libvfxgl/opengl_vfxbuf.c: 52: Ignored VFXVAR 'RegPoint'
~/...libvfxgl/opengl_vfxvar.c: 507: glBindBuffer( GL_UNIFORM_BUFFER, 9 );
~/...libvfxgl/opengl_vfxvar.c: 510: glBufferSubData( GL_UNIFORM_BUFFER, 0, 12, 0x56338cf9ad60 );
> [3][3] 'RegEmits' vec3
~/...libvfxgl/opengl_vfxbuf.c: 27: glGenBuffers( 1, &ref );
~/...libvfxgl/opengl_vfxcfg.c: 6: glBindVertexArray( 4 );
~/...libvfxgl/opengl_vfxbuf.c: 52: Ignored VFXVAR 'RegEmits'
~/...libvfxgl/opengl_vfxvar.c: 507: glBindBuffer( GL_UNIFORM_BUFFER, 9 );
~/...libvfxgl/opengl_vfxvar.c: 510: glBufferSubData( GL_UNIFORM_BUFFER, 0, 12, 0x56338cf9dbf0 );
> [3][4] 'RegTakes' vec3
~/...libvfxgl/opengl_vfxbuf.c: 27: glGenBuffers( 1, &ref );
~/...libvfxgl/opengl_vfxcfg.c: 6: glBindVertexArray( 4 );
~/...libvfxgl/opengl_vfxbuf.c: 52: Ignored VFXVAR 'RegTakes'
~/...libvfxgl/opengl_vfxvar.c: 507: glBindBuffer( GL_UNIFORM_BUFFER, 9 );
~/...libvfxgl/opengl_vfxvar.c: 510: glBufferSubData( GL_UNIFORM_BUFFER, 0, 12, 0x56338cf7d050 );
==============================================[4] 'DNUMS' [], name count = 1
~/...libvfxgl/opengl_vfxcfg.c: 24: glGenVertexArrays( 1, &ref );
~/...libvfxgl/opengl_vfxbuf.c: 27: glGenBuffers( 1, &ref );
~/...libvfxgl/opengl_vfxcfg.c: 6: glBindVertexArray( 5 );
~/...libvfxgl/opengl_vfxbuf.c: 90: glBindBuffer( GL_UNIFORM_BUFFER, 15 );
~/...libvfxgl/opengl_vfxbuf.c: 93: glBufferData( GL_UNIFORM_BUFFER, 16, 0x56338cf70c00, GL_DYNAMIC_DRAW );
~/...libvfxgl/opengl_vfxvar.c: 32: var->loc = (GLint)glGetUniformBlockIndex( 1, 'DNUMS' );
> [4][0] 'dunused' double
~/...libvfxgl/opengl_vfxbuf.c: 27: glGenBuffers( 1, &ref );
~/...libvfxgl/opengl_vfxcfg.c: 6: glBindVertexArray( 5 );
~/...libvfxgl/opengl_vfxbuf.c: 52: Ignored VFXVAR 'dunused'
~/...libvfxgl/opengl_vfxvar.c: 507: glBindBuffer( GL_UNIFORM_BUFFER, 15 );
~/...libvfxgl/opengl_vfxvar.c: 510: glBufferSubData( GL_UNIFORM_BUFFER, 0, 8, 0x56338cf76430 );
==================Entering draw loop=====================
~/...libvfxgl/opengl_vfxapp.c: 136: glUseProgram( 1 );
~/...libvfxgl/opengl_vfxbuf.c: 90: glBindBuffer( GL_ARRAY_BUFFER, 1 );
~/...libvfxgl/opengl_vfxbuf.c: 93: glBufferData( GL_ARRAY_BUFFER, 112, 0x56338cf7dd20, GL_STATIC_DRAW );
> Enabling VfxCfg
~/...libvfxgl/opengl_vfxcfg.c: 6: glBindVertexArray( 1 );
~/...libvfxgl/opengl_vfxbuf.c: 43: glBindBuffer( GL_ARRAY_BUFFER, 1 );
> Enabling VfxVar 'NulPoint', takes 1, def->count = 0
make: *** [../../gnu.mak:40: test] Segmentation fault (core dumped)
Compilation failed.
I edited out the excess path stuff so it would be easier to read the ouput