2d Anaglyph

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Nova
Competition winner
Posts: 99
Joined: Mon May 09, 2005 10:32 am

2d Anaglyph

Post by Nova »

Hi everyone,

I wanted to do some anaglyph effects with 2d shapes. In 3d I would simply set the override material like this

Code: Select all

Env::Driver->getOverrideMaterial().Material.ColorMask = video::ECP_RED;
But this doesn't seem to affect 2d drawing methods like draw2DRectangle.
Is there a way to do the same thing for 2d, preferably without using render to texture?

Thank you in advance.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Well, you should try the 2dmaterial from the video driver. Not sure if it already exists in 1.7, though. It's another override material, but only applied to 2d rendering.
Nova
Competition winner
Posts: 99
Joined: Mon May 09, 2005 10:32 am

Post by Nova »

:oops: It does exist. Sorry I must have skipped it in the API.

Just for anyone who may have the same problem, this is the working code

Code: Select all

Env::Driver->enableMaterial2D();
Env::Driver->getMaterial2D().ColorMask = video::ECP_RED;
Post Reply