PHP

search for


Last updated: Thu, 30 Oct 2008

IrrLib.IrrLib

IrrLib 1.X

IrrLib.IrrLibConstructor for IrrLib

Description

N/A IrrLib.IrrLib ( )

N/A

Parameters

None

Return Values

N/A

Examples

Example #1 Example of how to use a enum to select a driver.

#include <iostream>
#include "IrrLib.h"
#include <irrlicht.h>
 
using namespace std;
 
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
 
int main(){
	enum IrrDriverType { NULL, EDT_SOFTWARE, EDT_BURNINGSVIDEO, EDT_OPENGL, EDT_DIRECT3D8, EDT_DIRECT3D9 };
	IrrDriverType =  EDT_DIRECT3D9;
	IrrLib Irrlicht(IrrDriverType, 640, 480, 16, false, true, false);
 
	while (Irrlicht.DeviceIsRunning())
	if (Irrlicht.IsActiveWindow())
	{
			Irrlicht.BeginScene();
			Irrlicht.DrawAll();
			Irrlicht.EndScene();
	}
	Irrlicht.EndIrrlicht();
	return 0;
}
 



Notes

This is the constructor for IrrLib. It has many options:
IrrLib();
IrrLib(irr::video::E_DRIVER_TYPE drivertype, irr::core::dimension2d & res, irr::u32 bits, bool fullscreen, bool stencilbuffer, bool vsync);
IrrLib(int drivertype, int width, int height, int bits, bool fullscreen, bool stencilbuffer, bool vsync);

The first is the default constructor whch inilitizes IrrLib with the following parameters:
EDT_SOFTWARE rendering, 640x480 resolution, 16 bit, window mode, no stencil buffer, and no vsync

The second one is for those who want to use Irrlicht constants and datatypes.
The third is for people who just want to use basic datatypes when working with Irrlicht.

If you chose the third way and chose a DirectX driver and Irrlicht doesn't report you have DirectX compiled into the engine; it will fallback to OpenGL.
The other 2 options do not have this check, but in the future they will.




Last updated: Thu, 30 Oct 2008
User Contributed Notes
IrrLib.IrrLib
Your name(or email):
Comment:
Security Code: CAPTCHA ImageReload Image