Page 1 of 1

Run under Win32 API?

Posted: Fri Jan 18, 2008 00:16
by m0ng00se
Can cegui run in a standard Win32 App client window? The animation is only part of my total game and I already have a standard Win GUI with maybe 3000 lines of code behind it that does a lot of string handling and text input/output.

I don't really understand why all these Graphics Engines want to take over the main() function and the parent window. Then they try to re-invent the Win API stuff inside their own engine and that's just crazy because the Win API is huge and Game engines only recreate a fraction of it. It all seems back to front.


Posted: Fri Jan 18, 2008 09:48
by CrazyEddie

I see no reason why CEGUI should not work within a small view port inside a Win32 window. How it might be achieved will depend on which existing renderer you wish to use (D3D or OpenGL) or if you want something else entirely.

For example, the CEGUI Editors we develop use CEGUI for rendering into a viewport within a windowed app - we use wxWidgets to address portability concerns, though the general idea is no different for plain Win32.


Posted: Fri Jan 18, 2008 10:28
by m0ng00se
Well that sounds interesting. I've tested quite a few Graphics Engines for the app I'm building and only Irrlicht and D3DX9 could simply pass the handle of a Win32 child window to the graphics device object and run happy as anything. Unfortunately Irrlicht is crap at 2D and D3DX9 is very complicated though it works fine. I'm just too stupid to understand how to code for it properly.

Dark GDK was the best graphic engine SDK that I tested but it hijacks the main function completely and demands to own the app so you can't get at normal Win API stuff easily, plus it won't compile with default debug libraries that the other 3000 lines of my code needs.

I certainly like the look of the screenshots here on your site. I might download some of your stuff and have a play with it. Thanx for getting back to me.

Posted: Mon Jan 21, 2008 07:22
by CrazyEddie
You realise that CEGUI is not a 'graphics engine' in any way, shape or form? We are just a window / widget library that sits on top of some existing engine (of your choice).

Posted: Mon Jan 21, 2008 07:46
by m0ng00se
Yes I realise that now. I asked a stupid question.

I've since downloaded Ogre and seen the samples using your SDK. Now I'm truly confused. I couldn't get text wrap with a graphics engine so I spent a month building a fancy Win32 App that runs a graphic engine such as Ogre in a child window.

Now I see Ogre running CEGui and I'm thinking I may totally reverse things now and use a graphics window as my main window.

It all depends on your Edit box capabilities and how easily I can use it.

Did you know there is a major DLL issue with your SDK on Ogre with the Ogre debug library/DLLs on VC++ 2008? I can't tell if it's the CEGui DLL or the Ogre debug DLL but one of them causes an exception error at runtime no matter what I tried. I even downloaded all the Ogre source and compiled my own DLLs but nothing worked.

Release libraries work fine. I'm testing your product at the moment on Ogre. Trying to get an Edit Box up and running.