~noskcaj/ubuntu/trusty/cogl/1.16.2

« back to all changes in this revision

Viewing changes to cogl/cogl-internal.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) 2007,2008,2009,2010 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
 
 */
23
 
 
24
 
#ifndef __COGL_INTERNAL_H
25
 
#define __COGL_INTERNAL_H
26
 
 
27
 
#include "cogl-bitmask.h"
28
 
#include "cogl-gl-header.h"
29
 
 
30
 
#ifdef COGL_HAS_XLIB_SUPPORT
31
 
#include <X11/Xutil.h>
32
 
#endif
33
 
 
34
 
#ifdef COGL_GL_DEBUG
35
 
 
36
 
const char *
37
 
_cogl_gl_error_to_string (GLenum error_code);
38
 
 
39
 
#define GE(ctx, x)                      G_STMT_START {  \
40
 
  GLenum __err;                                         \
41
 
  (ctx)->x;                                             \
42
 
  while ((__err = (ctx)->glGetError ()) != GL_NO_ERROR) \
43
 
    {                                                   \
44
 
      g_warning ("%s: GL error (%d): %s\n",             \
45
 
                 G_STRLOC,                              \
46
 
                 __err,                                 \
47
 
                 _cogl_gl_error_to_string (__err));     \
48
 
    }                                   } G_STMT_END
49
 
 
50
 
#define GE_RET(ret, ctx, x)             G_STMT_START {  \
51
 
  GLenum __err;                                         \
52
 
  ret = (ctx)->x;                                       \
53
 
  while ((__err = (ctx)->glGetError ()) != GL_NO_ERROR) \
54
 
    {                                                   \
55
 
      g_warning ("%s: GL error (%d): %s\n",             \
56
 
                 G_STRLOC,                              \
57
 
                 __err,                                 \
58
 
                 _cogl_gl_error_to_string (__err));     \
59
 
    }                                   } G_STMT_END
60
 
 
61
 
#else /* !COGL_GL_DEBUG */
62
 
 
63
 
#define GE(ctx, x) ((ctx)->x)
64
 
#define GE_RET(ret, ctx, x) (ret = ((ctx)->x))
65
 
 
66
 
#endif /* COGL_GL_DEBUG */
67
 
 
68
 
#define COGL_ENABLE_ALPHA_TEST        (1<<1)
69
 
#define COGL_ENABLE_VERTEX_ARRAY      (1<<2)
70
 
#define COGL_ENABLE_COLOR_ARRAY       (1<<3)
71
 
 
72
 
void
73
 
_cogl_enable (unsigned long flags);
74
 
 
75
 
unsigned long
76
 
_cogl_get_enable (void);
77
 
 
78
 
void
79
 
_cogl_transform_point (const CoglMatrix *matrix_mv,
80
 
                       const CoglMatrix *matrix_p,
81
 
                       const float *viewport,
82
 
                       float *x,
83
 
                       float *y);
84
 
 
85
 
#define COGL_DRIVER_ERROR (_cogl_driver_error_quark ())
86
 
 
87
 
typedef enum { /*< prefix=COGL_DRIVER_ERROR >*/
88
 
  COGL_DRIVER_ERROR_UNKNOWN_VERSION,
89
 
  COGL_DRIVER_ERROR_INVALID_VERSION,
90
 
  COGL_DRIVER_ERROR_NO_SUITABLE_DRIVER_FOUND,
91
 
  COGL_DRIVER_ERROR_FAILED_TO_LOAD_LIBRARY
92
 
} CoglDriverError;
93
 
 
94
 
typedef enum
95
 
{
96
 
  COGL_PRIVATE_FEATURE_TEXTURE_2D_FROM_EGL_IMAGE = 1L<<0,
97
 
  COGL_PRIVATE_FEATURE_MESA_PACK_INVERT = 1L<<1,
98
 
  COGL_PRIVATE_FEATURE_STENCIL_BUFFER = 1L<<2,
99
 
  COGL_PRIVATE_FEATURE_OFFSCREEN_BLIT = 1L<<3,
100
 
  COGL_PRIVATE_FEATURE_FOUR_CLIP_PLANES = 1L<<4,
101
 
  COGL_PRIVATE_FEATURE_PBOS = 1L<<5,
102
 
  COGL_PRIVATE_FEATURE_VBOS = 1L<<6,
103
 
  COGL_PRIVATE_FEATURE_EXT_PACKED_DEPTH_STENCIL = 1L<<7,
104
 
  COGL_PRIVATE_FEATURE_OES_PACKED_DEPTH_STENCIL = 1L<<8,
105
 
  COGL_PRIVATE_FEATURE_TEXTURE_FORMAT_BGRA8888 = 1L<<9,
106
 
  COGL_PRIVATE_FEATURE_UNPACK_SUBIMAGE = 1L<<10,
107
 
  COGL_PRIVATE_FEATURE_SAMPLER_OBJECTS = 1L<<11
108
 
} CoglPrivateFeatureFlags;
109
 
 
110
 
/* Sometimes when evaluating pipelines, either during comparisons or
111
 
 * if calculating a hash value we need to tweak the evaluation
112
 
 * semantics */
113
 
typedef enum _CoglPipelineEvalFlags
114
 
{
115
 
  COGL_PIPELINE_EVAL_FLAG_NONE = 0
116
 
} CoglPipelineEvalFlags;
117
 
 
118
 
CoglBool
119
 
_cogl_check_extension (const char *name, const char *ext);
120
 
 
121
 
GQuark
122
 
_cogl_driver_error_quark (void);
123
 
 
124
 
#endif /* __COGL_INTERNAL_H */