cl-opengl icon indicating copy to clipboard operation
cl-opengl copied to clipboard

`INVALID-OPERATION` from `END` when using `gl:vertex-attrib`

Open 3b opened this issue 1 year ago • 0 comments

gl:vertex-attrib uses an extension function, and those are queried on demand, so if the first call happens within a BEGIN/END pair it might cause END to error.

Not sure cl-opengl can do anything about that transparently, but possibly could add a check for querying an extension pointer within BEGIN/END and give a more informative error in that case? Shouldn't hurt performance much since it would only need to check on first call of each ext function when it is doing extra work anyway.

User code can just call gl:vertex-attrib at some point during initialization to make sure the function is loaded outside BEGIN/END.

Also applies to gl:multi-tex-coord, not sure any other ext functions are allowed within BEGIN/END

3b avatar Aug 28 '24 15:08 3b