1set_projection_viewport(3)      Allegro manual      set_projection_viewport(3)
2
3
4

NAME

6       set_projection_viewport - Sets the viewport used to scale the output of
7       persp_project(). Allegro game programming library.
8

SYNOPSIS

10       #include <allegro.h>
11
12
13       void set_projection_viewport(int x, int y, int w, int h);
14

DESCRIPTION

16       Sets the viewport used to scale the output of the persp_project() func‐
17       tion.  Pass  the  dimensions  of the screen area you want to draw onto,
18       which will typically be 0, 0, SCREEN_W, and SCREEN_H. Also don't forget
19       to  pass  an  appropriate  aspect ratio to get_camera_matrix later. The
20       width and height you specify here will determine how big your  viewport
21       is  in  3d  space. So if an object in your 3D space is w units wide, it
22       will fill the complete screen when you run into it (i.e., if it  has  a
23       distance  of  1.0  after  the  camera  matrix  was applied. The fov and
24       aspect-ratio parameters to get_camera_matrix also  apply  some  scaling
25       though, so this isn't always completely true). If you pass -1/-1/2/2 as
26       parameters, no extra scaling will be performed by the projection.
27
28

SEE ALSO

30       persp_project(3),    get_camera_matrix(3),    ex3d(3),     excamera(3),
31       exquat(3), exscn3d(3), exstars(3), exzbuf(3)
32
33
34
35Allegro                          version 4.4.3      set_projection_viewport(3)
Impressum