diff options
Diffstat (limited to 'libraries/irrlicht-1.8/include/IrrlichtDevice.h')
-rw-r--r-- | libraries/irrlicht-1.8/include/IrrlichtDevice.h | 644 |
1 files changed, 322 insertions, 322 deletions
diff --git a/libraries/irrlicht-1.8/include/IrrlichtDevice.h b/libraries/irrlicht-1.8/include/IrrlichtDevice.h index 9d4031e..536e10b 100644 --- a/libraries/irrlicht-1.8/include/IrrlichtDevice.h +++ b/libraries/irrlicht-1.8/include/IrrlichtDevice.h | |||
@@ -1,322 +1,322 @@ | |||
1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt | 1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt |
2 | // This file is part of the "Irrlicht Engine". | 2 | // This file is part of the "Irrlicht Engine". |
3 | // For conditions of distribution and use, see copyright notice in irrlicht.h | 3 | // For conditions of distribution and use, see copyright notice in irrlicht.h |
4 | 4 | ||
5 | #ifndef __I_IRRLICHT_DEVICE_H_INCLUDED__ | 5 | #ifndef __I_IRRLICHT_DEVICE_H_INCLUDED__ |
6 | #define __I_IRRLICHT_DEVICE_H_INCLUDED__ | 6 | #define __I_IRRLICHT_DEVICE_H_INCLUDED__ |
7 | 7 | ||
8 | #include "IReferenceCounted.h" | 8 | #include "IReferenceCounted.h" |
9 | #include "dimension2d.h" | 9 | #include "dimension2d.h" |
10 | #include "IVideoDriver.h" | 10 | #include "IVideoDriver.h" |
11 | #include "EDriverTypes.h" | 11 | #include "EDriverTypes.h" |
12 | #include "EDeviceTypes.h" | 12 | #include "EDeviceTypes.h" |
13 | #include "IEventReceiver.h" | 13 | #include "IEventReceiver.h" |
14 | #include "ICursorControl.h" | 14 | #include "ICursorControl.h" |
15 | #include "IVideoModeList.h" | 15 | #include "IVideoModeList.h" |
16 | #include "ITimer.h" | 16 | #include "ITimer.h" |
17 | #include "IOSOperator.h" | 17 | #include "IOSOperator.h" |
18 | 18 | ||
19 | namespace irr | 19 | namespace irr |
20 | { | 20 | { |
21 | class ILogger; | 21 | class ILogger; |
22 | class IEventReceiver; | 22 | class IEventReceiver; |
23 | class IRandomizer; | 23 | class IRandomizer; |
24 | 24 | ||
25 | namespace io { | 25 | namespace io { |
26 | class IFileSystem; | 26 | class IFileSystem; |
27 | } // end namespace io | 27 | } // end namespace io |
28 | 28 | ||
29 | namespace gui { | 29 | namespace gui { |
30 | class IGUIEnvironment; | 30 | class IGUIEnvironment; |
31 | } // end namespace gui | 31 | } // end namespace gui |
32 | 32 | ||
33 | namespace scene { | 33 | namespace scene { |
34 | class ISceneManager; | 34 | class ISceneManager; |
35 | } // end namespace scene | 35 | } // end namespace scene |
36 | 36 | ||
37 | //! The Irrlicht device. You can create it with createDevice() or createDeviceEx(). | 37 | //! The Irrlicht device. You can create it with createDevice() or createDeviceEx(). |
38 | /** This is the most important class of the Irrlicht Engine. You can | 38 | /** This is the most important class of the Irrlicht Engine. You can |
39 | access everything in the engine if you have a pointer to an instance of | 39 | access everything in the engine if you have a pointer to an instance of |
40 | this class. There should be only one instance of this class at any | 40 | this class. There should be only one instance of this class at any |
41 | time. | 41 | time. |
42 | */ | 42 | */ |
43 | class IrrlichtDevice : public virtual IReferenceCounted | 43 | class IrrlichtDevice : public virtual IReferenceCounted |
44 | { | 44 | { |
45 | public: | 45 | public: |
46 | 46 | ||
47 | //! Runs the device. | 47 | //! Runs the device. |
48 | /** Also increments the virtual timer by calling | 48 | /** Also increments the virtual timer by calling |
49 | ITimer::tick();. You can prevent this | 49 | ITimer::tick();. You can prevent this |
50 | by calling ITimer::stop(); before and ITimer::start() after | 50 | by calling ITimer::stop(); before and ITimer::start() after |
51 | calling IrrlichtDevice::run(). Returns false if device wants | 51 | calling IrrlichtDevice::run(). Returns false if device wants |
52 | to be deleted. Use it in this way: | 52 | to be deleted. Use it in this way: |
53 | \code | 53 | \code |
54 | while(device->run()) | 54 | while(device->run()) |
55 | { | 55 | { |
56 | // draw everything here | 56 | // draw everything here |
57 | } | 57 | } |
58 | \endcode | 58 | \endcode |
59 | If you want the device to do nothing if the window is inactive | 59 | If you want the device to do nothing if the window is inactive |
60 | (recommended), use the slightly enhanced code shown at isWindowActive(). | 60 | (recommended), use the slightly enhanced code shown at isWindowActive(). |
61 | 61 | ||
62 | Note if you are running Irrlicht inside an external, custom | 62 | Note if you are running Irrlicht inside an external, custom |
63 | created window: Calling Device->run() will cause Irrlicht to | 63 | created window: Calling Device->run() will cause Irrlicht to |
64 | dispatch windows messages internally. | 64 | dispatch windows messages internally. |
65 | If you are running Irrlicht in your own custom window, you can | 65 | If you are running Irrlicht in your own custom window, you can |
66 | also simply use your own message loop using GetMessage, | 66 | also simply use your own message loop using GetMessage, |
67 | DispatchMessage and whatever and simply don't use this method. | 67 | DispatchMessage and whatever and simply don't use this method. |
68 | But note that Irrlicht will not be able to fetch user input | 68 | But note that Irrlicht will not be able to fetch user input |
69 | then. See irr::SIrrlichtCreationParameters::WindowId for more | 69 | then. See irr::SIrrlichtCreationParameters::WindowId for more |
70 | informations and example code. | 70 | informations and example code. |
71 | */ | 71 | */ |
72 | virtual bool run() = 0; | 72 | virtual bool run() = 0; |
73 | 73 | ||
74 | //! Cause the device to temporarily pause execution and let other processes run. | 74 | //! Cause the device to temporarily pause execution and let other processes run. |
75 | /** This should bring down processor usage without major | 75 | /** This should bring down processor usage without major |
76 | performance loss for Irrlicht */ | 76 | performance loss for Irrlicht */ |
77 | virtual void yield() = 0; | 77 | virtual void yield() = 0; |
78 | 78 | ||
79 | //! Pause execution and let other processes to run for a specified amount of time. | 79 | //! Pause execution and let other processes to run for a specified amount of time. |
80 | /** It may not wait the full given time, as sleep may be interrupted | 80 | /** It may not wait the full given time, as sleep may be interrupted |
81 | \param timeMs: Time to sleep for in milisecs. | 81 | \param timeMs: Time to sleep for in milisecs. |
82 | \param pauseTimer: If true, pauses the device timer while sleeping | 82 | \param pauseTimer: If true, pauses the device timer while sleeping |
83 | */ | 83 | */ |
84 | virtual void sleep(u32 timeMs, bool pauseTimer=false) = 0; | 84 | virtual void sleep(u32 timeMs, bool pauseTimer=false) = 0; |
85 | 85 | ||
86 | //! Provides access to the video driver for drawing 3d and 2d geometry. | 86 | //! Provides access to the video driver for drawing 3d and 2d geometry. |
87 | /** \return Pointer the video driver. */ | 87 | /** \return Pointer the video driver. */ |
88 | virtual video::IVideoDriver* getVideoDriver() = 0; | 88 | virtual video::IVideoDriver* getVideoDriver() = 0; |
89 | 89 | ||
90 | //! Provides access to the virtual file system. | 90 | //! Provides access to the virtual file system. |
91 | /** \return Pointer to the file system. */ | 91 | /** \return Pointer to the file system. */ |
92 | virtual io::IFileSystem* getFileSystem() = 0; | 92 | virtual io::IFileSystem* getFileSystem() = 0; |
93 | 93 | ||
94 | //! Provides access to the 2d user interface environment. | 94 | //! Provides access to the 2d user interface environment. |
95 | /** \return Pointer to the gui environment. */ | 95 | /** \return Pointer to the gui environment. */ |
96 | virtual gui::IGUIEnvironment* getGUIEnvironment() = 0; | 96 | virtual gui::IGUIEnvironment* getGUIEnvironment() = 0; |
97 | 97 | ||
98 | //! Provides access to the scene manager. | 98 | //! Provides access to the scene manager. |
99 | /** \return Pointer to the scene manager. */ | 99 | /** \return Pointer to the scene manager. */ |
100 | virtual scene::ISceneManager* getSceneManager() = 0; | 100 | virtual scene::ISceneManager* getSceneManager() = 0; |
101 | 101 | ||
102 | //! Provides access to the cursor control. | 102 | //! Provides access to the cursor control. |
103 | /** \return Pointer to the mouse cursor control interface. */ | 103 | /** \return Pointer to the mouse cursor control interface. */ |
104 | virtual gui::ICursorControl* getCursorControl() = 0; | 104 | virtual gui::ICursorControl* getCursorControl() = 0; |
105 | 105 | ||
106 | //! Provides access to the message logger. | 106 | //! Provides access to the message logger. |
107 | /** \return Pointer to the logger. */ | 107 | /** \return Pointer to the logger. */ |
108 | virtual ILogger* getLogger() = 0; | 108 | virtual ILogger* getLogger() = 0; |
109 | 109 | ||
110 | //! Gets a list with all video modes available. | 110 | //! Gets a list with all video modes available. |
111 | /** If you are confused now, because you think you have to | 111 | /** If you are confused now, because you think you have to |
112 | create an Irrlicht Device with a video mode before being able | 112 | create an Irrlicht Device with a video mode before being able |
113 | to get the video mode list, let me tell you that there is no | 113 | to get the video mode list, let me tell you that there is no |
114 | need to start up an Irrlicht Device with EDT_DIRECT3D8, | 114 | need to start up an Irrlicht Device with EDT_DIRECT3D8, |
115 | EDT_OPENGL or EDT_SOFTWARE: For this (and for lots of other | 115 | EDT_OPENGL or EDT_SOFTWARE: For this (and for lots of other |
116 | reasons) the null driver, EDT_NULL exists. | 116 | reasons) the null driver, EDT_NULL exists. |
117 | \return Pointer to a list with all video modes supported | 117 | \return Pointer to a list with all video modes supported |
118 | by the gfx adapter. */ | 118 | by the gfx adapter. */ |
119 | virtual video::IVideoModeList* getVideoModeList() = 0; | 119 | virtual video::IVideoModeList* getVideoModeList() = 0; |
120 | 120 | ||
121 | //! Provides access to the operation system operator object. | 121 | //! Provides access to the operation system operator object. |
122 | /** The OS operator provides methods for | 122 | /** The OS operator provides methods for |
123 | getting system specific informations and doing system | 123 | getting system specific informations and doing system |
124 | specific operations, such as exchanging data with the clipboard | 124 | specific operations, such as exchanging data with the clipboard |
125 | or reading the operation system version. | 125 | or reading the operation system version. |
126 | \return Pointer to the OS operator. */ | 126 | \return Pointer to the OS operator. */ |
127 | virtual IOSOperator* getOSOperator() = 0; | 127 | virtual IOSOperator* getOSOperator() = 0; |
128 | 128 | ||
129 | //! Provides access to the engine's timer. | 129 | //! Provides access to the engine's timer. |
130 | /** The system time can be retrieved by it as | 130 | /** The system time can be retrieved by it as |
131 | well as the virtual time, which also can be manipulated. | 131 | well as the virtual time, which also can be manipulated. |
132 | \return Pointer to the ITimer object. */ | 132 | \return Pointer to the ITimer object. */ |
133 | virtual ITimer* getTimer() = 0; | 133 | virtual ITimer* getTimer() = 0; |
134 | 134 | ||
135 | //! Provides access to the engine's currently set randomizer. | 135 | //! Provides access to the engine's currently set randomizer. |
136 | /** \return Pointer to the IRandomizer object. */ | 136 | /** \return Pointer to the IRandomizer object. */ |
137 | virtual IRandomizer* getRandomizer() const =0; | 137 | virtual IRandomizer* getRandomizer() const =0; |
138 | 138 | ||
139 | //! Sets a new randomizer. | 139 | //! Sets a new randomizer. |
140 | /** \param r Pointer to the new IRandomizer object. This object is | 140 | /** \param r Pointer to the new IRandomizer object. This object is |
141 | grab()'ed by the engine and will be released upon the next setRandomizer | 141 | grab()'ed by the engine and will be released upon the next setRandomizer |
142 | call or upon device destruction. */ | 142 | call or upon device destruction. */ |
143 | virtual void setRandomizer(IRandomizer* r) =0; | 143 | virtual void setRandomizer(IRandomizer* r) =0; |
144 | 144 | ||
145 | //! Creates a new default randomizer. | 145 | //! Creates a new default randomizer. |
146 | /** The default randomizer provides the random sequence known from previous | 146 | /** The default randomizer provides the random sequence known from previous |
147 | Irrlicht versions and is the initial randomizer set on device creation. | 147 | Irrlicht versions and is the initial randomizer set on device creation. |
148 | \return Pointer to the default IRandomizer object. */ | 148 | \return Pointer to the default IRandomizer object. */ |
149 | virtual IRandomizer* createDefaultRandomizer() const =0; | 149 | virtual IRandomizer* createDefaultRandomizer() const =0; |
150 | 150 | ||
151 | //! Sets the caption of the window. | 151 | //! Sets the caption of the window. |
152 | /** \param text: New text of the window caption. */ | 152 | /** \param text: New text of the window caption. */ |
153 | virtual void setWindowCaption(const wchar_t* text) = 0; | 153 | virtual void setWindowCaption(const wchar_t* text) = 0; |
154 | 154 | ||
155 | //! Returns if the window is active. | 155 | //! Returns if the window is active. |
156 | /** If the window is inactive, | 156 | /** If the window is inactive, |
157 | nothing needs to be drawn. So if you don't want to draw anything | 157 | nothing needs to be drawn. So if you don't want to draw anything |
158 | when the window is inactive, create your drawing loop this way: | 158 | when the window is inactive, create your drawing loop this way: |
159 | \code | 159 | \code |
160 | while(device->run()) | 160 | while(device->run()) |
161 | { | 161 | { |
162 | if (device->isWindowActive()) | 162 | if (device->isWindowActive()) |
163 | { | 163 | { |
164 | // draw everything here | 164 | // draw everything here |
165 | } | 165 | } |
166 | else | 166 | else |
167 | device->yield(); | 167 | device->yield(); |
168 | } | 168 | } |
169 | \endcode | 169 | \endcode |
170 | \return True if window is active. */ | 170 | \return True if window is active. */ |
171 | virtual bool isWindowActive() const = 0; | 171 | virtual bool isWindowActive() const = 0; |
172 | 172 | ||
173 | //! Checks if the Irrlicht window has focus | 173 | //! Checks if the Irrlicht window has focus |
174 | /** \return True if window has focus. */ | 174 | /** \return True if window has focus. */ |
175 | virtual bool isWindowFocused() const = 0; | 175 | virtual bool isWindowFocused() const = 0; |
176 | 176 | ||
177 | //! Checks if the Irrlicht window is minimized | 177 | //! Checks if the Irrlicht window is minimized |
178 | /** \return True if window is minimized. */ | 178 | /** \return True if window is minimized. */ |
179 | virtual bool isWindowMinimized() const = 0; | 179 | virtual bool isWindowMinimized() const = 0; |
180 | 180 | ||
181 | //! Checks if the Irrlicht window is running in fullscreen mode | 181 | //! Checks if the Irrlicht window is running in fullscreen mode |
182 | /** \return True if window is fullscreen. */ | 182 | /** \return True if window is fullscreen. */ |
183 | virtual bool isFullscreen() const = 0; | 183 | virtual bool isFullscreen() const = 0; |
184 | 184 | ||
185 | //! Get the current color format of the window | 185 | //! Get the current color format of the window |
186 | /** \return Color format of the window. */ | 186 | /** \return Color format of the window. */ |
187 | virtual video::ECOLOR_FORMAT getColorFormat() const = 0; | 187 | virtual video::ECOLOR_FORMAT getColorFormat() const = 0; |
188 | 188 | ||
189 | //! Notifies the device that it should close itself. | 189 | //! Notifies the device that it should close itself. |
190 | /** IrrlichtDevice::run() will always return false after closeDevice() was called. */ | 190 | /** IrrlichtDevice::run() will always return false after closeDevice() was called. */ |
191 | virtual void closeDevice() = 0; | 191 | virtual void closeDevice() = 0; |
192 | 192 | ||
193 | //! Get the version of the engine. | 193 | //! Get the version of the engine. |
194 | /** The returned string | 194 | /** The returned string |
195 | will look like this: "1.2.3" or this: "1.2". | 195 | will look like this: "1.2.3" or this: "1.2". |
196 | \return String which contains the version. */ | 196 | \return String which contains the version. */ |
197 | virtual const c8* getVersion() const = 0; | 197 | virtual const c8* getVersion() const = 0; |
198 | 198 | ||
199 | //! Sets a new user event receiver which will receive events from the engine. | 199 | //! Sets a new user event receiver which will receive events from the engine. |
200 | /** Return true in IEventReceiver::OnEvent to prevent the event from continuing along | 200 | /** Return true in IEventReceiver::OnEvent to prevent the event from continuing along |
201 | the chain of event receivers. The path that an event takes through the system depends | 201 | the chain of event receivers. The path that an event takes through the system depends |
202 | on its type. See irr::EEVENT_TYPE for details. | 202 | on its type. See irr::EEVENT_TYPE for details. |
203 | \param receiver New receiver to be used. */ | 203 | \param receiver New receiver to be used. */ |
204 | virtual void setEventReceiver(IEventReceiver* receiver) = 0; | 204 | virtual void setEventReceiver(IEventReceiver* receiver) = 0; |
205 | 205 | ||
206 | //! Provides access to the current event receiver. | 206 | //! Provides access to the current event receiver. |
207 | /** \return Pointer to the current event receiver. Returns 0 if there is none. */ | 207 | /** \return Pointer to the current event receiver. Returns 0 if there is none. */ |
208 | virtual IEventReceiver* getEventReceiver() = 0; | 208 | virtual IEventReceiver* getEventReceiver() = 0; |
209 | 209 | ||
210 | //! Sends a user created event to the engine. | 210 | //! Sends a user created event to the engine. |
211 | /** Is is usually not necessary to use this. However, if you | 211 | /** Is is usually not necessary to use this. However, if you |
212 | are using an own input library for example for doing joystick | 212 | are using an own input library for example for doing joystick |
213 | input, you can use this to post key or mouse input events to | 213 | input, you can use this to post key or mouse input events to |
214 | the engine. Internally, this method only delegates the events | 214 | the engine. Internally, this method only delegates the events |
215 | further to the scene manager and the GUI environment. */ | 215 | further to the scene manager and the GUI environment. */ |
216 | virtual bool postEventFromUser(const SEvent& event) = 0; | 216 | virtual bool postEventFromUser(const SEvent& event) = 0; |
217 | 217 | ||
218 | //! Sets the input receiving scene manager. | 218 | //! Sets the input receiving scene manager. |
219 | /** If set to null, the main scene manager (returned by | 219 | /** If set to null, the main scene manager (returned by |
220 | GetSceneManager()) will receive the input | 220 | GetSceneManager()) will receive the input |
221 | \param sceneManager New scene manager to be used. */ | 221 | \param sceneManager New scene manager to be used. */ |
222 | virtual void setInputReceivingSceneManager(scene::ISceneManager* sceneManager) = 0; | 222 | virtual void setInputReceivingSceneManager(scene::ISceneManager* sceneManager) = 0; |
223 | 223 | ||
224 | //! Sets if the window should be resizable in windowed mode. | 224 | //! Sets if the window should be resizable in windowed mode. |
225 | /** The default is false. This method only works in windowed | 225 | /** The default is false. This method only works in windowed |
226 | mode. | 226 | mode. |
227 | \param resize Flag whether the window should be resizable. */ | 227 | \param resize Flag whether the window should be resizable. */ |
228 | virtual void setResizable(bool resize=false) = 0; | 228 | virtual void setResizable(bool resize=false) = 0; |
229 | 229 | ||
230 | //! Minimizes the window if possible. | 230 | //! Minimizes the window if possible. |
231 | virtual void minimizeWindow() =0; | 231 | virtual void minimizeWindow() =0; |
232 | 232 | ||
233 | //! Maximizes the window if possible. | 233 | //! Maximizes the window if possible. |
234 | virtual void maximizeWindow() =0; | 234 | virtual void maximizeWindow() =0; |
235 | 235 | ||
236 | //! Restore the window to normal size if possible. | 236 | //! Restore the window to normal size if possible. |
237 | virtual void restoreWindow() =0; | 237 | virtual void restoreWindow() =0; |
238 | 238 | ||
239 | //! Activate any joysticks, and generate events for them. | 239 | //! Activate any joysticks, and generate events for them. |
240 | /** Irrlicht contains support for joysticks, but does not generate joystick events by default, | 240 | /** Irrlicht contains support for joysticks, but does not generate joystick events by default, |
241 | as this would consume joystick info that 3rd party libraries might rely on. Call this method to | 241 | as this would consume joystick info that 3rd party libraries might rely on. Call this method to |
242 | activate joystick support in Irrlicht and to receive irr::SJoystickEvent events. | 242 | activate joystick support in Irrlicht and to receive irr::SJoystickEvent events. |
243 | \param joystickInfo On return, this will contain an array of each joystick that was found and activated. | 243 | \param joystickInfo On return, this will contain an array of each joystick that was found and activated. |
244 | \return true if joysticks are supported on this device and _IRR_COMPILE_WITH_JOYSTICK_EVENTS_ | 244 | \return true if joysticks are supported on this device and _IRR_COMPILE_WITH_JOYSTICK_EVENTS_ |
245 | is defined, false if joysticks are not supported or support is compiled out. | 245 | is defined, false if joysticks are not supported or support is compiled out. |
246 | */ | 246 | */ |
247 | virtual bool activateJoysticks(core::array<SJoystickInfo>& joystickInfo) =0; | 247 | virtual bool activateJoysticks(core::array<SJoystickInfo>& joystickInfo) =0; |
248 | 248 | ||
249 | //! Set the current Gamma Value for the Display | 249 | //! Set the current Gamma Value for the Display |
250 | virtual bool setGammaRamp(f32 red, f32 green, f32 blue, | 250 | virtual bool setGammaRamp(f32 red, f32 green, f32 blue, |
251 | f32 relativebrightness, f32 relativecontrast) =0; | 251 | f32 relativebrightness, f32 relativecontrast) =0; |
252 | 252 | ||
253 | //! Get the current Gamma Value for the Display | 253 | //! Get the current Gamma Value for the Display |
254 | virtual bool getGammaRamp(f32 &red, f32 &green, f32 &blue, | 254 | virtual bool getGammaRamp(f32 &red, f32 &green, f32 &blue, |
255 | f32 &brightness, f32 &contrast) =0; | 255 | f32 &brightness, f32 &contrast) =0; |
256 | 256 | ||
257 | //! Remove messages pending in the system message loop | 257 | //! Remove messages pending in the system message loop |
258 | /** This function is usually used after messages have been buffered for a longer time, for example | 258 | /** This function is usually used after messages have been buffered for a longer time, for example |
259 | when loading a large scene. Clearing the message loop prevents that mouse- or buttonclicks which users | 259 | when loading a large scene. Clearing the message loop prevents that mouse- or buttonclicks which users |
260 | have pressed in the meantime will now trigger unexpected actions in the gui. <br> | 260 | have pressed in the meantime will now trigger unexpected actions in the gui. <br> |
261 | So far the following messages are cleared:<br> | 261 | So far the following messages are cleared:<br> |
262 | Win32: All keyboard and mouse messages<br> | 262 | Win32: All keyboard and mouse messages<br> |
263 | Linux: All keyboard and mouse messages<br> | 263 | Linux: All keyboard and mouse messages<br> |
264 | All other devices are not yet supported here.<br> | 264 | All other devices are not yet supported here.<br> |
265 | The function is still somewhat experimental, as the kind of messages we clear is based on just a few use-cases. | 265 | The function is still somewhat experimental, as the kind of messages we clear is based on just a few use-cases. |
266 | If you think further messages should be cleared, or some messages should not be cleared here, then please tell us. */ | 266 | If you think further messages should be cleared, or some messages should not be cleared here, then please tell us. */ |
267 | virtual void clearSystemMessages() = 0; | 267 | virtual void clearSystemMessages() = 0; |
268 | 268 | ||
269 | //! Get the type of the device. | 269 | //! Get the type of the device. |
270 | /** This allows the user to check which windowing system is currently being | 270 | /** This allows the user to check which windowing system is currently being |
271 | used. */ | 271 | used. */ |
272 | virtual E_DEVICE_TYPE getType() const = 0; | 272 | virtual E_DEVICE_TYPE getType() const = 0; |
273 | 273 | ||
274 | //! Check if a driver type is supported by the engine. | 274 | //! Check if a driver type is supported by the engine. |
275 | /** Even if true is returned the driver may not be available | 275 | /** Even if true is returned the driver may not be available |
276 | for a configuration requested when creating the device. */ | 276 | for a configuration requested when creating the device. */ |
277 | static bool isDriverSupported(video::E_DRIVER_TYPE driver) | 277 | static bool isDriverSupported(video::E_DRIVER_TYPE driver) |
278 | { | 278 | { |
279 | switch (driver) | 279 | switch (driver) |
280 | { | 280 | { |
281 | case video::EDT_NULL: | 281 | case video::EDT_NULL: |
282 | return true; | 282 | return true; |
283 | case video::EDT_SOFTWARE: | 283 | case video::EDT_SOFTWARE: |
284 | #ifdef _IRR_COMPILE_WITH_SOFTWARE_ | 284 | #ifdef _IRR_COMPILE_WITH_SOFTWARE_ |
285 | return true; | 285 | return true; |
286 | #else | 286 | #else |
287 | return false; | 287 | return false; |
288 | #endif | 288 | #endif |
289 | case video::EDT_BURNINGSVIDEO: | 289 | case video::EDT_BURNINGSVIDEO: |
290 | #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ | 290 | #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ |
291 | return true; | 291 | return true; |
292 | #else | 292 | #else |
293 | return false; | 293 | return false; |
294 | #endif | 294 | #endif |
295 | case video::EDT_DIRECT3D8: | 295 | case video::EDT_DIRECT3D8: |
296 | #ifdef _IRR_COMPILE_WITH_DIRECT3D_8_ | 296 | #ifdef _IRR_COMPILE_WITH_DIRECT3D_8_ |
297 | return true; | 297 | return true; |
298 | #else | 298 | #else |
299 | return false; | 299 | return false; |
300 | #endif | 300 | #endif |
301 | case video::EDT_DIRECT3D9: | 301 | case video::EDT_DIRECT3D9: |
302 | #ifdef _IRR_COMPILE_WITH_DIRECT3D_9_ | 302 | #ifdef _IRR_COMPILE_WITH_DIRECT3D_9_ |
303 | return true; | 303 | return true; |
304 | #else | 304 | #else |
305 | return false; | 305 | return false; |
306 | #endif | 306 | #endif |
307 | case video::EDT_OPENGL: | 307 | case video::EDT_OPENGL: |
308 | #ifdef _IRR_COMPILE_WITH_OPENGL_ | 308 | #ifdef _IRR_COMPILE_WITH_OPENGL_ |
309 | return true; | 309 | return true; |
310 | #else | 310 | #else |
311 | return false; | 311 | return false; |
312 | #endif | 312 | #endif |
313 | default: | 313 | default: |
314 | return false; | 314 | return false; |
315 | } | 315 | } |
316 | } | 316 | } |
317 | }; | 317 | }; |
318 | 318 | ||
319 | } // end namespace irr | 319 | } // end namespace irr |
320 | 320 | ||
321 | #endif | 321 | #endif |
322 | 322 | ||