Public Member Functions |
virtual bool | activateJoysticks (core::array< SJoystickInfo > &joystickInfo)=0 |
| Activate any joysticks, and generate events for them.
|
virtual void | clearSystemMessages ()=0 |
| Remove messages pending in the system message loop.
|
virtual void | closeDevice ()=0 |
| Notifies the device that it should close itself.
|
virtual video::ECOLOR_FORMAT | getColorFormat () const =0 |
| Get the current color format of the window.
|
virtual gui::ICursorControl * | getCursorControl ()=0 |
| Provides access to the cursor control.
|
virtual IEventReceiver * | getEventReceiver ()=0 |
| Provides access to the current event receiver.
|
virtual io::IFileSystem * | getFileSystem ()=0 |
| Provides access to the virtual file system.
|
virtual bool | getGammaRamp (f32 &red, f32 &green, f32 &blue, f32 &brightness, f32 &contrast)=0 |
| Get the current Gamma Value for the Display.
|
virtual gui::IGUIEnvironment * | getGUIEnvironment ()=0 |
| Provides access to the 2d user interface environment.
|
virtual ILogger * | getLogger ()=0 |
| Provides access to the message logger.
|
virtual IOSOperator * | getOSOperator ()=0 |
| Provides access to the operation system operator object.
|
virtual scene::ISceneManager * | getSceneManager ()=0 |
| Provides access to the scene manager.
|
virtual ITimer * | getTimer ()=0 |
| Provides access to the engine's timer.
|
virtual E_DEVICE_TYPE | getType () const =0 |
| Get the type of the device.
|
virtual const c8 * | getVersion () const =0 |
| Get the version of the engine.
|
virtual video::IVideoDriver * | getVideoDriver ()=0 |
| Provides access to the video driver for drawing 3d and 2d geometry.
|
virtual video::IVideoModeList * | getVideoModeList ()=0 |
| Gets a list with all video modes available.
|
virtual bool | isFullscreen () const =0 |
| Checks if the Irrlicht window is running in fullscreen mode.
|
virtual bool | isWindowActive () const =0 |
| Returns if the window is active.
|
virtual bool | isWindowFocused () const =0 |
| Checks if the Irrlicht window has focus.
|
virtual bool | isWindowMinimized () const =0 |
| Checks if the Irrlicht window is minimized.
|
virtual void | maximizeWindow ()=0 |
| Maximizes the window if possible.
|
virtual void | minimizeWindow ()=0 |
| Minimizes the window if possible.
|
virtual bool | postEventFromUser (const SEvent &event)=0 |
| Sends a user created event to the engine.
|
virtual void | restoreWindow ()=0 |
| Restore the window to normal size if possible.
|
virtual bool | run ()=0 |
| Runs the device.
|
virtual void | setEventReceiver (IEventReceiver *receiver)=0 |
| Sets a new user event receiver which will receive events from the engine.
|
virtual bool | setGammaRamp (f32 red, f32 green, f32 blue, f32 relativebrightness, f32 relativecontrast)=0 |
| Set the current Gamma Value for the Display.
|
virtual void | setInputReceivingSceneManager (scene::ISceneManager *sceneManager)=0 |
| Sets the input receiving scene manager.
|
virtual void | setResizable (bool resize=false)=0 |
| Sets if the window should be resizable in windowed mode.
|
virtual void | setWindowCaption (const wchar_t *text)=0 |
| Sets the caption of the window.
|
virtual void | sleep (u32 timeMs, bool pauseTimer=false)=0 |
| Pause execution and let other processes to run for a specified amount of time.
|
virtual void | yield ()=0 |
| Cause the device to temporarily pause execution and let other processes run.
|
bool | drop () const |
| Drops the object. Decrements the reference counter by one.
|
const c8 * | getDebugName () const |
| Returns the debug name of the object.
|
s32 | getReferenceCount () const |
| Get the reference count.
|
void | grab () const |
| Grabs the object. Increments the reference counter by one.
|
| IReferenceCounted () |
| Constructor.
|
virtual | ~IReferenceCounted () |
| Destructor.
|
The Irrlicht device. You can create it with createDevice() or createDeviceEx().
This is the most important class of the Irrlicht Engine. You can
access everything in the engine if you have a pointer to an instance of this class. There should be only one instance of this class at any time.
Definition at line 42 of file IrrlichtDevice.h.
virtual void irr::IrrlichtDevice::clearSystemMessages |
( |
| ) |
|
|
pure virtual |
Remove messages pending in the system message loop.
This function is usually used after messages have been buffered for a longer time, for example
when loading a large scene. Clearing the message loop prevents that mouse- or buttonclicks which users have pressed in the meantime will now trigger unexpected actions in the gui.
So far the following messages are cleared:
Win32: All keyboard and mouse messages
Linux: All keyboard and mouse messages
All other devices are not yet supported here.
The function is still somewhat experimental, as the kind of messages we clear is based on just a few use-cases. If you think further messages should be cleared, or some messages should not be cleared here, then please tell us.
Gets a list with all video modes available.
If you are confused now, because you think you have to
create an Irrlicht Device with a video mode before being able to get the video mode list, let me tell you that there is no need to start up an Irrlicht Device with EDT_DIRECT3D8, EDT_OPENGL or EDT_SOFTWARE: For this (and for lots of other reasons) the null driver, EDT_NULL exists.
- Returns
- Pointer to a list with all video modes supported by the gfx adapter.
virtual bool irr::IrrlichtDevice::run |
( |
| ) |
|
|
pure virtual |
Runs the device.
Also increments the virtual timer by calling
ITimer::tick();. You can prevent this by calling ITimer::stop(); before and ITimer::start() after calling IrrlichtDevice::run(). Returns false if device wants to be deleted. Use it in this way:
If you want the device to do nothing if the window is inactive (recommended), use the slightly enhanced code shown at isWindowActive().
Note if you are running Irrlicht inside an external, custom created window: Calling Device->run() will cause Irrlicht to dispatch windows messages internally. If you are running Irrlicht in your own custom window, you can also simply use your own message loop using GetMessage, DispatchMessage and whatever and simply don't use this method. But note that Irrlicht will not be able to fetch user input then. See irr::SIrrlichtCreationParameters::WindowId for more informations and example code.