The problem sits behind the keyboard

Sometimes, I am really surprised about my own stupidity, and I am currently again. Remember that people found out that the game plugin in irrEdit doesn't work as promised? I thought it must be the problem of special drivers or hardware, because I noticed this problem on my notebook but not on my desktop pc, and the irrEdit message log tells something about beginScene() failing.
Now I wanted to fix the problem and tried this out on my desktop pc, and - whoa - the game plugin doesn't work there anymore either! Strange, I thought, I didn't install any new drivers or hardware on that system. So I debugged this and came to the drawing code of the irrEdit example game plugin (simplified):

driver->beginScene(true, true, irr::video::SColor(0,255,0,0));
return 0;

See it? The endScene() line is totally missing! Looks like somehow, I managed to delete a line of code in that plugin while packing irrEdit for release. This code would never have worked. The code should look like this, of course:

driver->beginScene(true, true, irr::video::SColor(0,255,0,0));
driver->endScene(windowId, rct);
return 0;

But the positive side of this is: If you want to write a game plugin for irrEdit, there is no need to wait for a new release. The source code of the plugin is available, just change it, compile it and it should work. :)

four comments, already:

great, it works, cool!
erik - 05 05 07 - 18:55

Woohoo, works here too. Only question is how do you stop or exit the plugin? I had to ALT-F4 irrEdit to get out of it.
Beyers - 06 05 07 - 13:15

pebkac ;)
rainer - 06 05 07 - 14:52

I know that kind of problems. Sometimes i sit in front of the screen, and make the most simple programming mistakes ever. Probably it’s because I program in too much languages to often*g*.
IRRer - 06 05 07 - 21:33

Displayed name:  
Remember personal info?
Website (optional):
Enter "layered" (antispam):
Comment:Emoticons / Textile


Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.
Note: If you type in your email adress above, it will be visible to other visitors, although it will be hidden for bots using javaScript.