arsa  2.7
Public Member Functions | Public Attributes | List of all members
irr::SIrrlichtCreationParameters Struct Reference

Structure for holding Irrlicht Device creation parameters. More...

#include <SIrrCreationParameters.h>

Public Member Functions

 SIrrlichtCreationParameters ()
 Constructs a SIrrlichtCreationParameters structure with default values. More...
 
 SIrrlichtCreationParameters (const SIrrlichtCreationParameters &other)
 
SIrrlichtCreationParametersoperator= (const SIrrlichtCreationParameters &other)
 

Public Attributes

E_DEVICE_TYPE DeviceType
 Type of the device. More...
 
video::E_DRIVER_TYPE DriverType
 Type of video driver used to render graphics. More...
 
core::dimension2d< u32WindowSize
 Size of the window or the video mode in fullscreen mode. Default: 800x600. More...
 
core::position2di WindowPosition
 Position of the window on-screen. Default: (-1, -1) or centered. More...
 
u8 Bits
 Minimum Bits per pixel of the color buffer in fullscreen mode. Ignored if windowed mode. Default: 32. More...
 
u8 ZBufferBits
 Minimum Bits per pixel of the depth buffer. Default: 24. More...
 
bool Fullscreen
 Should be set to true if the device should run in fullscreen. More...
 
bool WindowResizable
 Should a non-fullscreen window be resizable. More...
 
bool Stencilbuffer
 Specifies if the stencil buffer should be enabled. More...
 
bool Vsync
 Specifies vertical synchronization. More...
 
u8 AntiAlias
 Specifies if the device should use fullscreen anti aliasing. More...
 
bool HandleSRGB
 Flag to enable proper sRGB and linear color handling. More...
 
bool WithAlphaChannel
 Whether the main framebuffer uses an alpha channel. More...
 
bool Doublebuffer
 Whether the main framebuffer uses doublebuffering. More...
 
bool IgnoreInput
 Specifies if the device should ignore input events. More...
 
bool Stereobuffer
 Specifies if the device should use stereo buffers. More...
 
bool HighPrecisionFPU
 Specifies if the device should use high precision FPU setting. More...
 
IEventReceiverEventReceiver
 A user created event receiver. More...
 
voidWindowId
 Window Id. More...
 
ELOG_LEVEL LoggingLevel
 Specifies the logging level used in the logging interface. More...
 
u32 DisplayAdapter
 Allows to select which graphic card is used for rendering when more than one card is in the system. More...
 
bool DriverMultithreaded
 Create the driver multithreaded. More...
 
bool UsePerformanceTimer
 Enables use of high performance timers on Windows platform. More...
 
const c8 *const SDK_version_do_not_use
 Don't use or change this parameter. More...
 
voidPrivateData
 Define some private data storage. More...
 
irr::io::path OGLES2ShaderPath
 Set the path where default-shaders to simulate the fixed-function pipeline can be found. More...
 

Detailed Description

Structure for holding Irrlicht Device creation parameters.

This structure is used in the createDeviceEx() function.

Definition at line 22 of file SIrrCreationParameters.h.

Constructor & Destructor Documentation

◆ SIrrlichtCreationParameters() [1/2]

irr::SIrrlichtCreationParameters::SIrrlichtCreationParameters ( )
inline

Constructs a SIrrlichtCreationParameters structure with default values.

Definition at line 25 of file SIrrCreationParameters.h.

