aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/others/irrlicht-1.8.1/include/SIrrCreationParameters.h
diff options
context:
space:
mode:
authorDavid Walter Seikel2016-03-28 22:28:34 +1000
committerDavid Walter Seikel2016-03-28 22:28:34 +1000
commit7028cbe09c688437910a25623098762bf0fa592d (patch)
tree10b5af58277d9880380c2251f109325542c4e6eb /src/others/irrlicht-1.8.1/include/SIrrCreationParameters.h
parentMove lemon to the src/others directory. (diff)
downloadSledjHamr-7028cbe09c688437910a25623098762bf0fa592d.zip
SledjHamr-7028cbe09c688437910a25623098762bf0fa592d.tar.gz
SledjHamr-7028cbe09c688437910a25623098762bf0fa592d.tar.bz2
SledjHamr-7028cbe09c688437910a25623098762bf0fa592d.tar.xz
Move Irrlicht to src/others.
Diffstat (limited to 'src/others/irrlicht-1.8.1/include/SIrrCreationParameters.h')
-rw-r--r--src/others/irrlicht-1.8.1/include/SIrrCreationParameters.h308
1 files changed, 308 insertions, 0 deletions
diff --git a/src/others/irrlicht-1.8.1/include/SIrrCreationParameters.h b/src/others/irrlicht-1.8.1/include/SIrrCreationParameters.h
new file mode 100644
index 0000000..ec642c2
--- /dev/null
+++ b/src/others/irrlicht-1.8.1/include/SIrrCreationParameters.h
@@ -0,0 +1,308 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h
4
5#ifndef __I_IRRLICHT_CREATION_PARAMETERS_H_INCLUDED__
6#define __I_IRRLICHT_CREATION_PARAMETERS_H_INCLUDED__
7
8#include "EDriverTypes.h"
9#include "EDeviceTypes.h"
10#include "dimension2d.h"
11#include "ILogger.h"
12// onefang changes start
13#include "SExposedVideoData.h"
14// onefang changes end
15
16namespace irr
17{
18 class IEventReceiver;
19
20 //! Structure for holding Irrlicht Device creation parameters.
21 /** This structure is used in the createDeviceEx() function. */
22 struct SIrrlichtCreationParameters
23 {
24 //! Constructs a SIrrlichtCreationParameters structure with default values.
25 SIrrlichtCreationParameters() :
26 DeviceType(EIDT_BEST),
27 DriverType(video::EDT_BURNINGSVIDEO),
28 WindowSize(core::dimension2d<u32>(800, 600)),
29 Bits(16),
30 ZBufferBits(16),
31 Fullscreen(false),
32 Stencilbuffer(false),
33 Vsync(false),
34 AntiAlias(0),
35 HandleSRGB(false),
36 WithAlphaChannel(false),
37 Doublebuffer(true),
38 IgnoreInput(false),
39 Stereobuffer(false),
40 HighPrecisionFPU(false),
41 EventReceiver(0),
42 WindowId(0),
43// onefang changes start
44 VideoData(0),
45// onefang changes end
46#ifdef _DEBUG
47 LoggingLevel(ELL_DEBUG),
48#else
49 LoggingLevel(ELL_INFORMATION),
50#endif
51 DisplayAdapter(0),
52 DriverMultithreaded(false),
53 UsePerformanceTimer(true),
54 SDK_version_do_not_use(IRRLICHT_SDK_VERSION)
55 {
56 }
57
58 SIrrlichtCreationParameters(const SIrrlichtCreationParameters& other) :
59 SDK_version_do_not_use(IRRLICHT_SDK_VERSION)
60 {*this = other;}
61
62 SIrrlichtCreationParameters& operator=(const SIrrlichtCreationParameters& other)
63 {
64 DeviceType = other.DeviceType;
65 DriverType = other.DriverType;
66 WindowSize = other.WindowSize;
67 Bits = other.Bits;
68 ZBufferBits = other.ZBufferBits;
69 Fullscreen = other.Fullscreen;
70 Stencilbuffer = other.Stencilbuffer;
71 Vsync = other.Vsync;
72 AntiAlias = other.AntiAlias;
73 HandleSRGB = other.HandleSRGB;
74 WithAlphaChannel = other.WithAlphaChannel;
75 Doublebuffer = other.Doublebuffer;
76 IgnoreInput = other.IgnoreInput;
77 Stereobuffer = other.Stereobuffer;
78 HighPrecisionFPU = other.HighPrecisionFPU;
79 EventReceiver = other.EventReceiver;
80 WindowId = other.WindowId;
81// onefang changes start
82 VideoData = other.VideoData;
83// onefang changes end
84 LoggingLevel = other.LoggingLevel;
85 DriverMultithreaded = other.DriverMultithreaded;
86 DisplayAdapter = other.DisplayAdapter;
87 UsePerformanceTimer = other.UsePerformanceTimer;
88 return *this;
89 }
90
91 //! Type of the device.
92 /** This setting decides the windowing system used by the device, most device types are native
93 to a specific operating system and so may not be available.
94 EIDT_WIN32 is only available on Windows desktops,
95 EIDT_WINCE is only available on Windows mobile devices,
96 EIDT_COCOA is only available on Mac OSX,
97 EIDT_X11 is available on Linux, Solaris, BSD and other operating systems which use X11,
98 EIDT_SDL is available on most systems if compiled in,
99 EIDT_CONSOLE is usually available but can only render to text,
100 EIDT_BEST will select the best available device for your operating system.
101 Default: EIDT_BEST. */
102 E_DEVICE_TYPE DeviceType;
103
104 //! Type of video driver used to render graphics.
105 /** This can currently be video::EDT_NULL, video::EDT_SOFTWARE,
106 video::EDT_BURNINGSVIDEO, video::EDT_DIRECT3D8,
107 video::EDT_DIRECT3D9, and video::EDT_OPENGL.
108 Default: Software. */
109 video::E_DRIVER_TYPE DriverType;
110
111 //! Size of the window or the video mode in fullscreen mode. Default: 800x600
112 core::dimension2d<u32> WindowSize;
113
114 //! Minimum Bits per pixel of the color buffer in fullscreen mode. Ignored if windowed mode. Default: 16.
115 u8 Bits;
116
117 //! Minimum Bits per pixel of the depth buffer. Default: 16.
118 u8 ZBufferBits;
119
120 //! Should be set to true if the device should run in fullscreen.
121 /** Otherwise the device runs in windowed mode. Default: false. */
122 bool Fullscreen;
123
124 //! Specifies if the stencil buffer should be enabled.
125 /** Set this to true, if you want the engine be able to draw
126 stencil buffer shadows. Note that not all drivers are able to
127 use the stencil buffer, hence it can be ignored during device
128 creation. Without the stencil buffer no shadows will be drawn.
129 Default: false. */
130 bool Stencilbuffer;
131
132 //! Specifies vertical syncronisation.
133 /** If set to true, the driver will wait for the vertical
134 retrace period, otherwise not. May be silently ignored.
135 Default: false */
136 bool Vsync;
137
138 //! Specifies if the device should use fullscreen anti aliasing
139 /** Makes sharp/pixelated edges softer, but requires more
140 performance. Also, 2D elements might look blurred with this
141 switched on. The resulting rendering quality also depends on
142 the hardware and driver you are using, your program might look
143 different on different hardware with this. So if you are
144 writing a game/application with AntiAlias switched on, it would
145 be a good idea to make it possible to switch this option off
146 again by the user.
147 The value is the maximal antialiasing factor requested for
148 the device. The cretion method will automatically try smaller
149 values if no window can be created with the given value.
150 Value one is usually the same as 0 (disabled), but might be a
151 special value on some platforms. On D3D devices it maps to
152 NONMASKABLE.
153 Default value: 0 - disabled */
154 u8 AntiAlias;
155
156 //! Flag to enable proper sRGB and linear color handling
157 /** In most situations, it is desireable to have the color handling in
158 non-linear sRGB color space, and only do the intermediate color
159 calculations in linear RGB space. If this flag is enabled, the device and
160 driver try to assure that all color input and output are color corrected
161 and only the internal color representation is linear. This means, that
162 the color output is properly gamma-adjusted to provide the brighter
163 colors for monitor display. And that blending and lighting give a more
164 natural look, due to proper conversion from non-linear colors into linear
165 color space for blend operations. If this flag is enabled, all texture colors
166 (which are usually in sRGB space) are correctly displayed. However vertex colors
167 and other explicitly set values have to be manually encoded in linear color space.
168 Default value: false. */
169 bool HandleSRGB;
170
171 //! Whether the main framebuffer uses an alpha channel.
172 /** In some situations it might be desireable to get a color
173 buffer with an alpha channel, e.g. when rendering into a
174 transparent window or overlay. If this flag is set the device
175 tries to create a framebuffer with alpha channel.
176 If this flag is set, only color buffers with alpha channel
177 are considered. Otherwise, it depends on the actual hardware
178 if the colorbuffer has an alpha channel or not.
179 Default value: false */
180 bool WithAlphaChannel;
181
182 //! Whether the main framebuffer uses doublebuffering.
183 /** This should be usually enabled, in order to avoid render
184 artifacts on the visible framebuffer. However, it might be
185 useful to use only one buffer on very small devices. If no
186 doublebuffering is available, the drivers will fall back to
187 single buffers. Default value: true */
188 bool Doublebuffer;
189
190 //! Specifies if the device should ignore input events
191 /** This is only relevant when using external I/O handlers.
192 External windows need to take care of this themselves.
193 Currently only supported by X11.
194 Default value: false */
195 bool IgnoreInput;
196
197 //! Specifies if the device should use stereo buffers
198 /** Some high-end gfx cards support two framebuffers for direct
199 support of stereoscopic output devices. If this flag is set the
200 device tries to create a stereo context.
201 Currently only supported by OpenGL.
202 Default value: false */
203 bool Stereobuffer;
204
205 //! Specifies if the device should use high precision FPU setting
206 /** This is only relevant for DirectX Devices, which switch to
207 low FPU precision by default for performance reasons. However,
208 this may lead to problems with the other computations of the
209 application. In this case setting this flag to true should help
210 - on the expense of performance loss, though.
211 Default value: false */
212 bool HighPrecisionFPU;
213
214 //! A user created event receiver.
215 IEventReceiver* EventReceiver;
216
217 //! Window Id.
218 /** If this is set to a value other than 0, the Irrlicht Engine
219 will be created in an already existing window. For windows, set
220 this to the HWND of the window you want. The windowSize and
221 FullScreen options will be ignored when using the WindowId
222 parameter. Default this is set to 0.
223 To make Irrlicht run inside the custom window, you still will
224 have to draw Irrlicht on your own. You can use this loop, as
225 usual:
226 \code
227 while (device->run())
228 {
229 driver->beginScene(true, true, 0);
230 smgr->drawAll();
231 driver->endScene();
232 }
233 \endcode
234 Instead of this, you can also simply use your own message loop
235 using GetMessage, DispatchMessage and whatever. Calling
236 IrrlichtDevice::run() will cause Irrlicht to dispatch messages
237 internally too. You need not call Device->run() if you want to
238 do your own message dispatching loop, but Irrlicht will not be
239 able to fetch user input then and you have to do it on your own
240 using the window messages, DirectInput, or whatever. Also,
241 you'll have to increment the Irrlicht timer.
242 An alternative, own message dispatching loop without
243 device->run() would look like this:
244 \code
245 MSG msg;
246 while (true)
247 {
248 if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
249 {
250 TranslateMessage(&msg);
251 DispatchMessage(&msg);
252
253 if (msg.message == WM_QUIT)
254 break;
255 }
256
257 // increase virtual timer time
258 device->getTimer()->tick();
259
260 // draw engine picture
261 driver->beginScene(true, true, 0);
262 smgr->drawAll();
263 driver->endScene();
264 }
265 \endcode
266 However, there is no need to draw the picture this often. Just
267 do it how you like. */
268 void* WindowId;
269// onefang changes start
270 video::SExposedVideoData *VideoData;
271// onefang changes end
272
273 //! Specifies the logging level used in the logging interface.
274 /** The default value is ELL_INFORMATION. You can access the ILogger interface
275 later on from the IrrlichtDevice with getLogger() and set another level.
276 But if you need more or less logging information already from device creation,
277 then you have to change it here.
278 */
279 ELOG_LEVEL LoggingLevel;
280
281 //! Allows to select which graphic card is used for rendering when more than one card is in the system.
282 /** So far only supported on D3D */
283 u32 DisplayAdapter;
284
285 //! Create the driver multithreaded.
286 /** Default is false. Enabling this can slow down your application.
287 Note that this does _not_ make Irrlicht threadsafe, but only the underlying driver-API for the graphiccard.
288 So far only supported on D3D. */
289 bool DriverMultithreaded;
290
291 //! Enables use of high performance timers on Windows platform.
292 /** When performance timers are not used, standard GetTickCount()
293 is used instead which usually has worse resolution, but also less
294 problems with speed stepping and other techniques.
295 */
296 bool UsePerformanceTimer;
297
298 //! Don't use or change this parameter.
299 /** Always set it to IRRLICHT_SDK_VERSION, which is done by default.
300 This is needed for sdk version checks. */
301 const c8* const SDK_version_do_not_use;
302 };
303
304
305} // end namespace irr
306
307#endif
308