~ubuntu-branches/ubuntu/vivid/clutter-1.0/vivid-proposed

« back to all changes in this revision

Viewing changes to clutter/cogl/cogl/cogl-sub-texture-private.h

  • Committer: Bazaar Package Importer
  • Author(s): Emilio Pozuelo Monfort
  • Date: 2010-07-18 17:21:49 UTC
  • mfrom: (1.2.1 upstream) (4.1.3 experimental)
  • Revision ID: james.westby@ubuntu.com-20100718172149-j6s9u4chocaoykme
Tags: 1.2.12-1
* New upstream release.
* debian/libclutter-1.0-0.symbols,
  debian/rules:
  - Add a symbols file.
* debian/rules,
  debian/source/format:
  - Switch to source format 3.0 (quilt).
* debian/control.in:
  - Standards-Version is 3.9.0, no changes needed.
* Upload to unstable.

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_SUB_TEXTURE_H
 
25
#define __COGL_SUB_TEXTURE_H
 
26
 
 
27
#include "cogl-handle.h"
 
28
#include "cogl-texture-private.h"
 
29
 
 
30
#define COGL_SUB_TEXTURE(tex) ((CoglSubTexture *) tex)
 
31
 
 
32
typedef struct _CoglSubTexture CoglSubTexture;
 
33
 
 
34
struct _CoglSubTexture
 
35
{
 
36
  CoglTexture _parent;
 
37
 
 
38
  /* This is the texture that was passed in to
 
39
     _cogl_sub_texture_new. If this is also a sub texture then we will
 
40
     use the full texture from that to render instead of making a
 
41
     chain. However we want to preserve the next texture in case the
 
42
     user is expecting us to keep a reference and also so that we can
 
43
     later add a cogl_sub_texture_get_full_texture() function. */
 
44
  CoglHandle  next_texture;
 
45
  /* This is the texture that will actually be used to draw. It will
 
46
     point to the end of the chain if a sub texture of a sub texture
 
47
     is created */
 
48
  CoglHandle  full_texture;
 
49
 
 
50
  /* The region represented by this sub-texture. This is the region of
 
51
     full_texture which won't necessarily be the same as the region
 
52
     passed to _cogl_sub_texture_new if next_texture is actually
 
53
     already a sub texture */
 
54
  int         sub_x;
 
55
  int         sub_y;
 
56
  int         sub_width;
 
57
  int         sub_height;
 
58
};
 
59
 
 
60
GQuark
 
61
_cogl_handle_sub_texture_get_type (void);
 
62
 
 
63
CoglHandle
 
64
_cogl_sub_texture_new (CoglHandle next_texture,
 
65
                       int sub_x,
 
66
                       int sub_y,
 
67
                       int sub_width,
 
68
                       int sub_height);
 
69
 
 
70
#endif /* __COGL_SUB_TEXTURE_H */