Debugging OpenGL applications

I have googled a bit and I plan to try nvidia Linux Graphics Debugger.

I am getting annoyed by of a 1281 error in opengl when I use my simple On Screen Display to show me some stats. Is there any other tool that is better than this one or simpler for Nvidia GPU or is there any tutorials that i can read about debugging OpenGL apps.

I want to fix this annying error and hopefully learn some basics on how to debug OpenGL

Ok i fixed some issuees with Nvidia Linux OpenGL Debugger but when i try to capture a frame I get this error:

Detected unsupported operations that may cause errors or a crash during capture.
First seen unsupported operation: glXCreatePbuffer

and with gDebugger i cant even start the application due to some libraries issues with Mesa and Nvidia proprietary drivers.

Any ideas that might help ??

I would suggest you start by turning on debug output in your OpenGL context, and setting a debug message callback with glDebugMessageCallback(). This is infinitely more useful than sprinkling glGetError() all over the place.

I might try and do that. the whole problem is to create opengl context without using any xorg functions. I am using sdl2 so i guess it uses xorg to do the creation of the context and to swap buffers.
I need to create a xorg window but then i need to create 2 opengl context and swap them as framebuffer using opengl functions. this should fix the error in Linux debugger. How i can create opengl context i have to read and figure it out.