Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm working on a little game that uses Irrlicht. I'm pretty new to Irrlicht and I was wondering how I could enable multisampling. The device driver is EDT_OPENGL initiated as such:

IrrlichtDevice *device = createDevice(video::EDT_OPENGL,
                                        core::dimension2d<u32>(800, 700),

How do I enable multisampling?

share|improve this question
up vote 4 down vote accepted

Here's a solution, but you'll need to call createDeviceEx instead of the current function.

You'll have to pass a SIrrlichtCreationParameters structure to the above function, with the AntiAlias member set to true (or another value ? It seems that the variable is an unsigned integer, and not a bool, never noticed that). Of course you'll have to define some other structure members in order to have the same IrrlichtDevice as the one in your question. ;)

Here's a piece of code if you prefer : (warning : I've not used Irrlicht since 1 year now)

SIrrlichtCreationParameters params = SIrrlichtCreationParameters();
params.AntiAlias = true;
params.DriverType = video::EDT_OPENGL;
params.WindowSize = core::dimension2d<u32>(800, 700);
IrrlichtDevice *device = createDeviceEx(params);

See here for (unfortunately not much) information. (the Irrlicht doc is in fact not very helpful, unfortunately)

Hope this helps, good night ! :-)

share|improve this answer
I think a combination of your answer and user1201210's is correct. It should be "params.AntiAlias = 8;" The higher, the better it seems. – James Zaghini Jun 5 '13 at 9:46
The AntiAlias value is meant to be a u8 not a boolean. Valid values are powers of two, so 2, 4, 8, 16. The device usually falls back to the next highest number if you specify a factor that is too high. 1 is usually the same as 0, but it depends if the hardware has a special meaning for 1 as an AntiAlias value. – Octopus Dec 11 '15 at 20:43

Quick addendum to Minishlink's answer: AntiAlias is the number of samples to use in anti-aliasing. The following snippet comes from Irrlicht's COpenGLDriver.cpp.

// This value determines the number of samples used for antialiasing
// My experience is that 8 does not show a big
// improvement over 4, but 4 shows a big improvement
// over 2.
if(AntiAlias > 32)
    AntiAlias = 32;
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.