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

« back to all changes in this revision

Viewing changes to clutter/cogl/cogl/cogl-atlas-texture-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) 2009 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_ATLAS_TEXTURE_H
 
25
#define __COGL_ATLAS_TEXTURE_H
 
26
 
 
27
#include "cogl-handle.h"
 
28
#include "cogl-texture-private.h"
 
29
#include "cogl-atlas.h"
 
30
 
 
31
#define COGL_ATLAS_TEXTURE(tex) ((CoglAtlasTexture *) tex)
 
32
 
 
33
typedef struct _CoglAtlasTexture CoglAtlasTexture;
 
34
 
 
35
struct _CoglAtlasTexture
 
36
{
 
37
  CoglTexture        _parent;
 
38
 
 
39
  /* The format that the texture is in. This isn't necessarily the
 
40
     same format as the atlas texture because we can store
 
41
     pre-multiplied and non-pre-multiplied textures together */
 
42
  CoglPixelFormat    format;
 
43
 
 
44
  /* The rectangle that was used to add this texture to the
 
45
     atlas. This includes the 1-pixel border */
 
46
  CoglAtlasRectangle rectangle;
 
47
 
 
48
  /* The texture might need to be migrated out in which case this will
 
49
     be set to TRUE and sub_texture will actually be a real texture */
 
50
  gboolean           in_atlas;
 
51
 
 
52
  /* A CoglSubTexture representing the region for easy rendering */
 
53
  CoglHandle         sub_texture;
 
54
};
 
55
 
 
56
GQuark
 
57
_cogl_handle_atlas_texture_get_type (void);
 
58
 
 
59
CoglHandle
 
60
_cogl_atlas_texture_new_from_bitmap (CoglHandle       bmp_handle,
 
61
                                     CoglTextureFlags flags,
 
62
                                     CoglPixelFormat  internal_format);
 
63
 
 
64
#endif /* __COGL_ATLAS_TEXTURE_H */