25  :
28  WindowSize(core::dimension2d<u32>(800, 600)),
30  Bits(32),
31  ZBufferBits(24),
32  Fullscreen(false),
33  WindowResizable(false),
34  Stencilbuffer(true),
35  Vsync(false),
36  AntiAlias(0),
37  HandleSRGB(false),
38  WithAlphaChannel(false),
39  Doublebuffer(true),
40  IgnoreInput(false),
41  Stereobuffer(false),
42  HighPrecisionFPU(false),
43  EventReceiver(0),
44  WindowId(0),
45 #ifdef _DEBUG
47 #else
49 #endif
50  DisplayAdapter(0),
51  DriverMultithreaded(false),
52  UsePerformanceTimer(true),
54  PrivateData(0),
55 #if defined(_IRR_COMPILE_WITH_IOS_DEVICE_) || defined(_IRR_ANDROID_PLATFORM_) || defined(_IRR_EMSCRIPTEN_PLATFORM_)
56  OGLES2ShaderPath("media/Shaders/")
57 #else
58  OGLES2ShaderPath("../../media/Shaders/")
59 #endif
60  {
61  }
#define IRRLICHT_SDK_VERSION
bool UsePerformanceTimer
Enables use of high performance timers on Windows platform.
bool Vsync
Specifies vertical synchronization.
bool Stereobuffer
Specifies if the device should use stereo buffers.
u8 AntiAlias
Specifies if the device should use fullscreen anti aliasing.
bool Doublebuffer
Whether the main framebuffer uses doublebuffering.
bool DriverMultithreaded
Create the driver multithreaded.
IEventReceiver * EventReceiver
A user created event receiver.
This selection allows Irrlicht to choose the best device from the ones available.
Definition: EDeviceTypes.h:58
bool WindowResizable
Should a non-fullscreen window be resizable.
core::dimension2d< u32 > WindowSize
Size of the window or the video mode in fullscreen mode. Default: 800x600.
E_DEVICE_TYPE DeviceType
Type of the device.
u32 DisplayAdapter
Allows to select which graphic card is used for rendering when more than one card is in the system.
const c8 *const SDK_version_do_not_use
Don't use or change this parameter.
bool WithAlphaChannel
Whether the main framebuffer uses an alpha channel.
bool Fullscreen
Should be set to true if the device should run in fullscreen.
Used for printing information helpful in debugging.
Definition: ILogger.h:20
u8 Bits
Minimum Bits per pixel of the color buffer in fullscreen mode. Ignored if windowed mode....
ELOG_LEVEL LoggingLevel
Specifies the logging level used in the logging interface.
u8 ZBufferBits
Minimum Bits per pixel of the depth buffer. Default: 24.
The Burning's Software Renderer, an alternative software renderer.
Definition: EDriverTypes.h:40
void * PrivateData
Define some private data storage.
bool HandleSRGB
Flag to enable proper sRGB and linear color handling.
Useful information to print. For example hardware infos or something started/stopped.
Definition: ILogger.h:23
bool HighPrecisionFPU
Specifies if the device should use high precision FPU setting.
irr::io::path OGLES2ShaderPath
Set the path where default-shaders to simulate the fixed-function pipeline can be found.
core::position2di WindowPosition
Position of the window on-screen. Default: (-1, -1) or centered.
vector2d< s32 > position2di
Definition: position2d.h:24
bool Stencilbuffer
Specifies if the stencil buffer should be enabled.
bool IgnoreInput
Specifies if the device should ignore input events.
video::E_DRIVER_TYPE DriverType
Type of video driver used to render graphics.

◆ SIrrlichtCreationParameters() [2/2]

irr::SIrrlichtCreationParameters::SIrrlichtCreationParameters ( const SIrrlichtCreationParameters other)
inline

Definition at line 63 of file SIrrCreationParameters.h.

63  :
65  {*this = other;}
#define IRRLICHT_SDK_VERSION
const c8 *const SDK_version_do_not_use
Don't use or change this parameter.

Member Function Documentation

◆ operator=()

SIrrlichtCreationParameters& irr::SIrrlichtCreationParameters::operator= ( const SIrrlichtCreationParameters other)
inline

Definition at line 67 of file SIrrCreationParameters.h.

