Need someone to check I'm declaring my uniforms right

Finally got past a number of bugs after re-thinking the names & arrangement of my wrapper api for opengl, vulkan etc (haven’t plugged in anything other than opengl yet, want to render models, scenes & physics 1st so that I know any issues that crop up with other APIs will be an issue with how I’m using them), aside from some window & canvas related bugs (probably a result of the re-think) I’m not getting the expected triangle on screen so before I attribute it down to poorly made shader code I’d like to check that the calls my api made were correct for the uniforms in question.

First the section of shader code that matters (included by shaders that need the uniforms):

#ifndef STATIC_H
#define STATIC_H

#	if defined(GL_SPIRV) || defined(GL_core_profile) || \
	defined(GL_compatibility_profile) || defined(GL_es_profile)
#		define IS_OPENGL
#	endif

#	if defined(IS_OPENGL) || defined(VULKAN)
/* Mappings to CGLM union names */
#		define uvec2s	uvec2
#		define uvec3s	uvec3
#		define uvec4s	uvec4
#		define ivec2s	ivec2
#		define ivec3s	ivec3
#		define ivec4s	ivec4
#		define vec2s	vec2
#		define vec3s	vec3
#		define vec4s	vec4
#		define dvec2s	dvec2
#		define dvec3s	dvec3
#		define dvec4s	dvec4
#	else
#		include <cglm/struct.h>
#		include <cglm/cglm.h>
#		include <cglm/call.h>
#		define uniform typedef struct
#	endif /* IS_OPENGL / VULKAN */

uniform UINTS
{
	uint FlatLine;
	uint VtxCount;
} uint_uniforms;

#	define STATIC_UINT_NAMES "VtxCount", "FlatLine"
#	define STATIC_UINT_TYPES VFXDATA_UINT, VFXDATA_UINT
#	define STATIC_UINT_TAKES 1, 1
#	define STATIC_UINT_COUNT (1+1)

uniform DINTS
{
	ivec2s	WinPoint;
	ivec3s	WinSpace;
} dint_uniforms;

#	define STATIC_DINT_NAMES "WinPoint", "WinSpace"
#	define STATIC_DINT_TYPES VFXDATA_IVEC2, VFXDATA_IVEC3
#	define STATIC_DINT_TAKES 1, 1
#	define STATIC_DINT_COUNT (2+3)

uniform FNUMS
{
	vec3s	WinScale;
	vec3s	RegScale;
	vec3s	RegPoint;
	/* Light emitted */
	vec3s	RegEmits;
	/* Light taken before ray bounces */
	vec3s	RegTakes;
} fnum_uniforms;

#	define STATIC_FNUM_NAMES \
	"WinScale", "RegScale", "RegPoint", "RegEmits", "RegTakes"
#	define STATIC_FNUM_TYPES \
	VFXDATA_FVEC3, VFXDATA_FVEC3, VFXDATA_FVEC3, VFXDATA_FVEC3, VFXDATA_FVEC3
#	define STATIC_FNUM_TAKES 1, 1, 1, 1, 1
#	define STATIC_FNUM_COUNT (3+3+3+3+3)

uniform DNUMS { double dunused; } dnum_uniforms;

#	define STATIC_DNUM_NAMES "dunused"
#	define STATIC_DNUM_TYPES VFXDATA_DNUM
#	define STATIC_DNUM_TAKES 1
#	define STATIC_DNUM_COUNT (1)

My output (cleaned out the paths since they’re irrelevant):

