Difference between revisions of "Portal:OpenGL Concepts/Debugging"

From OpenGL Wiki
Jump to navigation Jump to search
(Separation of OpenGL Error from Error checking page. Probable reintegration.)
m (Small clarification)
 
Line 1: Line 1:
 
'''Debugging''' an OpenGL application can be difficult. But OpenGL does provide ways to make debugging more reasonable.
 
'''Debugging''' an OpenGL application can be difficult. But OpenGL does provide ways to make debugging more reasonable.
  
OpenGL requires its functions to [[OpenGL Error|check their parameters for mistakes or inconsistencies]], and emit [[OpenGL Error Codes|errors]] when this occurs. If an error occurs, in the vast majority of cases, the function emitting the error will have no effect.
+
OpenGL requires its functions to [[OpenGL Error|check their parameters for mistakes or inconsistencies]], and emit [[OpenGL Error Codes|errors]] should these occur. If an error occurs, in the vast majority of cases, the function emitting the error will have no effect.
  
 
Because [[Error Checking|error checking]] is a very manual process, many OpenGL implementations provide access to [[Debug Output]]. This functionality is a powerful mechanism for handling testing these kinds of errors without being explicit about it. There are also a number of [[Debugging Tool]]s available to help track down OpenGL errors and other issues.
 
Because [[Error Checking|error checking]] is a very manual process, many OpenGL implementations provide access to [[Debug Output]]. This functionality is a powerful mechanism for handling testing these kinds of errors without being explicit about it. There are also a number of [[Debugging Tool]]s available to help track down OpenGL errors and other issues.
  
The OpenGL error mechanism does not test all possible incorrect uses of the API; this is mainly for performance reasons. These kinds of mistakes result in improper rendering and must be manually found, though debugging tools can help in these cases too.
+
The OpenGL error mechanism does not test all possible incorrect uses of the API; this is mainly for performance reasons. Most untested mistakes result in improper rendering and must be manually found, though debugging tools can help in these cases too.

Latest revision as of 15:36, 1 December 2014

Debugging an OpenGL application can be difficult. But OpenGL does provide ways to make debugging more reasonable.

OpenGL requires its functions to check their parameters for mistakes or inconsistencies, and emit errors should these occur. If an error occurs, in the vast majority of cases, the function emitting the error will have no effect.

Because error checking is a very manual process, many OpenGL implementations provide access to Debug Output. This functionality is a powerful mechanism for handling testing these kinds of errors without being explicit about it. There are also a number of Debugging Tools available to help track down OpenGL errors and other issues.

The OpenGL error mechanism does not test all possible incorrect uses of the API; this is mainly for performance reasons. Most untested mistakes result in improper rendering and must be manually found, though debugging tools can help in these cases too.