TORCS  1.3.9
The Open Racing Car Simulator
graphic.h
Go to the documentation of this file.
1 /***************************************************************************
2 
3  file : graphic.h
4  created : Sun Jan 30 22:58:45 CET 2000
5  copyright : (C) 2000-2013 by Eric Espie, Bernhard Wymann
6  email : torcs@free.fr
7  version : $Id$
8 
9  ***************************************************************************/
10 
11 /***************************************************************************
12  * *
13  * This program is free software; you can redistribute it and/or modify *
14  * it under the terms of the GNU General Public License as published by *
15  * the Free Software Foundation; either version 2 of the License, or *
16  * (at your option) any later version. *
17  * *
18  ***************************************************************************/
19 
20 
21 #ifndef _GRAPHV1_H_
22 #define _GRAPHV1_H_
23 
37 #include <track.h>
38 #include <car.h>
39 
40 #define GRX_IDENT 0
41 
42 #define GR_PARAM_FILE "config/graph.xml"
43 
44 #define GR_SOUND_PARM_CFG "config/sound.xml"
45 #define GR_SCT_SOUND "Sound Settings"
46 #define GR_ATT_SOUND_STATE "state"
47 #define GR_ATT_SOUND_STATE_PLIB "plib"
48 #define GR_ATT_SOUND_STATE_OPENAL "openal"
49 #define GR_ATT_SOUND_STATE_DISABLED "disabled"
50 #define GR_ATT_SOUND_VOLUME "volume"
51 
52 #define GR_SCT_GLFEATURES "OpenGL Features"
53 #define GR_ATT_TEXTURECOMPRESSION "texture compression ARB"
54 #define GR_ATT_TEXTURECOMPRESSION_ENABLED "enabled"
55 #define GR_ATT_TEXTURECOMPRESSION_DISABLED "disabled"
56 
57 #define GR_ATT_WHEELRENDERING "wheel rendering"
58 #define GR_ATT_WHEELRENDERING_DETAILED "detailed"
59 #define GR_ATT_WHEELRENDERING_SIMPLE "simple"
60 
61 #define GR_ATT_TEXTURESIZE "user texture sizelimit"
62 
63 #define GR_SCT_DISPMODE "Display Mode"
64 #define GR_ATT_CAM "camera"
65 #define GR_ATT_CAM_HEAD "camera head list"
66 #define GR_ATT_MIRROR "enable mirror"
67 #define GR_ATT_MAP "map mode"
68 #define GR_ATT_FOVY "fovy"
69 #define GR_ATT_BOARD "driver board"
70 #define GR_ATT_COUNTER "driver counter"
71 #define GR_ATT_LEADER "leader board"
72 #define GR_ATT_DEBUG "debug info"
73 #define GR_ATT_GGRAPH "G graph"
74 #define GR_ATT_ARCADE "arcade"
75 #define GR_ATT_NBLEADER "Max leaders entries"
76 
77 #define GR_SCT_TVDIR "TV Director View"
78 #define GR_ATT_CHGCAMINT "change camera interval"
79 #define GR_ATT_EVTINT "event interval"
80 #define GR_ATT_PROXTHLD "proximity threshold"
81 
82 #define GR_SCT_GRAPHIC "Graphic"
83 #define GR_ATT_SMOKENB "smoke value"
84 #define GR_ATT_SMOKEDELTAT "smoke interval"
85 #define GR_ATT_SMOKEDLIFE "smoke duration"
86 
87 #define GR_ATT_MAXSTRIPBYWHEEL "skid value"
88 #define GR_ATT_MAXPOINTBYSTRIP "skid length"
89 #define GR_ATT_SKIDDELTAT "skid interval"
90 #define GR_ATT_FOVFACT "fov factor"
91 #define GR_ATT_LODFACTOR "LOD Factor"
92 
93 #define GR_ATT_NB_SCREENS "number of screens"
94 #define GR_ATT_CUR_DRV "current driver"
95 
96 #define GR_SCT_PLAYABLE_DOV "Playable Cameras Distance of Views"
97 #define GR_ATT_FRONT_GLOBAL "Front Level Group Global"
98 #define GR_ATT_FRONT_LEVEL3 "Front Level Group 3"
99 #define GR_ATT_FRONT_LEVEL2 "Front Level Group 2"
100 #define GR_ATT_FRONT_LEVEL1 "Front Level Group 1"
101 #define GR_ATT_REAR_GLOBAL "Rear Level Group Global"
102 #define GR_ATT_REAR_LEVEL3 "Rear Level Group 3"
103 #define GR_ATT_REAR_LEVEL2 "Rear Level Group 2"
104 #define GR_ATT_REAR_LEVEL1 "Rear Level Group 1"
105 
106 #define GR_ATT_FRONT_MAP1 "Front Level Map 1"
107 #define GR_ATT_FRONT_MAP2 "Front Level Map 2"
108 #define GR_ATT_FRONT_MAP3 "Front Level Map 3"
109 #define GR_ATT_REAR_MAP1 "Rear Level Map 1"
110 #define GR_ATT_REAR_MAP2 "Rear Level Map 2"
111 #define GR_ATT_REAR_MAP3 "Rear Level Map 3"
112 
113 
114 /* graphic functions prototypes */
115 
116 struct Situation;
117 
118 #define GR_VIEW_STD 0 /* full screen view */
119 #define GR_VIEW_PART 1 /* partial screen view (scissor test) */
120 
125 typedef int (*tfGraphicInitTrack)(tTrack* track);
126 
131 typedef int (*tfGraphicInitCars)(struct Situation* s);
132 
144 typedef int (*tfGraphicInitView)(int x, int y, int width, int height, int flag, void * screen);
145 
151 typedef int (*tfGraphicRefresh)(struct Situation *);
152 
156 typedef void (*tfGraphicShutdwnCars)(void);
157 
161 typedef void (*tfGraphicShutdwnTrack)(void);
162 
166 typedef void (*tGraphicMuteForMenu)(void);
167 
168 class ssgEntity;
169 typedef void (*tfGraphicBendCar) (int /*index*/, sgVec3 /*poc*/, sgVec3 /*force*/, int /*cnt*/);
170 
174 typedef struct {
182  //tfGraphicBendCar bendcar;
183 } tGraphicItf;
184 
185 
186 
187 
188 #endif /* _GRAPHV1_H_ */
189 
190 
191 
tfGraphicInitView initview
Definition: graphic.h:176
int(* tfGraphicInitView)(int x, int y, int width, int height, int flag, void *screen)
Init viewport for rendering.
Definition: graphic.h:144
cars situation used to inform the GUI and the drivers
Definition: raceman.h:85
tfGraphicShutdwnCars shutdowncars
Definition: graphic.h:179
tfGraphicShutdwnTrack shutdowntrack
Definition: graphic.h:180
Track structure.
Definition: track.h:502
tfGraphicRefresh refresh
Definition: graphic.h:178
tfGraphicInitCars initcars
Definition: graphic.h:177
void(* tfGraphicShutdwnCars)(void)
Shut down and release car models.
Definition: graphic.h:156
void(* tGraphicMuteForMenu)(void)
Set output audio gain to 0 to mute sound, used for menus during race, tfGraphicRefresh will reset the...
Definition: graphic.h:166
int(* tfGraphicRefresh)(struct Situation *)
Render scene based on given situation.
Definition: graphic.h:151
tGraphicMuteForMenu muteformenu
Definition: graphic.h:181
int(* tfGraphicInitCars)(struct Situation *s)
Load and set up car models for rendering.
Definition: graphic.h:131
int(* tfGraphicInitTrack)(tTrack *track)
Load and set up track model for rendering.
Definition: graphic.h:125
This is the car structure.
int track(tModInfo *modInfo)
Definition: trackitf.cpp:85
static Vector y[4]
Definition: Convex.cpp:56
tfGraphicInitTrack inittrack
Definition: graphic.h:175
void(* tfGraphicBendCar)(int, sgVec3, sgVec3, int)
Definition: graphic.h:169
Track Structure and Track Loader Module Definition.
void(* tfGraphicShutdwnTrack)(void)
Shut down and release track model.
Definition: graphic.h:161
Interface Structure for Graphic Renering Module.
Definition: graphic.h:174