I give opengl a callback for errors. I set a breakpoint in the callback to check in the stacktrace which of my calls to opengl generates an error.
Here is the stack trace from gdb :
1 2 3 4 5 6 7 8 9 10 11 | Static tracepoint 2 at 0x555555562f5b: file main.c, line 402. (gdb) bt #0 MessageCallback (source=33350, type=33356, id=1282, severity=37190, length=92, message=0x7fffe6c70b40 "GL_INVALID_OPERATION error generated. The operation is invalid when the uniform is a matrix.", userParam=0x0) at main.c:402 #1 0x00007fffe59af378 in ?? () from /usr/lib/libnvidia-glcore.so.440.82 #2 0x00007fffe59af4c0 in ?? () from /usr/lib/libnvidia-glcore.so.440.82 #3 0x00007fffe59af782 in ?? () from /usr/lib/libnvidia-glcore.so.440.82 #4 0x00007fffe5b72a13 in ?? () from /usr/lib/libnvidia-glcore.so.440.82 #5 0x0000555555564f01 in init () at main.c:816 #6 0x0000555555563314 in main () at main.c:500 (gdb) |
So my code on #0 (in the callback)
#1,2,3,4 stuffs in the nvidia driver code or somthing like thiks
#5, 6 back to my code
On codeclap I only get #0 and #1

continuing to step in the code enventually get me back to my code.