]> git.mxchange.org Git - flightgear.git/blob - src/Main/renderer.hxx
Add support for point sprites.
[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 extern bool glPointSpriteIsSupported;
17
18
19 class FGRenderer {
20
21 public:
22
23     FGRenderer();
24     ~FGRenderer();
25
26     void init();
27
28     void build_states();
29     static void resize(int width, int height );
30
31     // calling update( refresh_camera_settings = false ) will not
32     // touch window or camera settings.  This is useful for the tiled
33     // renderer which needs to set the view frustum itself.
34     static void update( bool refresh_camera_settings );
35     inline static void update() { update( true ); }
36
37
38     /** FlightGear code should use this routine to set the FOV rather
39      *  than calling the ssg routine directly
40      */
41     static void setFOV( float w, float h );
42
43
44     /** FlightGear code should use this routine to set the Near/Far
45      *  clip planes rather than calling the ssg routine directly
46      */
47     static void setNearFar( float n, float f );
48
49     /** Get the pick start point and direction in global coordinates.
50      *  The inputs are expected to be the x and y coordinates of the
51      *  screen point relative to the window.
52      */
53     static bool getPickInfo( sgdVec3 p, sgdVec3 d, unsigned x, unsigned y );
54 };
55
56 #endif