make test
...
cd ../../bin && ./tryextra._x86_64_linux_cc_debug.elf -D APP_DATA=../run
Attempting to open module './libvfxglfw._x86_64_linux_cc_debug.so'... Success!
Attempting to open module './libvfxgl._x86_64_linux_cc_debug.so'... Success!
Creating program 'flat'
~/.../opengl_vfxapp.c:   42: glCreateProgram();
Creating/seeking shader with path '../run/shaders/spec.glsl'...
~/.../opengl_shader.c:   86: glCreateShader( GL_VERTEX_SHADER );
~/.../opengl_shader.c:   97: glShaderSource( 2, 1, [0x56067e991a40], (nil) );
~/.../opengl_shader.c:  105: glCompileShader( 2 );
~/.../opengl_shader.c:  106: glGetShaderiv( 2, GL_COMPILE_STATUS, 0x7ffc86d0b428 );
~/.../opengl_vfxapp.c:   62: glAttachShader( 1, 2 );
Success
Creating/seeking shader with path '../run/shaders/frag.glsl'...
~/.../opengl_shader.c:   86: glCreateShader( GL_FRAGMENT_SHADER );
~/.../opengl_shader.c:   97: glShaderSource( 3, 1, [0x56067ef13710], (nil) );
~/.../opengl_shader.c:  105: glCompileShader( 3 );
~/.../opengl_shader.c:  106: glGetShaderiv( 3, GL_COMPILE_STATUS, 0x7ffc86d0b428 );
~/.../opengl_vfxapp.c:   62: glAttachShader( 1, 3 );
Success
Linking program...
~/.../opengl_vfxapp.c:   81: glLinkProgram( 1 );
~/.../opengl_vfxapp.c:   82: glGetProgramiv( 1, GL_LINK_STATUS, 0x7ffc86d0b5dc );
Success
Testing program...
~/.../opengl_vfxapp.c:   97: glValidateProgram( 1 );
~/.../opengl_vfxapp.c:   98: glGetProgramiv( 1, GL_VALIDATE_STATUS, 0x7ffc86d0b5dc );
Success
~/.../opengl_vfxapp.c:  145: glUseProgram( 1 );
~/.../opengl_vfxcfg.c:   23: glGenVertexArrays( 1, &ref );
=====================================[0] '(null)' vec4, name count = 1
~/.../opengl_vfxbuf.c:   27: glGenBuffers( 1, &ref );
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   94: glBindBuffer( GL_ARRAY_BUFFER, 1 );
~/.../opengl_vfxbuf.c:   97: glBufferData( GL_ARRAY_BUFFER, 112, 0x56067ef11c20, GL_STATIC_DRAW );
> [0][0] 'NulPoint' uint
~/.../opengl_vfxbuf.c:   27: glGenBuffers( 1, &ref );
~/.../opengl_vfxsym.c:   21: sym->loc = (GLint)glGetAttribLocation( 1, 'NulPoint' );
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   94: glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, 2 );
~/.../opengl_vfxbuf.c:   97: glBufferData( GL_ELEMENT_ARRAY_BUFFER, 28, 0x56067ef141e0, GL_STATIC_DRAW );
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   47: glBindBuffer( GL_ARRAY_BUFFER, 1 );
~/.../opengl_vfxsym.c:  114: glVertexAttribPointer( 0, 1, GL_UNSIGNED_INT, GL_FALSE, 4, (nil) );
=====================================[1] 'UINTS' uint, name count = 2
~/.../opengl_vfxbuf.c:   27: glGenBuffers( 1, &ref );
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   94: glBindBuffer( GL_UNIFORM_BUFFER, 3 );
~/.../opengl_vfxbuf.c:   97: glBufferData( GL_UNIFORM_BUFFER, 12, 0x56067eef55b0, GL_DYNAMIC_DRAW );
~/.../opengl_vfxsym.c:   29: sym->loc = (GLint)glGetUniformBlockIndex( 1, 'UINTS' );
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   47: glBindBuffer( GL_UNIFORM_BUFFER, 3 );
> [1][0] 'VtxCount' uint
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   47: glBindBuffer( GL_UNIFORM_BUFFER, 3 );
~/.../opengl_vfxsym.c:  174: glBufferSubData( GL_UNIFORM_BUFFER, 0, 4, (nil) );
> [1][1] 'FlatLine' uint
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   47: glBindBuffer( GL_UNIFORM_BUFFER, 3 );
~/.../opengl_vfxsym.c:  174: glBufferSubData( GL_UNIFORM_BUFFER, 4, 4, (nil) );
=====================================[2] 'DINTS' uint, name count = 2
~/.../opengl_vfxbuf.c:   27: glGenBuffers( 1, &ref );
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   94: glBindBuffer( GL_UNIFORM_BUFFER, 4 );
~/.../opengl_vfxbuf.c:   97: glBufferData( GL_UNIFORM_BUFFER, 24, 0x56067ef1ef20, GL_DYNAMIC_DRAW );
~/.../opengl_vfxsym.c:   29: sym->loc = (GLint)glGetUniformBlockIndex( 1, 'DINTS' );
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   47: glBindBuffer( GL_UNIFORM_BUFFER, 4 );
> [2][0] 'WinPoint' ivec2
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   47: glBindBuffer( GL_UNIFORM_BUFFER, 4 );
~/.../opengl_vfxsym.c:  174: glBufferSubData( GL_UNIFORM_BUFFER, 0, 8, (nil) );
> [2][1] 'WinSpace' ivec3
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   47: glBindBuffer( GL_UNIFORM_BUFFER, 4 );
~/.../opengl_vfxsym.c:  174: glBufferSubData( GL_UNIFORM_BUFFER, 4, 12, (nil) );
=====================================[3] 'FNUMS' uint, name count = 5
~/.../opengl_vfxbuf.c:   27: glGenBuffers( 1, &ref );
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   94: glBindBuffer( GL_UNIFORM_BUFFER, 5 );
~/.../opengl_vfxbuf.c:   97: glBufferData( GL_UNIFORM_BUFFER, 64, 0x56067ef0c5f0, GL_DYNAMIC_DRAW );
~/.../opengl_vfxsym.c:   29: sym->loc = (GLint)glGetUniformBlockIndex( 1, 'FNUMS' );
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   47: glBindBuffer( GL_UNIFORM_BUFFER, 5 );
> [3][0] 'WinScale' vec3
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   47: glBindBuffer( GL_UNIFORM_BUFFER, 5 );
~/.../opengl_vfxsym.c:  174: glBufferSubData( GL_UNIFORM_BUFFER, 0, 12, (nil) );
> [3][1] 'RegScale' vec3
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   47: glBindBuffer( GL_UNIFORM_BUFFER, 5 );
~/.../opengl_vfxsym.c:  174: glBufferSubData( GL_UNIFORM_BUFFER, 4, 12, (nil) );
> [3][2] 'RegPoint' vec3
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   47: glBindBuffer( GL_UNIFORM_BUFFER, 5 );
~/.../opengl_vfxsym.c:  174: glBufferSubData( GL_UNIFORM_BUFFER, 8, 12, (nil) );
> [3][3] 'RegEmits' vec3
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   47: glBindBuffer( GL_UNIFORM_BUFFER, 5 );
~/.../opengl_vfxsym.c:  174: glBufferSubData( GL_UNIFORM_BUFFER, 12, 12, (nil) );
> [3][4] 'RegTakes' vec3
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   47: glBindBuffer( GL_UNIFORM_BUFFER, 5 );
~/.../opengl_vfxsym.c:  174: glBufferSubData( GL_UNIFORM_BUFFER, 16, 12, (nil) );
=====================================[4] 'DNUMS' uint, name count = 1
~/.../opengl_vfxbuf.c:   27: glGenBuffers( 1, &ref );
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   94: glBindBuffer( GL_UNIFORM_BUFFER, 6 );
~/.../opengl_vfxbuf.c:   97: glBufferData( GL_UNIFORM_BUFFER, 8, 0x56067eef6140, GL_DYNAMIC_DRAW );
~/.../opengl_vfxsym.c:   29: sym->loc = (GLint)glGetUniformBlockIndex( 1, 'DNUMS' );
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   47: glBindBuffer( GL_UNIFORM_BUFFER, 6 );
> [4][0] 'dunused' double
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   47: glBindBuffer( GL_UNIFORM_BUFFER, 6 );
~/.../opengl_vfxsym.c:  174: glBufferSubData( GL_UNIFORM_BUFFER, 0, 8, (nil) );
===========Entering draw loop==========
~/.../opengl_vfxapp.c:  145: glUseProgram( 1 );
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   94: glBindBuffer( GL_UNIFORM_BUFFER, 6 );
~/.../opengl_vfxbuf.c:   97: glBufferData( GL_UNIFORM_BUFFER, 8, 0x56067eef6140, GL_DYNAMIC_DRAW );
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   94: glBindBuffer( GL_UNIFORM_BUFFER, 5 );
~/.../opengl_vfxbuf.c:   97: glBufferData( GL_UNIFORM_BUFFER, 64, 0x56067ef0c5f0, GL_DYNAMIC_DRAW );
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   94: glBindBuffer( GL_UNIFORM_BUFFER, 4 );
~/.../opengl_vfxbuf.c:   97: glBufferData( GL_UNIFORM_BUFFER, 24, 0x56067ef1ef20, GL_DYNAMIC_DRAW );
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   94: glBindBuffer( GL_UNIFORM_BUFFER, 3 );
~/.../opengl_vfxbuf.c:   97: glBufferData( GL_UNIFORM_BUFFER, 12, 0x56067eef55b0, GL_DYNAMIC_DRAW );
>	Enabling VfxSym 'NulPoint'
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   47: glBindBuffer( GL_ARRAY_BUFFER, 1 );
~/.../opengl_vfxbuf.c:   66: glVertexArrayElementBuffer( 1, 2 );
~/.../opengl_vfxbuf.c:  120: glDrawElementsInstanced( GL_TRIANGLE_STRIP, 7, GL_UNSIGNED_INT, 0x56067ef141e0, 4 );
>	Disabled VfxSym 'NulPoint'
-------------------------------
...
-------------------------------
~/.../opengl_vfxapp.c:  145: glUseProgram( 1 );
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   94: glBindBuffer( GL_UNIFORM_BUFFER, 6 );
~/.../opengl_vfxbuf.c:   97: glBufferData( GL_UNIFORM_BUFFER, 8, 0x56067eef6140, GL_DYNAMIC_DRAW );
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   94: glBindBuffer( GL_UNIFORM_BUFFER, 5 );
~/.../opengl_vfxbuf.c:   97: glBufferData( GL_UNIFORM_BUFFER, 64, 0x56067ef0c5f0, GL_DYNAMIC_DRAW );
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   94: glBindBuffer( GL_UNIFORM_BUFFER, 4 );
~/.../opengl_vfxbuf.c:   97: glBufferData( GL_UNIFORM_BUFFER, 24, 0x56067ef1ef20, GL_DYNAMIC_DRAW );
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   94: glBindBuffer( GL_UNIFORM_BUFFER, 3 );
~/.../opengl_vfxbuf.c:   97: glBufferData( GL_UNIFORM_BUFFER, 12, 0x56067eef55b0, GL_DYNAMIC_DRAW );
>	Enabling VfxSym 'NulPoint'
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   47: glBindBuffer( GL_ARRAY_BUFFER, 1 );
~/.../opengl_vfxbuf.c:   66: glVertexArrayElementBuffer( 1, 2 );
~/.../opengl_vfxbuf.c:  120: glDrawElementsInstanced( GL_TRIANGLE_STRIP, 7, GL_UNSIGNED_INT, 0x56067ef141e0, 4 );
>	Disabled VfxSym 'NulPoint'
-------------------------------
make: *** [../../gnu.mak:40: test] Killed
Compilation failed.

