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. :)