mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-01 14:58:09 +02:00
gl: Throw a _cairo_error when detecting a GLerror
This allows us to easily set an breakpoint and inspect cairo's state when we do something illegal.
This commit is contained in:
parent
1c18ab02c8
commit
8695c41e80
1 changed files with 3 additions and 1 deletions
|
|
@ -206,8 +206,10 @@ cairo_private extern const cairo_surface_backend_t _cairo_gl_surface_backend;
|
|||
cairo_private const char *_cairo_gl_error_to_string (GLenum err);
|
||||
#define _cairo_gl_check_error() do { \
|
||||
GLenum err; \
|
||||
while ((err = glGetError ())) \
|
||||
while ((err = glGetError ())) { \
|
||||
fprintf (stderr, "%s:%d: GL error 0x%04x: %s\n", __FILE__,__LINE__, (int) err, _cairo_gl_error_to_string (err)); \
|
||||
_cairo_error_throw (CAIRO_STATUS_DEVICE_ERROR); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
static inline cairo_device_t *
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue