3 This file is part of libmspgl
4 Copyright © 2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
8 #ifndef MSP_GL_PROJECTION_H_
9 #define MSP_GL_PROJECTION_H_
15 Sets up an orthogonal projection.
17 void ortho(double, double, double, double, double, double);
20 Sets up an orthogonal projection, with origin at the center of the screen.
22 void ortho_centered(double, double);
25 Sets up an orthogonal projection, with origin at the bottom left corner of the
28 void ortho_bottomleft(double, double);
31 Sets up an orthogonal projection, with origin at the top left corner of the
32 screen. The Y coordinate is reversed and grows downwards.
34 void ortho_topleft(double, double);
37 Sets up a perspective projection.
39 void frustum(double, double, double, double, double, double);
42 Sets up a perspective projection, with origin at the center of the screen.
44 void frustum_centered(double width, double height, double near, double far);
47 Sets up a centered perspective projection in a simple way.
49 void perspective(double fov_y, double aspect, double near, double far);