First time: CEGUI 0.7.5 w/ MSVC++ 2010

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

dredogol
Not too shy to talk
Not too shy to talk
Posts: 41
Joined: Sat Apr 18, 2009 20:43

First time: CEGUI 0.7.5 w/ MSVC++ 2010

Postby dredogol » Tue May 24, 2011 05:56

Things have changed a ton since I lasted used CEGUI years ago...

I'm making a quick test Win32-API using CEGUI 0.7.5 with MSVC++ 2010 Express.
I DLed the CEGUI-SDK-v0.7.5-vc10 binary version.

Questions are the following:
1) When I execute my final compiled [release] (exe), which DLLs can I REMOVE from the ReleaseWithSymbols folder?
I know I need the CEGUIBase, Falagard, D3D, and OpenGL ones...

2) Is the dependencies folder required?

3) Are there any special Linker Input libraries (not "Additional Libraries") I need to add in my project config section?

4) Are there any other special settings I need to change in my project config area... other than adding obvious Include/Lib files?

5) Do I need the (pdb) debug files for the project to compile in debug mode (huge MB hog)?

6) Is there any Sample Code for a Win32-API example?
I was just wondering which section I need to add the instance, system, and other calls at.
I see an Ogre example... but I'll be doing that later.

7) Since it's a Win32-API ... Do I use the OpenGL or Direct3D bootstrap?
I'm not entirely sure which setting the Win32-API defaults to...

Thanks.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: First time: CEGUI 0.7.5 w/ MSVC++ 2010

Postby CrazyEddie » Tue May 24, 2011 08:06

1) Typically you can remove everything except CEGUIBase.dll, CEGUIFalagardWRBase.dll, the DLL(s) for whatever renderer(s) you linked to, one of the XMLParser DLLs, and usually one of the ImageCodec DLLs. (EDIT: To clarify with regards to XMLParser and ImageCodec modules: "one of" is not intended to mean 'pick one at random', usually you will use the compiled in default option - which is by default Expat for XML and SILLY for ImageCodec - this compiled in choice can be overridden at runtime, however).

2) After building your app, you may require some DLLs out of dependencies/bin in order that whichever optional things you intend to use are available - typically this would be some DLL related to an image loading library.

3) I don't understand. I do not use the Visual C++ IDE.

4) The only thing you want to ensure is that everything is using the same C/C++ runtime setting. For dynamic linking, the default /MD and /MDd options are fine and what you need.

5) You do not need these for running your app in debug mode, though you will need them if you want support for issues involving the need to post callstacks.

6) I guess not. The CEGUISampleHelper does contain Win32 code, but it's tailored for setting up the base stuff for CEGUI samples rather than being a simple example. This said, really everything is platform independent, I do not think there's anything all that special you have to do solely on the Win32 platform (though I guess you may need usual message pump running - depending on what you intend using for input). It's basically a case of initialising whichever rendering system you intend to use (not in the CEGUI sense, but in the sense of your app), and then calling the appropriate function(s) to initialise CEGUI.

7) You use whichever renderer your app will be based on. If your app is GL based, then use CEGUI::OpenGLRenderer::bootstrapSystem. If the app is D3D9 based, use CEGUI::Direct3D9Renderer::bootstrapSystem or what have you. Note: do not fall into the rookie mistake of then also calling CEGUI::System::create - if you use the bootstrap functions, you get all the initial objects created for you - you then just need to set up resources and what have you (there are (imperfect) tutorials in the main docs).

CE.
Last edited by CrazyEddie on Tue May 24, 2011 08:55, edited 1 time in total.
Reason: Needed to clarify something.

dredogol
Not too shy to talk
Not too shy to talk
Posts: 41
Joined: Sat Apr 18, 2009 20:43

Re: First time: CEGUI 0.7.5 w/ MSVC++ 2010

Postby dredogol » Tue May 24, 2011 15:57

I'm currently working on my sample project now.

Based on the sample codes, it seems you're using the regular MAIN()... so that means you need to create the projects with Win32-CONSOLE, and not the Win32-API setting when creating a project.

Difference is:
Win32-CONSOLE = regular ... int main();
Win32-API = windows ... int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow);

Just thought I should throw that in there for others to know... just in case.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: First time: CEGUI 0.7.5 w/ MSVC++ 2010

Postby CrazyEddie » Wed May 25, 2011 06:09

Aside from if you're copying the sample code for reuse, you should not have to create projects for them manually, I think within the SDKs there should exist a ready made solution for the samples - unless a mistake was made when packaging those :)

It's a shame that Windows chooses to differentiate between a 'console' and 'windowed' application and be non-standard by using a differently named entry point for the latter. For the samples I just went with 'main' as defined in the language standard and chose not to clutter the source with pre-processor conditionals to accommodate 'WinMain'.

CE.

dredogol
Not too shy to talk
Not too shy to talk
Posts: 41
Joined: Sat Apr 18, 2009 20:43

Re: First time: CEGUI 0.7.5 w/ MSVC++ 2010

Postby dredogol » Thu May 26, 2011 03:44

After reading through all the BaseApplication files, I had a quick question:

In the BaseApp file... there's the initilizeResourceGroupDirectories() and initializeDefaultResourceGroups().
Do these 2 functions need to be called every time a new CEGUI object is created, or just once in the main app program?
Since I'm finding it in the all the RenderType_BaseApps (inherited from BaseApp), I'm assuming it's only a 1 time thing (which makes perfect sense), but I just wanted to double check.

A few more Q might pop up after I try to build the program.

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: First time: CEGUI 0.7.5 w/ MSVC++ 2010

Postby Kulik » Thu May 26, 2011 09:11

Yeah you only call this one time. When you are curious about a single function/method, refer to the API reference.

It contains explanations of most of the methods, some are more helpful than others of course. If you find something underdocumented, change the doxygen strings and make a patch/pull request.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 29 guests