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_
14 // Everything in this header is deprecated - use the classes in matrix.h instead
17 Sets up an orthogonal projection.
19 void ortho(double, double, double, double, double, double);
22 Sets up an orthogonal projection, with origin at the center of the screen.
24 void ortho_centered(double, double);
27 Sets up an orthogonal projection, with origin at the bottom left corner of the
30 void ortho_bottomleft(double, double);
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.
36 void ortho_topleft(double, double);
39 Sets up a perspective projection.
41 void frustum(double, double, double, double, double, double);
44 Sets up a perspective projection, with origin at the center of the screen.
46 void frustum_centered(double width, double height, double near, double far);
49 Sets up a centered perspective projection in a simple way.
51 void perspective(double fov_y, double aspect, double near, double far);