]> git.mxchange.org Git - flightgear.git/blob - src/Main/renderer.hxx
The view frustum is defined in plib apps using calls to ssgSetFOV() and
[flightgear.git] / src / Main / renderer.hxx
1
2 #ifndef __FG_RENDERER_HXX
3 #define __FG_RENDERER_HXX 1
4
5 #include <simgear/screen/extensions.hxx>
6 #include <simgear/scene/sky/sky.hxx>
7
8 #define FG_ENABLE_MULTIPASS_CLOUDS 1
9
10 class SGSky;
11 extern SGSky *thesky;
12
13 extern glPointParameterfProc glPointParameterfPtr;
14 extern glPointParameterfvProc glPointParameterfvPtr;
15 extern bool glPointParameterIsSupported;
16
17
18 class FGRenderer {
19
20 public:
21
22     FGRenderer();
23     ~FGRenderer();
24
25     void init();
26
27     void build_states();
28     static void resize(int width, int height );
29
30     // calling update( refresh_camera_settings = false ) will not
31     // touch window or camera settings.  This is useful for the tiled
32     // renderer which needs to set the view frustum itself.
33     static void update( bool refresh_camera_settings );
34     inline static void update() { update( true ); }
35
36
37     /** FlightGear code should use this routine to set the FOV rather
38      *  than calling the ssg routine directly
39      */
40     static void setFOV( float w, float h );
41
42
43     /** FlightGear code should use this routine to set the Near/Far
44      *  clip planes rather than calling the ssg routine directly
45      */
46     static void setNearFar( float n, float f );
47 };
48
49 #endif