~oem-solutions-group/unity-2d/clutter-1.0

« back to all changes in this revision

Viewing changes to clutter/cogl/cogl/cogl-pixel-buffer-private.h

  • Committer: Bazaar Package Importer
  • Author(s): Emilio Pozuelo Monfort
  • Date: 2010-03-21 13:27:56 UTC
  • mto: (2.1.3 experimental)
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20100321132756-nf8yd30yxo3zzwcm
Tags: upstream-1.2.2
ImportĀ upstreamĀ versionĀ 1.2.2

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) 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
 * Authors:
 
24
 *   Damien Lespiau <damien.lespiau@intel.com>
 
25
 */
 
26
 
 
27
#ifndef __COGL_PIXEL_BUFFER_PRIVATE_H__
 
28
#define __COGL_PIXEL_BUFFER_PRIVATE_H__
 
29
 
 
30
#include "cogl-handle.h"
 
31
#include "cogl-buffer-private.h"
 
32
 
 
33
#include <glib.h>
 
34
 
 
35
G_BEGIN_DECLS
 
36
 
 
37
#define COGL_PIXEL_BUFFER(buffer)     ((CoglPixelBuffer *)(buffer))
 
38
 
 
39
#define COGL_PIXEL_BUFFER_SET_FLAG(buffer, flag) \
 
40
  ((buffer)->flags |= (COGL_PIXEL_BUFFER_FLAG_ ## flag))
 
41
 
 
42
#define COGL_PIXEL_BUFFER_CLEAR_FLAG(buffer, flag) \
 
43
  ((buffer)->flags &= ~(COGL_PIXEL_BUFFER_FLAG_ ## flag))
 
44
 
 
45
#define COGL_PIXEL_BUFFER_FLAG_IS_SET(buffer, flag) \
 
46
  ((buffer)->flags & (COGL_PIXEL_BUFFER_FLAG_ ## flag))
 
47
 
 
48
typedef enum _CoglPixelBufferFlags
 
49
{
 
50
  COGL_PIXEL_BUFFER_FLAG_NONE = 0,
 
51
  COGL_PIXEL_BUFFER_FLAG_STORE_CREATED = 1 << 0,
 
52
} CoglPixelBufferFlags;
 
53
 
 
54
typedef struct _CoglPixelBuffer
 
55
{
 
56
  CoglBuffer            _parent;
 
57
 
 
58
  CoglPixelBufferFlags  flags;
 
59
 
 
60
  GLenum                gl_target;
 
61
  CoglPixelFormat       format;
 
62
  unsigned int          width;
 
63
  unsigned int          height;
 
64
  unsigned int          stride;
 
65
 
 
66
} CoglPixelBuffer;
 
67
 
 
68
GQuark
 
69
_cogl_handle_pixel_buffer_get_type (void);
 
70
 
 
71
G_END_DECLS
 
72
 
 
73
#endif /* __COGL_PIXEL_BUFFER_PRIVATE_H__ */