Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in
A
acgl
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • ACGL
  • acgl
  • Wiki
  • debugging opengl

debugging opengl

Last edited by Ming Li Nov 26, 2015
Page history

ARB_debug_output

The best start to debug OpenGL is by its included error checks and messages. Traditionally the programmer had to call glGetError() after each call that could fail. Newer OpenGL versions (4.3 and newer) have a callback functionality that replaces this (also available for older GL versions as the extension http://www.opengl.org/registry/specs/ARB/debug_output.txt ). As this extension needs a special debug context (this is not part of OpenGL but of the library that opens the OpenGL window, e.g. GLFW or QT) and some systems don't support this way of debugging (e.g. MacOS X 10.9 and older), ACGL includes a kind of emulator for this functionality. This works internally by calling glGetError() after each GL call - this slows down the apps, but is very helpful during development.

Per default this emulator is activated, deactivate this by calling ACGL::init() with the optional parameter false ( ACGL::init( false ) ). Use this for the final, working releases to get a bit of extra performance.

Other ACGL functions

To inspect textures (and thus layers of framebuffers) you can save TextureData objects to file with saveTextureData( texture->getTextureImage(), "debug.png" ).

OpenGL debugger

There is currently no good cross-platform debugger for OpenGL. For simple API traces, state inspections and reruns of calls you can use APItrace (https://github.com/apitrace/apitrace).

NVidia has a good debugger, that is NVidia and Windows only.

Valve is currently working on a new debugger.

Clone repository
  • .vao file format
  • acgl compile time settings
  • acgl versions
  • basic openGL concepts to look up
  • custom shader parser
  • debugging opengl
  • extending acgl
  • external libraries included in acgl
  • faq
  • function overview
  • gamepad
  • getting started
  • Home
  • includes in shaders
  • learning openGL
More Pages

New Wiki Page

Tip: You can specify the full path for the new file. We will automatically create any missing directories.