Edit: Noticed I had failed to correct some code that decided what to send and what to bind in the draw loop, corrected it and replaced the above output with the new output, still need someone to check over the calls

Did a bunch of changes, mainly to fix the improperly terminated objects (where buffers were not being deleted) and to simplify some logic to just reference an array function instead of checking what type of
symbol is being passed (indexed vs non-indexed vs uniform vs uniform member), still no triangle on screen though, still need someone to check over my calls:

make test
...
cd ../../../bin && ./tryextra._x86_64_linux_cc_debug.elf -D APP_DATA=../run
Attempting to open module './libvfxglfw._x86_64_linux_cc_debug.so'... Success!
Attempting to open module './libvfxgl._x86_64_linux_cc_debug.so'... Success!
Creating program 'flat'
~/.../opengl_vfxapp.c:   42: glCreateProgram();
Creating/seeking shader with path '../run/shaders/spec.glsl'...
~/.../opengl_shader.c:   86: glCreateShader( GL_VERTEX_SHADER );
~/.../opengl_shader.c:   97: glShaderSource( 2, 1, [0x56395a75bce0], (nil) );
~/.../opengl_shader.c:  105: glCompileShader( 2 );
~/.../opengl_shader.c:  106: glGetShaderiv( 2, GL_COMPILE_STATUS, 0x7ffe0282d0f8 );
~/.../opengl_vfxapp.c:   62: glAttachShader( 1, 2 );
Success
Creating/seeking shader with path '../run/shaders/frag.glsl'...
~/.../opengl_shader.c:   86: glCreateShader( GL_FRAGMENT_SHADER );
~/.../opengl_shader.c:   97: glShaderSource( 3, 1, [0x56395acdda40], (nil) );
~/.../opengl_shader.c:  105: glCompileShader( 3 );
~/.../opengl_shader.c:  106: glGetShaderiv( 3, GL_COMPILE_STATUS, 0x7ffe0282d0f8 );
~/.../opengl_vfxapp.c:   62: glAttachShader( 1, 3 );
Success
Linking program...
~/.../opengl_vfxapp.c:   81: glLinkProgram( 1 );
~/.../opengl_vfxapp.c:   82: glGetProgramiv( 1, GL_LINK_STATUS, 0x7ffe0282d29c );
Success
Testing program...
~/.../opengl_vfxapp.c:   97: glValidateProgram( 1 );
~/.../opengl_vfxapp.c:   98: glGetProgramiv( 1, GL_VALIDATE_STATUS, 0x7ffe0282d29c );
Success
~/.../opengl_vfxapp.c:  145: glUseProgram( 1 );
~/.../opengl_vfxcfg.c:   23: glGenVertexArrays( 1, &ref );
=====================================[0] '(null)' vec4, name count = 1
~/.../opengl_vfxbuf.c:   31: glGenBuffers( 1, &ref );
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   98: glBindBuffer( GL_ARRAY_BUFFER, 1 );
~/.../opengl_vfxbuf.c:  101: glBufferData( GL_ARRAY_BUFFER, 112, 0x56395acd9c50, GL_STATIC_DRAW );
> [0][0] 'NulPoint' uint
~/.../opengl_vfxbuf.c:   31: glGenBuffers( 1, &ref );
~/.../opengl_vfxsym.c:   21: glGetAttribLocation( 1, 'NulPoint' );
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   98: glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, 2 );
~/.../opengl_vfxbuf.c:  101: glBufferData( GL_ELEMENT_ARRAY_BUFFER, 28, 0x56395acde650, GL_STATIC_DRAW );
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   51: glBindBuffer( GL_ARRAY_BUFFER, 1 );
=====================================[1] 'UINTS' uint, name count = 2
~/.../opengl_vfxbuf.c:   31: glGenBuffers( 1, &ref );
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   98: glBindBuffer( GL_UNIFORM_BUFFER, 3 );
~/.../opengl_vfxbuf.c:  101: glBufferData( GL_UNIFORM_BUFFER, 12, 0x56395ace5390, GL_DYNAMIC_DRAW );
~/.../opengl_vfxsym.c:   53: glGetUniformBlockIndex( 1, 'UINTS' );
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   51: glBindBuffer( GL_UNIFORM_BUFFER, 3 );
> [1][0] 'VtxCount' uint
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   51: glBindBuffer( GL_UNIFORM_BUFFER, 3 );
> [1][1] 'FlatLine' uint
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   51: glBindBuffer( GL_UNIFORM_BUFFER, 3 );
=====================================[2] 'DINTS' uint, name count = 2
~/.../opengl_vfxbuf.c:   31: glGenBuffers( 1, &ref );
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   98: glBindBuffer( GL_UNIFORM_BUFFER, 4 );
~/.../opengl_vfxbuf.c:  101: glBufferData( GL_UNIFORM_BUFFER, 24, 0x56395ace21a0, GL_DYNAMIC_DRAW );
~/.../opengl_vfxsym.c:   53: glGetUniformBlockIndex( 1, 'DINTS' );
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   51: glBindBuffer( GL_UNIFORM_BUFFER, 4 );
> [2][0] 'WinPoint' ivec2
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   51: glBindBuffer( GL_UNIFORM_BUFFER, 4 );
> [2][1] 'WinSpace' ivec3
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   51: glBindBuffer( GL_UNIFORM_BUFFER, 4 );
=====================================[3] 'FNUMS' uint, name count = 5
~/.../opengl_vfxbuf.c:   31: glGenBuffers( 1, &ref );
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   98: glBindBuffer( GL_UNIFORM_BUFFER, 5 );
~/.../opengl_vfxbuf.c:  101: glBufferData( GL_UNIFORM_BUFFER, 64, 0x56395acadeb0, GL_DYNAMIC_DRAW );
~/.../opengl_vfxsym.c:   53: glGetUniformBlockIndex( 1, 'FNUMS' );
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   51: glBindBuffer( GL_UNIFORM_BUFFER, 5 );
> [3][0] 'WinScale' vec3
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   51: glBindBuffer( GL_UNIFORM_BUFFER, 5 );
> [3][1] 'RegScale' vec3
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   51: glBindBuffer( GL_UNIFORM_BUFFER, 5 );
> [3][2] 'RegPoint' vec3
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   51: glBindBuffer( GL_UNIFORM_BUFFER, 5 );
> [3][3] 'RegEmits' vec3
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   51: glBindBuffer( GL_UNIFORM_BUFFER, 5 );
> [3][4] 'RegTakes' vec3
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   51: glBindBuffer( GL_UNIFORM_BUFFER, 5 );
=====================================[4] 'DNUMS' uint, name count = 1
~/.../opengl_vfxbuf.c:   31: glGenBuffers( 1, &ref );
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   98: glBindBuffer( GL_UNIFORM_BUFFER, 6 );
~/.../opengl_vfxbuf.c:  101: glBufferData( GL_UNIFORM_BUFFER, 8, 0x56395ace11f0, GL_DYNAMIC_DRAW );
~/.../opengl_vfxsym.c:   53: glGetUniformBlockIndex( 1, 'DNUMS' );
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   51: glBindBuffer( GL_UNIFORM_BUFFER, 6 );
> [4][0] 'dunused' double
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   51: glBindBuffer( GL_UNIFORM_BUFFER, 6 );
===========Entering draw loop==========
~/.../opengl_vfxapp.c:  145: glUseProgram( 1 );
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   98: glBindBuffer( GL_UNIFORM_BUFFER, 6 );
~/.../opengl_vfxbuf.c:  101: glBufferData( GL_UNIFORM_BUFFER, 8, 0x56395ace11f0, GL_DYNAMIC_DRAW );
~/.../opengl_vfxbuf.c:   98: glBindBuffer( GL_UNIFORM_BUFFER, 5 );
~/.../opengl_vfxbuf.c:  101: glBufferData( GL_UNIFORM_BUFFER, 64, 0x56395acadeb0, GL_DYNAMIC_DRAW );
~/.../opengl_vfxbuf.c:   98: glBindBuffer( GL_UNIFORM_BUFFER, 4 );
~/.../opengl_vfxbuf.c:  101: glBufferData( GL_UNIFORM_BUFFER, 24, 0x56395ace21a0, GL_DYNAMIC_DRAW );
~/.../opengl_vfxbuf.c:   98: glBindBuffer( GL_UNIFORM_BUFFER, 3 );
~/.../opengl_vfxbuf.c:  101: glBufferData( GL_UNIFORM_BUFFER, 12, 0x56395ace5390, GL_DYNAMIC_DRAW );
>	Enabling VfxSym 'NulPoint'
~/.../opengl_vfxbuf.c:   51: glBindBuffer( GL_ARRAY_BUFFER, 1 );
~/.../opengl_vfxsym.c:  242: glDrawElementsInstanced( GL_TRIANGLE_STRIP, 7, GL_UNSIGNED_INT, 0x56395acde650, 4 );
>	Disabled VfxSym 'NulPoint'
-------------------------------
...
-------------------------------
~/.../opengl_vfxbuf.c:   16: glDeleteBuffers( 1, [6] );
~/.../opengl_vfxbuf.c:   16: glDeleteBuffers( 1, [5] );
~/.../opengl_vfxbuf.c:   16: glDeleteBuffers( 1, [4] );
~/.../opengl_vfxbuf.c:   16: glDeleteBuffers( 1, [3] );
~/.../opengl_vfxbuf.c:   16: glDeleteBuffers( 1, [2] );
~/.../opengl_vfxcfg.c:   42: glDeleteVertexArrays( 1, [1] );
~/.../opengl_shader.c:  128: glDeleteShader( 3 );
~/.../opengl_shader.c:  128: glDeleteShader( 2 );
~/.../opengl_vfxapp.c:  154: glDeleteProgram( 1 );
Compilation finished successfully.

