Hello,
I’m having a difficult time trying to figure out how to make a simple program with Urho using the old “main() entry point”.
I have already compiled it from source, used it to make a new project through CMake too. (As explained int the urho3d.github.io/documentation/1.32/_using_library.html)
Now I just want to “recreate” the HelloWorld example but Instead of using the WinConsole, and the Application class thing, use “simple” and clean main() entry point and control the main loop
iteration manually.
I have tryed to figure out through the Classes diagram and the documentation how to create it myself, but I really don’t ubderstand how it would work. I also tried to find a example on Google
and on this forum’s search engine, but all I get is something about the Main.h (Part of the engine), Classes named Main and the whole DEFINE_APPLICATION_MAIN thing…
I admit I’m not familiar with the level of Urho’s C++ and the only expiriend I have with using game/graphic engines was with Irrlicht…
I’m using Visual Studio 2012, and I’m aware that I need to change the project Linker/System/SubSystem from Windows to Console in order to work with the main entry point. What I
dont know is how to code a this simple example.
Sorry for my silliness, but this WinConsole thing is new to me… I’m used to program with “main(){}”. Is it too bad to use the old main() style instead of the WinMain and the Urho’s classes
that control this?
What I want to do is something like:
[code]#include <irrlicht.h>
using namespace irr;
int main()
{
IrrlichtDevice *device = createDevice( video::EDT_SOFTWARE, dimension2d<u32>(640, 480), 16, false, false, false, 0);
guienv->addStaticText(L"Hello World!", rect<s32>(10,10,260,22), true);
while(device->run())
{
driver->beginScene(true, true, SColor(255,100,101,140));
smgr->drawAll();
guienv->drawAll();
driver->endScene();
}
device->drop();
return 0;
}[/code]
Kind regards,
Aramis