GLError checking

General chat related to ScummVM, adventure gaming, and so on.

Moderator: ScummVM Team

Post Reply
User avatar
Raziel
ScummVM Porter
Posts: 1539
Joined: Tue Oct 25, 2005 8:27 am
Location: a dying planet
Contact:

GLError checking

Post by Raziel »

Would it be possible to add GLError checking to residualvm, or, if there already is a mechanism, how do i activate/use it?
Botje
Posts: 207
Joined: Thu Feb 28, 2013 5:48 pm

Re: GLError checking

Post by Botje »

If you're simply enabling error checking for debugging, here is what I would do: (in descending order of convenience)
- Use gDEBugger or AMD CodeXL and break on error
- Use apitrace or Renderdoc and check the error log
- If your OpenGL implementation is new enough or has the right extensions, use the OpenGL debug hooks
- If your OpenGL implementation is open source, put a breakpoint on the function that sets the error flag
- Finally, if nothing else works, patch the code to wrap all OpenGL calls with a wrapper that calls `glGetError`.
User avatar
Raziel
ScummVM Porter
Posts: 1539
Joined: Tue Oct 25, 2005 8:27 am
Location: a dying planet
Contact:

Re: GLError checking

Post by Raziel »

@Botje

Thank you, i'll go with the easiest...have yet to find out which, probably apitrace (guess something like this exists on AmigaOS4)
User avatar
Raziel
ScummVM Porter
Posts: 1539
Joined: Tue Oct 25, 2005 8:27 am
Location: a dying planet
Contact:

Re: GLError checking

Post by Raziel »

1) i don't have a working debugger (gdb is buggy here)
2) glsnoop (apitrace for AmigaOS) does not display any errors (then again it's alpha)
3) The debug hooks sound interesting, but are beyond my capabilities
4) It is opensource, but i'm nowhere near to add anything or compile a working one myself
5) heh, sure :-/

Guess i'll try to catch something with the buggy debugger
User avatar
Raziel
ScummVM Porter
Posts: 1539
Joined: Tue Oct 25, 2005 8:27 am
Location: a dying planet
Contact:

Re: GLError checking

Post by Raziel »

Nope, debugger is buggy

I assume it's an unsupported PixelFormat, since i had something similar lately in ScummVM's BladeRunner engine.
Post Reply