Reflected Water Example please help

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
Valor
Posts: 40
Joined: Fri Jul 30, 2010 1:20 pm

Reflected Water Example please help

Post by Valor »

can someone who really knows irrlicht please help get this reflected water example working for irrlicht 1.7.1?
http://sio2.g0dsoft.com/modules/wmpdown ... id=1&lid=8
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

Ok so... I started fixing the errors.

Where it can't use depricated dimension2Di I'm converting it to dimension2D<u32> like it told me in the error.

That gets me down to a couple errors. and this is the big one.. it has to do with how the matrix is called because in 1.7.1 it's a private member of CMatrix4.

I tried a couple things (not knowing anything about matrix calcs) and found that setting it to zero also worked to bypass the error for now.

I also had to change this line

Code: Select all

CEventReceiver *_EventReceiver;// = new CEventReceiver();

Because it's abstract and can't be "instintiated".

it has compiled at this point, testing it reveals a problem with the eventreceiver... so I move the code above outside of the main function.

and presto chango
Image
it compiles, however I doubt this is good enough to use as is, like I said I converted a matrix variable to 0.. and that's not exactly right.

I may not have "fixed" this correctly, but I have made it compile for you.
The rest you will have to do on your own, and if you can't manage that you really shouldn't be trying to develop this. As much as programming is considered an art form rather than a science, you can't just throw a bunch of code together and expect it to always work.

hope that helps, you are welcome for that 20 minutes of my life. 8)
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

Code: Select all

	CEventReceiver _EventReceiver;// = new CEventReceiver();

	_device = createDevice(driverType, core::dimension2d<u32>(800, 600),
		32, false, false, false, &_EventReceiver);
and also

Code: Select all

class CEventReceiver : public IEventReceiver
{
	bool OnEvent(const SEvent& Event)
another change to receiver so the events work again.
Valor
Posts: 40
Joined: Fri Jul 30, 2010 1:20 pm

Post by Valor »

Great! Got it compiled and running with your help! Thanks so much midnight! :)
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

Valor wrote:Great! Got it compiled and running with your help! Thanks so much midnight! :)
My pleasure.
Post Reply