1848b8605Smrg<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2848b8605Smrg<html lang="en">
3848b8605Smrg<head>
4848b8605Smrg  <meta http-equiv="content-type" content="text/html; charset=utf-8">
5848b8605Smrg  <title>Debugging Tips</title>
6848b8605Smrg  <link rel="stylesheet" type="text/css" href="mesa.css">
7848b8605Smrg</head>
8848b8605Smrg<body>
9848b8605Smrg
10848b8605Smrg<div class="header">
11848b8605Smrg  <h1>The Mesa 3D Graphics Library</h1>
12848b8605Smrg</div>
13848b8605Smrg
14848b8605Smrg<iframe src="contents.html"></iframe>
15848b8605Smrg<div class="content">
16848b8605Smrg
17848b8605Smrg<h1>Debugging Tips</h1>
18848b8605Smrg
19848b8605Smrg<p>
20848b8605Smrg   Normally Mesa (and OpenGL) records but does not notify the user of
21848b8605Smrg   errors.  It is up to the application to call
22848b8605Smrg   <code>glGetError</code> to check for errors.  Mesa supports an
23848b8605Smrg   environment variable, MESA_DEBUG, to help with debugging.  If
24848b8605Smrg   MESA_DEBUG is defined, a message will be printed to stdout whenever
25848b8605Smrg   an error occurs.
26848b8605Smrg</p>
27848b8605Smrg
28848b8605Smrg<p>
29b8e80941Smrg   More extensive error checking is done in DEBUG builds
30b8e80941Smrg   (<code>--buildtype debug</code> for meson, <code>build=debug</code> for scons).
31848b8605Smrg</p>
32848b8605Smrg<p>
33848b8605Smrg   In your debugger you can set a breakpoint in _mesa_error() to trap Mesa
34848b8605Smrg   errors.
35848b8605Smrg</p>
36848b8605Smrg<p>
37848b8605Smrg   There is a display list printing/debugging facility.  See the end of
38848b8605Smrg   src/dlist.c for details.
39848b8605Smrg</p>
40848b8605Smrg
41848b8605Smrg</div>
42848b8605Smrg</body>
43848b8605Smrg</html>
44