68  {
69  DeviceType = other.DeviceType;
70  DriverType = other.DriverType;
71  WindowSize = other.WindowSize;
72  WindowPosition = other.WindowPosition;
73  Bits = other.Bits;
74  ZBufferBits = other.ZBufferBits;
75  Fullscreen = other.Fullscreen;
76  WindowResizable = other.WindowResizable;
77  Stencilbuffer = other.Stencilbuffer;
78  Vsync = other.Vsync;
79  AntiAlias = other.AntiAlias;
80  HandleSRGB = other.HandleSRGB;
81  WithAlphaChannel = other.WithAlphaChannel;
82  Doublebuffer = other.Doublebuffer;
83  IgnoreInput = other.IgnoreInput;
84  Stereobuffer = other.Stereobuffer;
85  HighPrecisionFPU = other.HighPrecisionFPU;
86  EventReceiver = other.EventReceiver;
87  WindowId = other.WindowId;
88  LoggingLevel = other.LoggingLevel;
89  DisplayAdapter = other.DisplayAdapter;
90  DriverMultithreaded = other.DriverMultithreaded;
91  UsePerformanceTimer = other.UsePerformanceTimer;
92  PrivateData = other.PrivateData;
93  OGLES2ShaderPath = other.OGLES2ShaderPath;
94  return *this;
95  }
bool UsePerformanceTimer
Enables use of high performance timers on Windows platform.
bool Vsync
Specifies vertical synchronization.
bool Stereobuffer
Specifies if the device should use stereo buffers.
u8 AntiAlias
Specifies if the device should use fullscreen anti aliasing.
bool Doublebuffer
Whether the main framebuffer uses doublebuffering.
bool DriverMultithreaded
Create the driver multithreaded.
IEventReceiver * EventReceiver
A user created event receiver.
bool WindowResizable
Should a non-fullscreen window be resizable.
core::dimension2d< u32 > WindowSize
Size of the window or the video mode in fullscreen mode. Default: 800x600.
E_DEVICE_TYPE DeviceType
Type of the device.
u32 DisplayAdapter
Allows to select which graphic card is used for rendering when more than one card is in the system.
bool WithAlphaChannel
Whether the main framebuffer uses an alpha channel.
bool Fullscreen
Should be set to true if the device should run in fullscreen.
u8 Bits
Minimum Bits per pixel of the color buffer in fullscreen mode. Ignored if windowed mode....
ELOG_LEVEL LoggingLevel
Specifies the logging level used in the logging interface.
u8 ZBufferBits
Minimum Bits per pixel of the depth buffer. Default: 24.
void * PrivateData
Define some private data storage.
bool HandleSRGB
Flag to enable proper sRGB and linear color handling.
bool HighPrecisionFPU
Specifies if the device should use high precision FPU setting.
irr::io::path OGLES2ShaderPath
Set the path where default-shaders to simulate the fixed-function pipeline can be found.
core::position2di WindowPosition
Position of the window on-screen. Default: (-1, -1) or centered.
bool Stencilbuffer
Specifies if the stencil buffer should be enabled.
bool IgnoreInput
Specifies if the device should ignore input events.
video::E_DRIVER_TYPE DriverType
Type of video driver used to render graphics.

Member Data Documentation

◆ AntiAlias

u8 irr::SIrrlichtCreationParameters::AntiAlias

Specifies if the device should use fullscreen anti aliasing.

Makes sharp/pixelated edges softer, but requires more performance. Also, 2D elements might look blurred with this switched on. The resulting rendering quality also depends on the hardware and driver you are using, your program might look different on different hardware with this. So if you are writing a game/application with AntiAlias switched on, it would be a good idea to make it possible to switch this option off again by the user. The value is the maximal antialiasing factor requested for the device. The creation method will automatically try smaller values if no window can be created with the given value. Value one is usually the same as 0 (disabled), but might be a special value on some platforms. On D3D devices it maps to NONMASKABLE. Default value: 0 - disabled

Definition at line 167 of file SIrrCreationParameters.h.

◆ Bits

u8 irr::SIrrlichtCreationParameters::Bits

Minimum Bits per pixel of the color buffer in fullscreen mode. Ignored if windowed mode. Default: 32.

Definition at line 123 of file SIrrCreationParameters.h.

◆ DeviceType

E_DEVICE_TYPE irr::SIrrlichtCreationParameters::DeviceType

Type of the device.

This setting decides the windowing system used by the device, most device types are native to a specific operating system and so may not be available. EIDT_WIN32 is only available on Windows desktops, EIDT_WINCE is only available on Windows mobile devices, EIDT_COCOA is only available on Mac OSX, EIDT_X11 is available on Linux, Solaris, BSD and other operating systems which use X11, EIDT_SDL is available on most systems if compiled in, EIDT_CONSOLE is usually available but can only render to text, EIDT_BEST will select the best available device for your operating system. Default: EIDT_BEST.

Definition at line 108 of file SIrrCreationParameters.h.

◆ DisplayAdapter

u32 irr::SIrrlichtCreationParameters::DisplayAdapter

Allows to select which graphic card is used for rendering when more than one card is in the system.

So far only supported on D3D

Definition at line 294 of file SIrrCreationParameters.h.

◆ Doublebuffer

bool irr::SIrrlichtCreationParameters::Doublebuffer

Whether the main framebuffer uses doublebuffering.

This should be usually enabled, in order to avoid render artifacts on the visible framebuffer. However, it might be useful to use only one buffer on very small devices. If no doublebuffering is available, the drivers will fall back to single buffers. Default value: true

