4
* An object oriented GL/GLES Abstraction/Utility Layer
6
* Copyright (C) 2012 Intel Corporation.
8
* This library is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU Lesser General Public
10
* License as published by the Free Software Foundation; either
11
* version 2 of the License, or (at your option) any later version.
13
* This library is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
* Lesser General Public License for more details.
18
* You should have received a copy of the GNU Lesser General Public
19
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
23
* Robert Bragg <robert@linux.intel.com>
26
#ifndef _COGL_UTIL_GL_PRIVATE_H_
28
#include "cogl-types.h"
29
#include "cogl-context.h"
30
#include "cogl-gl-header.h"
35
_cogl_gl_error_to_string (GLenum error_code);
37
#define GE(ctx, x) G_STMT_START { \
40
while ((__err = (ctx)->glGetError ()) != GL_NO_ERROR) \
42
g_warning ("%s: GL error (%d): %s\n", \
45
_cogl_gl_error_to_string (__err)); \
48
#define GE_RET(ret, ctx, x) G_STMT_START { \
51
while ((__err = (ctx)->glGetError ()) != GL_NO_ERROR) \
53
g_warning ("%s: GL error (%d): %s\n", \
56
_cogl_gl_error_to_string (__err)); \
59
#else /* !COGL_GL_DEBUG */
61
#define GE(ctx, x) ((ctx)->x)
62
#define GE_RET(ret, ctx, x) (ret = ((ctx)->x))
64
#endif /* COGL_GL_DEBUG */
67
_cogl_gl_util_catch_out_of_memory (CoglContext *ctx, CoglError **error);
69
#endif /* _COGL_UTIL_GL_PRIVATE_H_ */