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, write to the
20
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21
* Boston, MA 02111-1307, USA.
24
* Havoc Pennington <hp@pobox.com> for litl
27
#ifndef __COGL_CURRENT_MATRIX_H
28
#define __COGL_CURRENT_MATRIX_H
30
#include <cogl/cogl-matrix.h>
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
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
50
COGL_MATRIX_MODELVIEW = 1,
51
COGL_MATRIX_PROJECTION = 2,
52
COGL_MATRIX_TEXTURE = 3
55
#define COGL_TYPE_MATRIX_MODE (cogl_matrix_mode_get_type ())
56
GType cogl_matrix_mode_get_type (void) G_GNUC_CONST;
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,
68
void _cogl_current_matrix_scale (float x,
71
void _cogl_current_matrix_translate (float x,
74
void _cogl_current_matrix_frustum (float left,
80
void _cogl_current_matrix_ortho (float left,
86
void _cogl_get_matrix (CoglMatrixMode mode,
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);
93
void _cogl_flush_matrix_stacks (void);
95
#endif /* __COGL_CURRENT_MATRIX_H */