Edit: I doubt it’s needed but here’s a link to the code that generated the above output:

After finding a thread on stack overflow I realised I was still using the wrong calls to initialise the uniform structs, after putting in plenty of coding to correct that and some other changes besides I’ve reached a strange error:

make test
...
cd ../../bin && ./tryextra._x86_64_linux_cc_debug.elf -D APP_DATA=../run
Attempting to open module './libvfxglfw._x86_64_linux_cc_debug.so'... Success!
Attempting to open module './libvfxgl._x86_64_linux_cc_debug.so'... Success!
Creating program 'flat'
~/.../opengl_vfxapp.c:   42: glCreateProgram();
Creating/seeking shader with path '../run/shaders/spec.glsl'...
~/.../opengl_shader.c:   86: glCreateShader( GL_VERTEX_SHADER );
~/.../opengl_shader.c:   97: glShaderSource( 2, 1, [0x56243b91bc30], (nil) );
~/.../opengl_shader.c:  105: glCompileShader( 2 );
~/.../opengl_shader.c:  106: glGetShaderiv( 2, GL_COMPILE_STATUS, 0x7ffc740c4888 );
~/.../opengl_vfxapp.c:   62: glAttachShader( 1, 2 );
Success
Creating/seeking shader with path '../run/shaders/frag.glsl'...
~/.../opengl_shader.c:   86: glCreateShader( GL_FRAGMENT_SHADER );
~/.../opengl_shader.c:   97: glShaderSource( 3, 1, [0x56243be9da40], (nil) );
~/.../opengl_shader.c:  105: glCompileShader( 3 );
~/.../opengl_shader.c:  106: glGetShaderiv( 3, GL_COMPILE_STATUS, 0x7ffc740c4888 );
~/.../opengl_vfxapp.c:   62: glAttachShader( 1, 3 );
Success
Linking program...
~/.../opengl_vfxapp.c:   81: glLinkProgram( 1 );
~/.../opengl_vfxapp.c:   82: glGetProgramiv( 1, GL_LINK_STATUS, 0x7ffc740c4a2c );
Success
Testing program...
~/.../opengl_vfxapp.c:   97: glValidateProgram( 1 );
~/.../opengl_vfxapp.c:   98: glGetProgramiv( 1, GL_VALIDATE_STATUS, 0x7ffc740c4a2c );
Success
~/.../opengl_vfxapp.c:  145: glUseProgram( 1 );
~/.../opengl_vfxcfg.c:   23: glGenVertexArrays( 1, &ref );
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   31: glGenBuffers( 1, &ref );
=====================================[1] 'UINTS' uint, name count = 2
~/.../opengl_vfxsym.c:  109: glGetUniformBlockIndex( 1, 'UINTS' );
> [1][0] 'VtxCount' uint
~/.../opengl_vfxsym.c:  145: sym->loc = top->loc;
> [1][1] 'FlatLine' uint
~/.../opengl_vfxsym.c:  143: sym->loc = prv->loc + 1;
=====================================[2] 'DINTS' uint, name count = 2
~/.../opengl_vfxsym.c:  109: glGetUniformBlockIndex( 1, 'DINTS' );
> [2][0] 'WinPoint' ivec2
~/.../opengl_vfxsym.c:  145: sym->loc = top->loc;
> [2][1] 'WinSpace' ivec3
~/.../opengl_vfxsym.c:  143: sym->loc = prv->loc + 1;
=====================================[3] 'FNUMS' uint, name count = 5
~/.../opengl_vfxsym.c:  109: glGetUniformBlockIndex( 1, 'FNUMS' );
> [3][0] 'WinScale' vec3
~/.../opengl_vfxsym.c:  145: sym->loc = top->loc;
> [3][1] 'RegScale' vec3
~/.../opengl_vfxsym.c:  143: sym->loc = prv->loc + 1;
> [3][2] 'RegPoint' vec3
~/.../opengl_vfxsym.c:  143: sym->loc = prv->loc + 1;
> [3][3] 'RegEmits' vec3
~/.../opengl_vfxsym.c:  143: sym->loc = prv->loc + 1;
> [3][4] 'RegTakes' vec3
~/.../opengl_vfxsym.c:  143: sym->loc = prv->loc + 1;
=====================================[4] 'DNUMS' uint, name count = 1
~/.../opengl_vfxsym.c:  109: glGetUniformBlockIndex( 1, 'DNUMS' );
> [4][0] 'dunused' double
~/.../opengl_vfxsym.c:  145: sym->loc = top->loc;
=====================================[0] 'NulPoint' vec4, name count = 1
~/.../opengl_vfxbuf.c:   31: glGenBuffers( 1, &ref );
~/.../opengl_vfxsym.c:   21: glGetAttribLocation( 1, 'NulPoint' );
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   51: glBindBuffer( GL_ARRAY_BUFFER, 1 );
===========Entering draw loop==========
~/.../opengl_vfxapp.c:  145: glUseProgram( 1 );
~/.../opengl_vfxcfg.c:    6: glBindVertexArray( 1 );
~/.../opengl_vfxbuf.c:   51: glBindBuffer( GL_ARRAY_BUFFER, 1 );
~/.../opengl_vfxbuf.c:   70: glVertexArrayElementBuffer( 1, 2 );
~/.../debug.c:   90:
source = GL_DEBUG_SOURCE_API, defect = GL_DEBUG_TYPE_ERROR, weight = GL_DEBUG_SEVERITY_HIGH, fromid = 2 (GL_ID_UNKOWN)
report = GL_INVALID_OPERATION in glVertexArrayElementBuffer(non-existent buffer object 2)
make: *** [../../gnu.mak:40: test] Interrupt
Compilation failed.

