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

« back to all changes in this revision

Viewing changes to clutter/cogl/common/cogl-current-matrix.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, write to the
20
 
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21
 
 * Boston, MA 02111-1307, USA.
22
 
 *
23
 
 * Authors:
24
 
 *   Havoc Pennington <hp@pobox.com> for litl
25
 
 */
26
 
 
27
 
#ifndef __COGL_CURRENT_MATRIX_H
28
 
#define __COGL_CURRENT_MATRIX_H
29
 
 
30
 
#include <cogl/cogl-matrix.h>
31
 
 
32
 
/**
33
 
 * CoglMatrixMode:
34
 
 * @COGL_MATRIX_MODELVIEW: Select model-view matrix stack
35
 
 * @COGL_MATRIX_PROJECTION: Select projection matrix stack
36
 
 * @COGL_MATRIX_TEXTURE: Select texture matrix stack
37
 
 *
38
 
 * There are several matrix stacks affected by the COGL current matrix
39
 
 * operations (which are private). Code should always leave the
40
 
 * model-view matrix active, switching to the projection matrix stack
41
 
 * only temporarily in order to modify the projection matrix. Most
42
 
 * COGL and Clutter APIs (other than the current matrix operations)
43
 
 * will assume the model-view matrix is active when the API is
44
 
 * invoked.
45
 
 *
46
 
 * Since: 1.0
47
 
 */
48
 
typedef enum
49
 
{
50
 
  COGL_MATRIX_MODELVIEW   = 1,
51
 
  COGL_MATRIX_PROJECTION  = 2,
52
 
  COGL_MATRIX_TEXTURE  = 3
53
 
} CoglMatrixMode;
54
 
 
55
 
#define COGL_TYPE_MATRIX_MODE     (cogl_matrix_mode_get_type ())
56
 
GType cogl_matrix_mode_get_type (void) G_GNUC_CONST;
57
 
 
58
 
void _cogl_set_current_matrix            (CoglMatrixMode    mode);
59
 
void _cogl_current_matrix_push           (void);
60
 
void _cogl_current_matrix_pop            (void);
61
 
void _cogl_current_matrix_identity       (void);
62
 
void _cogl_current_matrix_load           (const CoglMatrix *matrix);
63
 
void _cogl_current_matrix_multiply       (const CoglMatrix *matrix);
64
 
void _cogl_current_matrix_rotate         (float             angle,
65
 
                                          float             x,
66
 
                                          float             y,
67
 
                                          float             z);
68
 
void _cogl_current_matrix_scale          (float             x,
69
 
                                          float             y,
70
 
                                          float             z);
71
 
void _cogl_current_matrix_translate      (float             x,
72
 
                                          float             y,
73
 
                                          float             z);
74
 
void _cogl_current_matrix_frustum        (float             left,
75
 
                                          float             right,
76
 
                                          float             bottom,
77
 
                                          float             top,
78
 
                                          float             near_val,
79
 
                                          float             far_val);
80
 
void _cogl_current_matrix_ortho          (float             left,
81
 
                                          float             right,
82
 
                                          float             bottom,
83
 
                                          float             top,
84
 
                                          float             near_val,
85
 
                                          float             far_val);
86
 
void _cogl_get_matrix                    (CoglMatrixMode    mode,
87
 
                                          CoglMatrix       *matrix);
88
 
void _cogl_current_matrix_state_init     (void);
89
 
void _cogl_current_matrix_state_destroy  (void);
90
 
void _cogl_current_matrix_state_flush    (void);
91
 
void _cogl_current_matrix_state_dirty    (void);
92
 
 
93
 
void _cogl_flush_matrix_stacks           (void);
94
 
 
95
 
#endif /* __COGL_CURRENT_MATRIX_H */