4
* An object oriented GL/GLES Abstraction/Utility Layer
6
* Copyright (C) 2009 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/>.
24
#ifndef __COGL_ATLAS_TEXTURE_H
25
#define __COGL_ATLAS_TEXTURE_H
27
#include "cogl-handle.h"
28
#include "cogl-texture-private.h"
29
#include "cogl-atlas.h"
31
#define COGL_ATLAS_TEXTURE(tex) ((CoglAtlasTexture *) tex)
33
typedef struct _CoglAtlasTexture CoglAtlasTexture;
35
struct _CoglAtlasTexture
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;
44
/* The rectangle that was used to add this texture to the
45
atlas. This includes the 1-pixel border */
46
CoglAtlasRectangle rectangle;
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 */
52
/* A CoglSubTexture representing the region for easy rendering */
53
CoglHandle sub_texture;
57
_cogl_handle_atlas_texture_get_type (void);
60
_cogl_atlas_texture_new_from_bitmap (CoglHandle bmp_handle,
61
CoglTextureFlags flags,
62
CoglPixelFormat internal_format);
64
#endif /* __COGL_ATLAS_TEXTURE_H */