Definition at line 201 of file SIrrCreationParameters.h.

◆ DriverMultithreaded

bool irr::SIrrlichtCreationParameters::DriverMultithreaded

Create the driver multithreaded.

Default is false. Enabling this can slow down your application. Note that this does not make Irrlicht threadsafe, but only the underlying driver-API for the graphiccard. So far only supported on D3D.

Definition at line 300 of file SIrrCreationParameters.h.

◆ DriverType

video::E_DRIVER_TYPE irr::SIrrlichtCreationParameters::DriverType

Type of video driver used to render graphics.

This can currently be video::EDT_NULL, video::EDT_SOFTWARE, video::EDT_BURNINGSVIDEO, video::EDT_DIRECT3D9, and video::EDT_OPENGL. Default: EDT_BURNINGSVIDEO.

Definition at line 114 of file SIrrCreationParameters.h.

◆ EventReceiver

IEventReceiver* irr::SIrrlichtCreationParameters::EventReceiver

A user created event receiver.

Definition at line 228 of file SIrrCreationParameters.h.

◆ Fullscreen

bool irr::SIrrlichtCreationParameters::Fullscreen

Should be set to true if the device should run in fullscreen.

Otherwise the device runs in windowed mode. Default: false.

Definition at line 130 of file SIrrCreationParameters.h.

◆ HandleSRGB

bool irr::SIrrlichtCreationParameters::HandleSRGB

Flag to enable proper sRGB and linear color handling.

In most situations, it is desirable to have the color handling in non-linear sRGB color space, and only do the intermediate color calculations in linear RGB space. If this flag is enabled, the device and driver try to assure that all color input and output are color corrected and only the internal color representation is linear. This means, that the color output is properly gamma-adjusted to provide the brighter colors for monitor display. And that blending and lighting give a more natural look, due to proper conversion from non-linear colors into linear color space for blend operations. If this flag is enabled, all texture colors (which are usually in sRGB space) are correctly displayed. However vertex colors and other explicitly set values have to be manually encoded in linear color space. Default value: false.

Definition at line 182 of file SIrrCreationParameters.h.

◆ HighPrecisionFPU

bool irr::SIrrlichtCreationParameters::HighPrecisionFPU

Specifies if the device should use high precision FPU setting.

This is only relevant for DirectX Devices, which switch to low FPU precision by default for performance reasons. However, this may lead to problems with the other computations of the application. In this case setting this flag to true should help

  • on the expense of performance loss, though. Default value: false

Definition at line 225 of file SIrrCreationParameters.h.

◆ IgnoreInput

bool irr::SIrrlichtCreationParameters::IgnoreInput

Specifies if the device should ignore input events.

This is only relevant when using external I/O handlers. External windows need to take care of this themselves. Currently only supported by X11. Default value: false

Definition at line 208 of file SIrrCreationParameters.h.

◆ LoggingLevel

ELOG_LEVEL irr::SIrrlichtCreationParameters::LoggingLevel

Specifies the logging level used in the logging interface.

The default value is ELL_INFORMATION. You can access the ILogger interface later on from the IrrlichtDevice with getLogger() and set another level. But if you need more or less logging information already from device creation, then you have to change it here.

Definition at line 290 of file SIrrCreationParameters.h.

◆ OGLES2ShaderPath

irr::io::path irr::SIrrlichtCreationParameters::OGLES2ShaderPath

Set the path where default-shaders to simulate the fixed-function pipeline can be found.

This is about the shaders which can be found in media/Shaders by default. It's only necessary to set when using OGL-ES 2.0

Definition at line 323 of file SIrrCreationParameters.h.

◆ PrivateData

void* irr::SIrrlichtCreationParameters::PrivateData

Define some private data storage.

Used when platform devices need access to OS specific data structures etc. This is only used for Android at th emoment in order to access the native Java RE.

Definition at line 318 of file SIrrCreationParameters.h.

◆ SDK_version_do_not_use

const c8* const irr::SIrrlichtCreationParameters::SDK_version_do_not_use

Don't use or change this parameter.

Always set it to IRRLICHT_SDK_VERSION, which is done by default. This is needed for sdk version checks.

Definition at line 312 of file SIrrCreationParameters.h.

◆ Stencilbuffer

bool irr::SIrrlichtCreationParameters::Stencilbuffer

