irrlicht.h 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. /* irrlicht.h -- interface of the 'Irrlicht Engine'
  2. Copyright (C) 2002-2012 Nikolaus Gebhardt
  3. This software is provided 'as-is', without any express or implied
  4. warranty. In no event will the authors be held liable for any damages
  5. arising from the use of this software.
  6. Permission is granted to anyone to use this software for any purpose,
  7. including commercial applications, and to alter it and redistribute it
  8. freely, subject to the following restrictions:
  9. 1. The origin of this software must not be misrepresented; you must not
  10. claim that you wrote the original software. If you use this software
  11. in a product, an acknowledgment in the product documentation would be
  12. appreciated but is not required.
  13. 2. Altered source versions must be plainly marked as such, and must not be
  14. misrepresented as being the original software.
  15. 3. This notice may not be removed or altered from any source distribution.
  16. Please note that the Irrlicht Engine is based in part on the work of the
  17. Independent JPEG Group, the zlib and the libPng. This means that if you use
  18. the Irrlicht Engine in your product, you must acknowledge somewhere in your
  19. documentation that you've used the IJG code. It would also be nice to mention
  20. that you use the Irrlicht Engine, the zlib and libPng. See the README files
  21. in the jpeglib, the zlib and libPng for further information.
  22. */
  23. #pragma once
  24. #include "IrrlichtDevice.h"
  25. #include "dimension2d.h"
  26. #include "EDriverTypes.h"
  27. #include "IEventReceiver.h"
  28. #include "irrTypes.h"
  29. #include "SIrrCreationParameters.h"
  30. #include "IrrCompileConfig.h" // for IRRLICHT_API and IRRCALLCONV
  31. //! Everything in the Irrlicht Engine can be found in this namespace.
  32. namespace irr
  33. {
  34. //! Creates an Irrlicht device. The Irrlicht device is the root object for using the engine.
  35. /** If you need more parameters to be passed to the creation of the Irrlicht Engine device,
  36. use the createDeviceEx() function.
  37. \param driverType: Type of the video driver to use.
  38. \param windowSize: Size of the window or the video mode in fullscreen mode.
  39. \param bits: Bits per pixel in fullscreen mode. Ignored if windowed mode.
  40. \param fullscreen: Should be set to true if the device should run in fullscreen. Otherwise
  41. the device runs in windowed mode.
  42. \param stencilbuffer: Specifies if the stencil buffer should be enabled. Set this to true,
  43. if you want the engine be able to draw stencil buffer shadows. Note that not all
  44. devices are able to use the stencil buffer. If they don't no shadows will be drawn.
  45. \param vsync: Specifies vertical synchronization: If set to true, the driver will wait
  46. for the vertical retrace period, otherwise not.
  47. \param receiver: A user created event receiver.
  48. \return Returns pointer to the created IrrlichtDevice or null if the
  49. device could not be created.
  50. */
  51. extern "C" IRRLICHT_API IrrlichtDevice *IRRCALLCONV createDevice(
  52. video::E_DRIVER_TYPE driverType = video::EDT_OPENGL,
  53. // parentheses are necessary for some compilers
  54. const core::dimension2d<u32> &windowSize = (core::dimension2d<u32>(640, 480)),
  55. u32 bits = 32,
  56. bool fullscreen = false,
  57. bool stencilbuffer = true,
  58. bool vsync = false,
  59. IEventReceiver *receiver = 0);
  60. //! Creates an Irrlicht device with the option to specify advanced parameters.
  61. /** Usually you should used createDevice() for creating an Irrlicht Engine device.
  62. Use this function only if you wish to specify advanced parameters like a window
  63. handle in which the device should be created.
  64. \param parameters: Structure containing advanced parameters for the creation of the device.
  65. See irr::SIrrlichtCreationParameters for details.
  66. \return Returns pointer to the created IrrlichtDevice or null if the
  67. device could not be created. */
  68. extern "C" IRRLICHT_API IrrlichtDevice *IRRCALLCONV createDeviceEx(
  69. const SIrrlichtCreationParameters &parameters);
  70. // THE FOLLOWING IS AN EMPTY LIST OF ALL SUB NAMESPACES
  71. // EXISTING ONLY FOR THE DOCUMENTATION SOFTWARE DOXYGEN.
  72. //! Basic classes such as vectors, planes, arrays, lists, and so on can be found in this namespace.
  73. namespace core
  74. {
  75. }
  76. //! The gui namespace contains useful classes for easy creation of a graphical user interface.
  77. namespace gui
  78. {
  79. }
  80. //! This namespace provides interfaces for input/output: Reading and writing files, accessing zip archives, ...
  81. namespace io
  82. {
  83. }
  84. //! All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...
  85. namespace scene
  86. {
  87. }
  88. //! The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.
  89. namespace video
  90. {
  91. }
  92. }
  93. /*! \file irrlicht.h
  94. \brief Main header file of the irrlicht, needed to create a device.
  95. */