Make OgreGUI a bit more opaque
Moderator: Committer
Make OgreGUI a bit more opaque
Here is a patch that moves some Ogre stuff that was lying around the code base
inside the OgreGUI.
* Listing of available resolutions away from options window
* Ogre initialization away from chmain.cpp
* Moves some signals from OgreGUI to GUI
It is better for ogre specific things to stay inside the ogre specific parts of the code.
(Yes, this is sneaky preparation for the sdl patch, but this really does make sense entirely independently)
One catch however: there is a code path in HumanClientApp::GetWindowWidthHeight
involving a setting "reset-fullscreen-size" that seems to work around something or something,
but I'm not sure what. That function is not used after this patch so whatever the purpose of that is may
no longer be working. I could detect no change in behaviour. Could someone shed some light on its purpose?
inside the OgreGUI.
* Listing of available resolutions away from options window
* Ogre initialization away from chmain.cpp
* Moves some signals from OgreGUI to GUI
It is better for ogre specific things to stay inside the ogre specific parts of the code.
(Yes, this is sneaky preparation for the sdl patch, but this really does make sense entirely independently)
One catch however: there is a code path in HumanClientApp::GetWindowWidthHeight
involving a setting "reset-fullscreen-size" that seems to work around something or something,
but I'm not sure what. That function is not used after this patch so whatever the purpose of that is may
no longer be working. I could detect no change in behaviour. Could someone shed some light on its purpose?
- Attachments
-
[The extension patch has been deactivated and can no longer be displayed.]
Any code by me in this post is released under GPL 2.0 or later.
- adrian_broher
- Programmer
- Posts: 1156
- Joined: Fri Mar 01, 2013 9:52 am
- Location: Germany
Re: Make OgreGUI a bit more opaque
Just a few pointers:
- We don't use NULL, use 0 instead
- The preprocessor directives should be left aligned and not intended.
- I'm not sure if we need the static initialization of Ogre at all.
- We don't use NULL, use 0 instead
- The preprocessor directives should be left aligned and not intended.
- I'm not sure if we need the static initialization of Ogre at all.
Last edited by adrian_broher on Thu Sep 04, 2014 8:35 pm, edited 1 time in total.
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Make OgreGUI a bit more opaque
See commit log: https://sourceforge.net/p/freeorion/code/3837/Mitten.O wrote:..."reset-fullscreen-size" that seems to work around something or something, but I'm not sure what. [...] Could someone shed some light on its purpose?
Also, could you not manually linebreak your posts within paragraphs?
Re: Make OgreGUI a bit more opaque
Ok.- We don't use NULL, use 0 instead
That I actually knew, but failed to notice.- The preprocessor directives should be left aligned and not intended.
Since I don't really know what this is about, I left it in for now.- I'm not sure if we need the static initialization of Ogre at all.
Thanks. Made that work in the patch.See commit log: https://sourceforge.net/p/freeorion/code/3837/
Offtopic:
Ah. I take it it creates problems when viewed such that my lines don't fit on one line? But horrible wide lines like these are a pain to read. I feel my eye attention stretching horribly just writing like this. But I suppose the jagged lines are even more of a pain. And I could just apply a custom CSS style to the board to make it thinner.Also, could you not manually linebreak your posts within paragraphs?
But then there are the other benefits of manual line breaks.
They can be used at times for rhythm, for clarity, for style.
A wonderful tool too often ignored.
Fun should be had with language
at all opportune times.
But here we discuss code and other such matters. Precision and clarity must rule. Conveying discrete information is the main purpose of most posts. Anything that hinders that is a badness. Maybe this is an inopportune time. I'll think about being a bit less enter happy.
- Attachments
-
[The extension patch has been deactivated and can no longer be displayed.]
Any code by me in this post is released under GPL 2.0 or later.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Make OgreGUI a bit more opaque
Request is in general, for prose, not for (selected instances) when you want to write poetic posts. Unless I missed it, that's not always.Mitten.O wrote:But then there are the other benefits of manual line breaks.
They can be used at times for rhythm, for clarity, for style.
A wonderful tool too often ignored.
Fun should be had with language
at all opportune times.
Use a larger font size, or a narrower browser window?...horrible wide lines like these are a pain to read.
Re: Make OgreGUI a bit more opaque
He could go back to using a TRS 80: 80 columns and only all caps...Geoff the Medio wrote:Request is in general, for prose, not for (selected instances) when you want to write poetic posts. Unless I missed it, that's not always.Mitten.O wrote:But then there are the other benefits of manual line breaks.
They can be used at times for rhythm, for clarity, for style.
A wonderful tool too often ignored.
Fun should be had with language
at all opportune times.Use a larger font size, or a narrower browser window?...horrible wide lines like these are a pain to read.
OS: OS X 10.10 Yosemite, XCode 6.01
Also: If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
Also: If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
Re: Make OgreGUI a bit more opaque
Sorry, the previous patch was actually missing some of the style fixes mentioned by adrian.
- Attachments
-
[The extension patch has been deactivated and can no longer be displayed.]
Any code by me in this post is released under GPL 2.0 or later.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Make OgreGUI a bit more opaque
Code: Select all
5>C:\Users\Geoff\Desktop\FreeOrion_VS2010_SDK\FreeOrion\GG\GG/Ogre/Plugins/OISInput.h(31): fatal error C1083: Cannot open include file: 'OIS/OISKeyboard.h': No such file or directory
Same applies for the other plugin pointers added to OgreGUI.
I think these changes go against the design of OgreGUI as outline in the OgreGUI.h comments.
Re: Make OgreGUI a bit more opaque
I believe the actual error message results just from the fact that GiGi ogre CMake files contained no dependency on OIS. The circular dependency is not
between headers.
You do however seem to be right that the lack of a dependency is by design. I made a lighter version that does less clean up, but does not require these larger changes.
between headers.
You do however seem to be right that the lack of a dependency is by design. I made a lighter version that does less clean up, but does not require these larger changes.
- Attachments
-
[The extension patch has been deactivated and can no longer be displayed.]
Any code by me in this post is released under GPL 2.0 or later.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Make OgreGUI a bit more opaque
Seems to build and run OK for me.Mitten.O wrote:I made a lighter version that does less clean up, but does not require these larger changes.