I began to use Irrlicht for my game and tried to use XML as my config file (which contains window width, height info), however, I found it seems like only AFTER we create a device, we could use "createXMLReader".
So my problem is: without window width and height info from XML file, I can't create device, however, without the device I couldn't read XML...
Any suggestion for this situation? I really don't want to also integrate any library like tinyXML to my system...
Thx a lot!
Any suggestion for my XML configure file?
I had this problem too.
And there is only 2 solutions I found:
- create NULL video device (you will not have ability to render, but device will be valid pointer and you will be able to createXMLReader);
- especially for this kind of config (that is needed before device creation) -- do not use XML but some simple own text or binary format.
I choose second way, because only the idea of recreating device for such simple thing kills my mind
P.S.: but all other data (like scene configuration etc.) I storing in XML.
And there is only 2 solutions I found:
- create NULL video device (you will not have ability to render, but device will be valid pointer and you will be able to createXMLReader);
- especially for this kind of config (that is needed before device creation) -- do not use XML but some simple own text or binary format.
I choose second way, because only the idea of recreating device for such simple thing kills my mind
P.S.: but all other data (like scene configuration etc.) I storing in XML.
Use irrXML so you can get an xml reader before the device creation.
________
CHEVROLET STRAIGHT-6 ENGINE SPECIFICATIONS
________
CHEVROLET STRAIGHT-6 ENGINE SPECIFICATIONS
Last edited by LLDD on Sun Feb 20, 2011 7:49 am, edited 1 time in total.
Thx guys! Since I should finished the other parts of my program, just leave configure problem at this stage... anyway, thx for all ur suggestions!
I'm thinking... probably it's not a good idea to tightly integrate everything in the core of engine? (like this case, we need a "device" to read file, but some data for creating a device is inside the file -_-#) In my own engine (it's just a wapper of Irrlicht now and I'm planning to build up a REAL engine for crossplatform mobile games), I will have 3 parts: render system, file system, sound system and hopefully it could be easily to fix into any kind of games...
I'm thinking... probably it's not a good idea to tightly integrate everything in the core of engine? (like this case, we need a "device" to read file, but some data for creating a device is inside the file -_-#) In my own engine (it's just a wapper of Irrlicht now and I'm planning to build up a REAL engine for crossplatform mobile games), I will have 3 parts: render system, file system, sound system and hopefully it could be easily to fix into any kind of games...