The problem sits behind the keyboard

Posted on:May 05 2007

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));
CurrentSceneManager->drawAll();
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));
CurrentSceneManager->drawAll();
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. :)





Comments:


great, it works, cool!
erik
Quote
2007-05-05 18:55:00


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
Quote
2007-05-06 13:15:00


pebkac ;)
rainer
Quote
2007-05-06 14:52:00


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
Quote
2007-05-06 21:33:00


Add comment:


Posted by:


Enter the missing letter in: "Internation?l"


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons