]> git.lizzy.rs Git - irrlicht.git/blob - include/irrlicht.h
Drop obsolete video drivers
[irrlicht.git] / include / irrlicht.h
1 /* irrlicht.h -- interface of the 'Irrlicht Engine'\r
2 \r
3   Copyright (C) 2002-2012 Nikolaus Gebhardt\r
4 \r
5   This software is provided 'as-is', without any express or implied\r
6   warranty.  In no event will the authors be held liable for any damages\r
7   arising from the use of this software.\r
8 \r
9   Permission is granted to anyone to use this software for any purpose,\r
10   including commercial applications, and to alter it and redistribute it\r
11   freely, subject to the following restrictions:\r
12 \r
13   1. The origin of this software must not be misrepresented; you must not\r
14      claim that you wrote the original software. If you use this software\r
15      in a product, an acknowledgment in the product documentation would be\r
16      appreciated but is not required.\r
17   2. Altered source versions must be plainly marked as such, and must not be\r
18      misrepresented as being the original software.\r
19   3. This notice may not be removed or altered from any source distribution.\r
20 \r
21   Please note that the Irrlicht Engine is based in part on the work of the\r
22   Independent JPEG Group, the zlib and the libPng. This means that if you use\r
23   the Irrlicht Engine in your product, you must acknowledge somewhere in your\r
24   documentation that you've used the IJG code. It would also be nice to mention\r
25   that you use the Irrlicht Engine, the zlib and libPng. See the README files\r
26   in the jpeglib, the zlib and libPng for further information.\r
27 */\r
28 \r
29 #ifndef __IRRLICHT_H_INCLUDED__\r
30 #define __IRRLICHT_H_INCLUDED__\r
31 \r
32 #include "aabbox3d.h"\r
33 #include "CIndexBuffer.h"\r
34 #include "CMeshBuffer.h"\r
35 #include "coreutil.h"\r
36 #include "CVertexBuffer.h"\r
37 #include "dimension2d.h"\r
38 #include "ECullingTypes.h"\r
39 #include "EDebugSceneTypes.h"\r
40 #include "EDriverFeatures.h"\r
41 #include "EDriverTypes.h"\r
42 #include "EGUIAlignment.h"\r
43 #include "EGUIElementTypes.h"\r
44 #include "EHardwareBufferFlags.h"\r
45 #include "EMaterialFlags.h"\r
46 #include "EMaterialTypes.h"\r
47 #include "EMeshWriterEnums.h"\r
48 #include "ESceneNodeTypes.h"\r
49 #include "fast_atof.h"\r
50 #include "IAnimatedMesh.h"\r
51 #include "IAnimatedMeshSceneNode.h"\r
52 #include "IAttributes.h"\r
53 #include "IBillboardSceneNode.h"\r
54 #include "IBoneSceneNode.h"\r
55 #include "ICameraSceneNode.h"\r
56 #include "IContextManager.h"\r
57 #include "ICursorControl.h"\r
58 #include "IDummyTransformationSceneNode.h"\r
59 #include "IEventReceiver.h"\r
60 #include "IFileList.h"\r
61 #include "IFileSystem.h"\r
62 #include "IGPUProgrammingServices.h"\r
63 #include "IGUIButton.h"\r
64 #include "IGUICheckBox.h"\r
65 #include "IGUIComboBox.h"\r
66 #include "IGUIEditBox.h"\r
67 #include "IGUIElement.h"\r
68 #include "IGUIEnvironment.h"\r
69 #include "IGUIFileOpenDialog.h"\r
70 #include "IGUIFont.h"\r
71 #include "IGUIFontBitmap.h"\r
72 #include "IGUIImage.h"\r
73 #include "IGUIListBox.h"\r
74 #include "IGUIScrollBar.h"\r
75 #include "IGUISkin.h"\r
76 #include "IGUISpriteBank.h"\r
77 #include "IGUIStaticText.h"\r
78 #include "IGUITabControl.h"\r
79 #include "IGUIToolbar.h"\r
80 #include "IImage.h"\r
81 #include "IImageLoader.h"\r
82 #include "IImageWriter.h"\r
83 #include "IIndexBuffer.h"\r
84 #include "ILogger.h"\r
85 #include "IMaterialRenderer.h"\r
86 #include "IMaterialRendererServices.h"\r
87 #include "IMesh.h"\r
88 #include "IMeshBuffer.h"\r
89 #include "IMeshCache.h"\r
90 #include "IMeshLoader.h"\r
91 #include "IMeshManipulator.h"\r
92 #include "IMeshSceneNode.h"\r
93 #include "IMeshWriter.h"\r
94 #include "IOSOperator.h"\r
95 #include "IReadFile.h"\r
96 #include "IReferenceCounted.h"\r
97 #include "irrArray.h"\r
98 #include "IRenderTarget.h"\r
99 #include "IrrlichtDevice.h"\r
100 #include "irrMath.h"\r
101 #include "irrString.h"\r
102 #include "irrTypes.h"\r
103 #include "path.h"\r
104 #include "ISceneCollisionManager.h"\r
105 #include "ISceneManager.h"\r
106 #include "ISceneNode.h"\r
107 #include "IShaderConstantSetCallBack.h"\r
108 #include "ISkinnedMesh.h"\r
109 #include "ITexture.h"\r
110 #include "ITimer.h"\r
111 #include "IVertexBuffer.h"\r
112 #include "IVideoDriver.h"\r
113 #include "IWriteFile.h"\r
114 #include "Keycodes.h"\r
115 #include "line2d.h"\r
116 #include "line3d.h"\r
117 #include "matrix4.h"\r
118 #include "plane3d.h"\r
119 #include "position2d.h"\r
120 #include "quaternion.h"\r
121 #include "rect.h"\r
122 #include "S3DVertex.h"\r
123 #include "SAnimatedMesh.h"\r
124 #include "SceneParameters.h"\r
125 #include "SColor.h"\r
126 #include "SExposedVideoData.h"\r
127 #include "SIrrCreationParameters.h"\r
128 #include "SMaterial.h"\r
129 #include "SMesh.h"\r
130 #include "SMeshBuffer.h"\r
131 #include "SSkinMeshBuffer.h"\r
132 #include "SVertexIndex.h"\r
133 #include "SViewFrustum.h"\r
134 #include "triangle3d.h"\r
135 #include "vector2d.h"\r
136 #include "vector3d.h"\r
137 #include "IrrCompileConfig.h" // for IRRLICHT_API and IRRCALLCONV\r
138 \r
139 /*! \mainpage Irrlicht Engine 1.9 API documentation\r
140  *\r
141  * <div align="center"><img src="logobig.png" ></div>\r
142  *\r
143  * \section intro Introduction\r
144  *\r
145  * Welcome to the Irrlicht Engine API documentation.\r
146  * Here you'll find any information you'll need to develop applications with\r
147  * the Irrlicht Engine. If you are looking for a tutorial on how to start, you'll\r
148  * find some on the homepage of the Irrlicht Engine at\r
149  * <A HREF="http://irrlicht.sourceforge.net" >irrlicht.sourceforge.net</A>\r
150  * or inside the SDK in the examples directory.\r
151  *\r
152  * The Irrlicht Engine is intended to be an easy-to-use 3d engine, so\r
153  * this documentation is an important part of it. If you have any questions or\r
154  * suggestions, just send a email to the author of the engine, Nikolaus Gebhardt\r
155  * (niko (at) irrlicht3d.org).\r
156  *\r
157  *\r
158  * \section links Links\r
159  *\r
160  * <A HREF="namespaces.html">Namespaces</A>: A very good place to start reading\r
161  * the documentation.<BR>\r
162  * <A HREF="annotated.html">Class list</A>: List of all classes with descriptions.<BR>\r
163  * <A HREF="functions.html">Class members</A>: Good place to find forgotten features.<BR>\r
164  *\r
165  * \section irrexample Short example\r
166  *\r
167  * A simple application, starting up the engine, loading a Quake 2 animated\r
168  * model file and the corresponding texture, animating and displaying it\r
169  * in front of a blue background and placing a user controlable 3d camera\r
170  * would look like the following code. I think this example shows the usage\r
171  * of the engine quite well:\r
172  *\r
173  * \code\r
174  * #include <irrlicht.h>\r
175  * using namespace irr;\r
176  *\r
177  * int main()\r
178  * {\r
179  *      // start up the engine\r
180  *      IrrlichtDevice *device = createDevice(video::EDT_OPENGL,\r
181  *              core::dimension2d<u32>(640,480));\r
182  *\r
183  *      video::IVideoDriver* driver = device->getVideoDriver();\r
184  *      scene::ISceneManager* scenemgr = device->getSceneManager();\r
185  *\r
186  *      device->setWindowCaption(L"Hello World!");\r
187  *\r
188  *      // load and show quake2 .md2 model\r
189  *      scene::ISceneNode* node = scenemgr->addAnimatedMeshSceneNode(\r
190  *              scenemgr->getMesh("quake2model.md2"));\r
191  *\r
192  *      // if everything worked, add a texture and disable lighting\r
193  *      if (node)\r
194  *      {\r
195  *              node->setMaterialTexture(0, driver->getTexture("texture.bmp"));\r
196  *              node->setMaterialFlag(video::EMF_LIGHTING, false);\r
197  *      }\r
198  *\r
199  *      // add a first person shooter style user controlled camera\r
200  *      scenemgr->addCameraSceneNodeFPS();\r
201  *\r
202  *      // draw everything\r
203  *      while(device->run() && driver)\r
204  *      {\r
205  *              driver->beginScene(video::ECBF_COLOR | video::ECBF_DEPTH, video::SColor(255,0,0,255));\r
206  *              scenemgr->drawAll();\r
207  *              driver->endScene();\r
208  *      }\r
209  *\r
210  *      // delete device\r
211  *      device->drop();\r
212  *      return 0;\r
213  * }\r
214  * \endcode\r
215  *\r
216  * Irrlicht can load a lot of file formats automatically, see irr::scene::ISceneManager::getMesh()\r
217  * for a detailed list. So if you would like to replace the simple blue screen background by\r
218  * a cool Quake 3 Map, optimized by an octree, just insert this code\r
219  * somewhere before the while loop:\r
220  *\r
221  * \code\r
222  *      // add .pk3 archive to the file system\r
223  *      device->getFileSystem()->addZipFileArchive("quake3map.pk3");\r
224  *\r
225  *      // load .bsp file and show it using an octree\r
226  *      scenemgr->addOctreeSceneNode(\r
227  *              scenemgr->getMesh("quake3map.bsp"));\r
228  * \endcode\r
229  *\r
230  * As you can see, the engine uses namespaces. Everything in the engine is\r
231  * placed into the namespace 'irr', but there are also 5 sub namespaces.\r
232  * You can find a list of all namespaces with descriptions at the\r
233  * <A HREF="namespaces.html"> namespaces page</A>.\r
234  * This is also a good place to start reading the documentation. If you\r
235  * don't want to write the namespace names all the time, just use all namespaces like\r
236  * this:\r
237  * \code\r
238  * using namespace core;\r
239  * using namespace scene;\r
240  * using namespace video;\r
241  * using namespace io;\r
242  * using namespace gui;\r
243  * \endcode\r
244  *\r
245  * There is a lot more the engine can do, but I hope this gave a short\r
246  * overview over the basic features of the engine. For more examples, please take\r
247  * a look into the examples directory of the SDK.\r
248  */\r
249 \r
250 #include "SIrrCreationParameters.h"\r
251 \r
252 //! Everything in the Irrlicht Engine can be found in this namespace.\r
253 namespace irr\r
254 {\r
255         //! Creates an Irrlicht device. The Irrlicht device is the root object for using the engine.\r
256         /** If you need more parameters to be passed to the creation of the Irrlicht Engine device,\r
257         use the createDeviceEx() function.\r
258         \param driverType: Type of the video driver to use. This can currently be video::EDT_NULL,\r
259         video::EDT_SOFTWARE, video::EDT_BURNINGSVIDEO, video::EDT_DIRECT3D9 and video::EDT_OPENGL.\r
260         \param windowSize: Size of the window or the video mode in fullscreen mode.\r
261         \param bits: Bits per pixel in fullscreen mode. Ignored if windowed mode.\r
262         \param fullscreen: Should be set to true if the device should run in fullscreen. Otherwise\r
263                 the device runs in windowed mode.\r
264         \param stencilbuffer: Specifies if the stencil buffer should be enabled. Set this to true,\r
265         if you want the engine be able to draw stencil buffer shadows. Note that not all\r
266         devices are able to use the stencil buffer. If they don't no shadows will be drawn.\r
267         \param vsync: Specifies vertical synchronization: If set to true, the driver will wait\r
268         for the vertical retrace period, otherwise not.\r
269         \param receiver: A user created event receiver.\r
270         \return Returns pointer to the created IrrlichtDevice or null if the\r
271         device could not be created.\r
272         */\r
273         extern "C" IRRLICHT_API IrrlichtDevice* IRRCALLCONV createDevice(\r
274                 video::E_DRIVER_TYPE driverType = video::EDT_OPENGL,\r
275                 // parentheses are necessary for some compilers\r
276                 const core::dimension2d<u32>& windowSize = (core::dimension2d<u32>(640,480)),\r
277                 u32 bits = 32,\r
278                 bool fullscreen = false,\r
279                 bool stencilbuffer = true,\r
280                 bool vsync = false,\r
281                 IEventReceiver* receiver = 0);\r
282 \r
283         //! typedef for Function Pointer\r
284         typedef IrrlichtDevice* (IRRCALLCONV *funcptr_createDevice )(\r
285                         video::E_DRIVER_TYPE driverType,\r
286                         const core::dimension2d<u32>& windowSize,\r
287                         u32 bits,\r
288                         bool fullscreen,\r
289                         bool stencilbuffer,\r
290                         bool vsync,\r
291                         IEventReceiver* receiver);\r
292 \r
293 \r
294         //! Creates an Irrlicht device with the option to specify advanced parameters.\r
295         /** Usually you should used createDevice() for creating an Irrlicht Engine device.\r
296         Use this function only if you wish to specify advanced parameters like a window\r
297         handle in which the device should be created.\r
298         \param parameters: Structure containing advanced parameters for the creation of the device.\r
299         See irr::SIrrlichtCreationParameters for details.\r
300         \return Returns pointer to the created IrrlichtDevice or null if the\r
301         device could not be created. */\r
302         extern "C" IRRLICHT_API IrrlichtDevice* IRRCALLCONV createDeviceEx(\r
303                 const SIrrlichtCreationParameters& parameters);\r
304 \r
305         //! typedef for Function Pointer\r
306         typedef IrrlichtDevice* (IRRCALLCONV *funcptr_createDeviceEx )( const SIrrlichtCreationParameters& parameters );\r
307 \r
308 \r
309         // THE FOLLOWING IS AN EMPTY LIST OF ALL SUB NAMESPACES\r
310         // EXISTING ONLY FOR THE DOCUMENTATION SOFTWARE DOXYGEN.\r
311 \r
312         //! Basic classes such as vectors, planes, arrays, lists, and so on can be found in this namespace.\r
313         namespace core\r
314         {\r
315         }\r
316 \r
317         //! The gui namespace contains useful classes for easy creation of a graphical user interface.\r
318         namespace gui\r
319         {\r
320         }\r
321 \r
322         //! This namespace provides interfaces for input/output: Reading and writing files, accessing zip archives, ...\r
323         namespace io\r
324         {\r
325         }\r
326 \r
327         //! All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...\r
328         namespace scene\r
329         {\r
330         }\r
331 \r
332         //! The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.\r
333         namespace video\r
334         {\r
335         }\r
336 }\r
337 \r
338 /*! \file irrlicht.h\r
339         \brief Main header file of the irrlicht, the only file needed to include.\r
340 */\r
341 \r
342 #endif\r
343 \r