~noskcaj/ubuntu/trusty/cogl/1.16.2

« back to all changes in this revision

Viewing changes to cogl/driver/gl/cogl-util-gl-private.h

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha, Jeremy Bicha, Rico Tzschichholz
  • Date: 2013-02-26 16:43:25 UTC
  • mfrom: (1.1.10)
  • Revision ID: package-import@ubuntu.com-20130226164325-t4z9rylpa20v0p6q
Tags: 1.13.4-0ubuntu1
[ Jeremy Bicha ]
* New upstream release
  - soname bump
* debian/control.in:
  - Bump minimum glib to 2.32
  - Drop obsolete breaks/replaces
  - Bump libclutter-1.0-dev breaks for soname transition
* debian/libcogl-dev.install:
  - Add some missing files

[ Rico Tzschichholz ]
* debian/control.in:
  - Build-depend on libxrandr-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Cogl
 
3
 *
 
4
 * An object oriented GL/GLES Abstraction/Utility Layer
 
5
 *
 
6
 * Copyright (C) 2012 Intel Corporation.
 
7
 *
 
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.
 
12
 *
 
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.
 
17
 *
 
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/>.
 
20
 *
 
21
 *
 
22
 * Authors:
 
23
 *  Robert Bragg   <robert@linux.intel.com>
 
24
 */
 
25
 
 
26
#ifndef _COGL_UTIL_GL_PRIVATE_H_
 
27
 
 
28
#include "cogl-types.h"
 
29
#include "cogl-context.h"
 
30
#include "cogl-gl-header.h"
 
31
 
 
32
#ifdef COGL_GL_DEBUG
 
33
 
 
34
const char *
 
35
_cogl_gl_error_to_string (GLenum error_code);
 
36
 
 
37
#define GE(ctx, x)                      G_STMT_START {  \
 
38
  GLenum __err;                                         \
 
39
  (ctx)->x;                                             \
 
40
  while ((__err = (ctx)->glGetError ()) != GL_NO_ERROR) \
 
41
    {                                                   \
 
42
      g_warning ("%s: GL error (%d): %s\n",             \
 
43
                 G_STRLOC,                              \
 
44
                 __err,                                 \
 
45
                 _cogl_gl_error_to_string (__err));     \
 
46
    }                                   } G_STMT_END
 
47
 
 
48
#define GE_RET(ret, ctx, x)             G_STMT_START {  \
 
49
  GLenum __err;                                         \
 
50
  ret = (ctx)->x;                                       \
 
51
  while ((__err = (ctx)->glGetError ()) != GL_NO_ERROR) \
 
52
    {                                                   \
 
53
      g_warning ("%s: GL error (%d): %s\n",             \
 
54
                 G_STRLOC,                              \
 
55
                 __err,                                 \
 
56
                 _cogl_gl_error_to_string (__err));     \
 
57
    }                                   } G_STMT_END
 
58
 
 
59
#else /* !COGL_GL_DEBUG */
 
60
 
 
61
#define GE(ctx, x) ((ctx)->x)
 
62
#define GE_RET(ret, ctx, x) (ret = ((ctx)->x))
 
63
 
 
64
#endif /* COGL_GL_DEBUG */
 
65
 
 
66
CoglBool
 
67
_cogl_gl_util_catch_out_of_memory (CoglContext *ctx, CoglError **error);
 
68
 
 
69
#endif /* _COGL_UTIL_GL_PRIVATE_H_ */