Not sure what I’m doing wrong there, buffer object 2 should exist as the glGenBuffers() is successfully called twice after the glGenVertexArrays(), or rather the parameter I get the id from is only filled by glGenBuffers() (besides when clearing it to -1) so it should be impossible to have an invalid id

I’ll upload my code in a moment and edit the link in, I’m hoping the above is enough though since all the opengl calls are being displayed.

The thread I was referring to earlier btw:

Edit: The link for the code:

All the opengl related stuff is contained in the libvfxgl directory, the wrapper is the viewfx directory stuff minus the vfxwin stuff which wraps just glfw at the moment

Finally occurred to me to try using the symbols location instead of what the docs tell me to use, the buffer reference, stopped complaining after that. Someone should change this from the docs:

https://docs.gl/gl4/glVertexArrayElementBuffer

Specifies the name of the buffer object to use for the element array buffer binding

To say something less misleading like:
Specifies the location of the symbol to use for the element array buffer binding

OK: What’s a “location” and a “symbol”?

See, words have meaning. In OpenGL, “the name of the buffer object” is a term that has a specific meaning. It’s what you get back from glGen/CreateBuffers. You personally might call this a “symbol” or a “location”, but OpenGL calls it a “name”. Therefore, OpenGL’s documentation will also call it a name.

So changing the documentation as such would cause confusion, as the docs would now have inconsistent terminology. In particular, the term “location” already has a specific meaning within the context of OpenGL: locations are numeric identifiers used for assigning values to user-defined shader constructs. And the element array buffer does not interact with a user-defined shader construct (gl_VertexID does get the element array index, but it’s not user-defined). So calling it a “location” isn’t just confusing; it’s flat-out wrong.

Your problem is that you don’t like OpenGL’s terminology. But that’s a “you” problem, not an OpenGL documentation problem.

Someone apparently has a glass heart if they think “smartass” is offensive (only thing I could think of from my post that would even remotely be seen as “offensive”, it’s a throwaway word for crying out loud, not something you get in a huff about sheesh).

@zxuiji, let me introduce you to this page:

Khronos Forums FAQ:

So we’re supposed to pretend nobody here is a person, right got it.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.