]> git.tdb.fi Git - libs/gl.git/blob - source/projection.h
2be8fd08f883383feb4cbd02bccca838360cf0a2
[libs/gl.git] / source / projection.h
1 /* $Id$
2
3 This file is part of libmspgl
4 Copyright © 2007  Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
6 */
7
8 #ifndef MSP_GL_PROJECTION_H_
9 #define MSP_GL_PROJECTION_H_
10
11 namespace Msp {
12 namespace GL {
13
14 // Everything in this header is deprecated - use the classes in matrix.h instead
15
16 /**
17 Sets up an orthogonal projection.
18 */
19 void ortho(double, double, double, double, double, double);
20
21 /**
22 Sets up an orthogonal projection, with origin at the center of the screen.
23 */
24 void ortho_centered(double, double);
25
26 /**
27 Sets up an orthogonal projection, with origin at the bottom left corner of the
28 screen.
29 */
30 void ortho_bottomleft(double, double);
31
32 /**
33 Sets up an orthogonal projection, with origin at the top left corner of the
34 screen.  The Y coordinate is reversed and grows downwards.
35 */
36 void ortho_topleft(double, double);
37
38 /**
39 Sets up a perspective projection.
40 */
41 void frustum(double, double, double, double, double, double);
42
43 /**
44 Sets up a perspective projection, with origin at the center of the screen.
45 */
46 void frustum_centered(double width, double height, double near, double far);
47
48 /**
49 Sets up a centered perspective projection in a simple way.
50 */
51 void perspective(double fov_y, double aspect, double near, double far);
52
53 } // namespace GL
54 } // namespace Msp
55
56 #endif