Specifies if the stencil buffer should be enabled.

Set this to true, if you want the engine be able to draw stencil buffer shadows. Note that not all drivers are able to use the stencil buffer, hence it can be ignored during device creation. Without the stencil buffer no shadows will be drawn. Default: true.

Definition at line 143 of file SIrrCreationParameters.h.

◆ Stereobuffer

bool irr::SIrrlichtCreationParameters::Stereobuffer

Specifies if the device should use stereo buffers.

Some high-end gfx cards support two framebuffers for direct support of stereoscopic output devices. If this flag is set the device tries to create a stereo context. Currently only supported by OpenGL. Default value: false

Definition at line 216 of file SIrrCreationParameters.h.

◆ UsePerformanceTimer

bool irr::SIrrlichtCreationParameters::UsePerformanceTimer

Enables use of high performance timers on Windows platform.

When performance timers are not used, standard GetTickCount() is used instead which usually has worse resolution, but also less problems with speed stepping and other techniques.

Definition at line 307 of file SIrrCreationParameters.h.

◆ Vsync

bool irr::SIrrlichtCreationParameters::Vsync

Specifies vertical synchronization.

If set to true, the driver will wait for the vertical retrace period, otherwise not. May be silently ignored. Default: false

Definition at line 149 of file SIrrCreationParameters.h.

◆ WindowId

void* irr::SIrrlichtCreationParameters::WindowId

Window Id.

If this is set to a value other than 0, the Irrlicht Engine will be created in an already existing window. For Windows, set this to the HWND of the window you want. For iOS, assign UIView to this variable. The windowSize and FullScreen options will be ignored when using the WindowId parameter. Default this is set to 0. To make Irrlicht run inside the custom window, you still will have to draw Irrlicht on your own. You can use this loop, as usual:

while (device->run())
{
driver->beginScene(video::ECBF_COLOR | video::ECBF_DEPTH, 0);
smgr->drawAll();
driver->endScene();
}

Instead of this, you can also simply use your own message loop using GetMessage, DispatchMessage and whatever. Calling IrrlichtDevice::run() will cause Irrlicht to dispatch messages internally too. You need not call Device->run() if you want to do your own message dispatching loop, but Irrlicht will not be able to fetch user input then and you have to do it on your own using the window messages, DirectInput, or whatever. Also, you'll have to increment the Irrlicht timer. An alternative, own message dispatching loop without device->run() would look like this:

MSG msg;
while (true)
{
if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
if (msg.message == WM_QUIT)
break;
}
// increase virtual timer time
device->getTimer()->tick();
// draw engine picture
driver->beginScene(video::ECBF_COLOR | video::ECBF_DEPTH, 0);
smgr->drawAll();
driver->endScene();
}

However, there is no need to draw the picture this often. Just do it how you like.

Definition at line 282 of file SIrrCreationParameters.h.

◆ WindowPosition

core::position2di irr::SIrrlichtCreationParameters::WindowPosition

Position of the window on-screen. Default: (-1, -1) or centered.

Definition at line 120 of file SIrrCreationParameters.h.

◆ WindowResizable

bool irr::SIrrlichtCreationParameters::WindowResizable

Should a non-fullscreen window be resizable.

Might not be supported by all devices. Ignored when Fullscreen is true. Default: false

Definition at line 135 of file SIrrCreationParameters.h.

◆ WindowSize

core::dimension2d<u32> irr::SIrrlichtCreationParameters::WindowSize

Size of the window or the video mode in fullscreen mode. Default: 800x600.

Definition at line 117 of file SIrrCreationParameters.h.

◆ WithAlphaChannel

bool irr::SIrrlichtCreationParameters::WithAlphaChannel

Whether the main framebuffer uses an alpha channel.

In some situations it might be desirable to get a color buffer with an alpha channel, e.g. when rendering into a transparent window or overlay. If this flag is set the device tries to create a framebuffer with alpha channel. If this flag is set, only color buffers with alpha channel are considered. Otherwise, it depends on the actual hardware if the colorbuffer has an alpha channel or not. Default value: false

Definition at line 193 of file SIrrCreationParameters.h.

◆ ZBufferBits

u8 irr::SIrrlichtCreationParameters::ZBufferBits

Minimum Bits per pixel of the depth buffer. Default: 24.

Definition at line 126 of file SIrrCreationParameters.h.


The documentation for this struct was generated from the following file: