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

« back to all changes in this revision

Viewing changes to clutter/cogl/cogl/cogl-matrix-stack.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
 * Authors:
 
24
 *   Havoc Pennington <hp@pobox.com> for litl
 
25
 */
 
26
 
 
27
#ifndef __COGL_MATRIX_STACK_H
 
28
#define __COGL_MATRIX_STACK_H
 
29
 
 
30
#include "cogl-matrix.h"
 
31
 
 
32
typedef struct _CoglMatrixStack CoglMatrixStack;
 
33
 
 
34
typedef enum {
 
35
  COGL_MATRIX_MODELVIEW,
 
36
  COGL_MATRIX_PROJECTION,
 
37
  COGL_MATRIX_TEXTURE
 
38
} CoglMatrixMode;
 
39
 
 
40
CoglMatrixStack* _cogl_matrix_stack_new           (void);
 
41
void             _cogl_matrix_stack_destroy       (CoglMatrixStack  *stack);
 
42
void             _cogl_matrix_stack_push          (CoglMatrixStack  *stack);
 
43
void             _cogl_matrix_stack_pop           (CoglMatrixStack  *stack);
 
44
void             _cogl_matrix_stack_load_identity (CoglMatrixStack  *stack);
 
45
void             _cogl_matrix_stack_scale         (CoglMatrixStack  *stack,
 
46
                                                   float             x,
 
47
                                                   float             y,
 
48
                                                   float             z);
 
49
void             _cogl_matrix_stack_translate     (CoglMatrixStack  *stack,
 
50
                                                   float             x,
 
51
                                                   float             y,
 
52
                                                   float             z);
 
53
void             _cogl_matrix_stack_rotate        (CoglMatrixStack  *stack,
 
54
                                                   float             angle,
 
55
                                                   float             x,
 
56
                                                   float             y,
 
57
                                                   float             z);
 
58
void             _cogl_matrix_stack_multiply      (CoglMatrixStack  *stack,
 
59
                                                   const CoglMatrix *matrix);
 
60
void             _cogl_matrix_stack_frustum       (CoglMatrixStack  *stack,
 
61
                                                   float             left,
 
62
                                                   float             right,
 
63
                                                   float             bottom,
 
64
                                                   float             top,
 
65
                                                   float             z_near,
 
66
                                                   float             z_far);
 
67
void             _cogl_matrix_stack_perspective   (CoglMatrixStack  *stack,
 
68
                                                   float             fov_y,
 
69
                                                   float             aspect,
 
70
                                                   float             z_near,
 
71
                                                   float             z_far);
 
72
void             _cogl_matrix_stack_ortho         (CoglMatrixStack  *stack,
 
73
                                                   float             left,
 
74
                                                   float             right,
 
75
                                                   float             bottom,
 
76
                                                   float             top,
 
77
                                                   float             z_near,
 
78
                                                   float             z_far);
 
79
 
 
80
gboolean         _cogl_matrix_stack_get_inverse   (CoglMatrixStack  *stack,
 
81
                                                   CoglMatrix       *inverse);
 
82
void             _cogl_matrix_stack_get           (CoglMatrixStack  *stack,
 
83
                                                   CoglMatrix       *matrix);
 
84
void             _cogl_matrix_stack_set           (CoglMatrixStack  *stack,
 
85
                                                   const CoglMatrix *matrix);
 
86
void             _cogl_matrix_stack_flush_to_gl   (CoglMatrixStack  *stack,
 
87
                                                   CoglMatrixMode    mode);
 
88
void             _cogl_matrix_stack_dirty         (CoglMatrixStack  *stack);
 
89
 
 
90
#endif /* __COGL_MATRIX_STACK_H */