Bug compiling MyGui 3.0 demos

jduran

22-01-2010 23:47:49

Dear all,

I'm a new user to this forum, my name is Joaquim Duran.

I've downloaded MyGui 3.0 source and I've compiled it under Fedora 12 using OpenGL render. The library has been compiled with no problem but when compiling the demos this error appeared:


[ 49%] Building CXX object Demos/Demo_Colour/CMakeFiles/Demo_Colour.dir/DemoKeeper.cpp.o
In file included from /home/qduran/compile/MyGUI3.0/Demos/Demo_Colour/DemoKeeper.h:11,
from /home/qduran/compile/MyGUI3.0/Demos/Demo_Colour/DemoKeeper.cpp:9:
/home/qduran/compile/MyGUI3.0/Demos/Demo_Colour/../../Common/Base/OpenGL/BaseManager.h:70: error: ‘HWND’ has not been declared
/home/qduran/compile/MyGUI3.0/Demos/Demo_Colour/../../Common/Base/OpenGL/BaseManager.h:84: error: ‘HWND’ does not name a type
/home/qduran/compile/MyGUI3.0/Demos/Demo_Colour/../../Common/Base/OpenGL/BaseManager.h:85: error: ‘HDC’ does not name a type
/home/qduran/compile/MyGUI3.0/Demos/Demo_Colour/../../Common/Base/OpenGL/BaseManager.h:86: error: ‘HGLRC’ does not name a type
/home/qduran/compile/MyGUI3.0/Demos/Demo_Colour/../../Common/Base/OpenGL/BaseManager.h:87: error: ‘HINSTANCE’ does not name a type
make[2]: *** [Demos/Demo_Colour/CMakeFiles/Demo_Colour.dir/DemoKeeper.cpp.o] Error 1
make[1]: *** [Demos/Demo_Colour/CMakeFiles/Demo_Colour.dir/all] Error 2
make: *** [all] Error 2


cmake command: cmake -DMYGUI_RENDERSYSTEM=3 .

I would like to know if I could use MyGui to develop rich user interfaces (animations,...) in applications that are not games (as a replacement for Gtk or QT).

Thanks and Best Regards,
Joaquim Duran

Altren

23-01-2010 11:39:30

Well, actually we implemented demos based on OpenGL for windows only right now. Renderer is cross-platform, but base demos code - not.
We had no experience with pure OpenGL apps and found no clear way to make cross-platform OpenGL application.
So if you familiar with OpenGL you can look at Common/Base/OpenGLBaseManager.h and Common/Base/OpenGLBaseManager.cpp and try to make it working under GNU/Linux. Everything else is cross-platform.

jduran

23-01-2010 21:23:44

No, I don't have experience with OpenGL and X11 to port de OpenGL render to Linux. To test myGui I've changed the compilation and I've used Ogre lib. By recompiling the library and demos, the compiler (gcc 4.4.2) have detected an error: Ogre::UTFString stores its data in UTF-16, c_str return a pointer to uint16, meanwhile fstream need the path to file to open in UTF-8 and it needs a pointer to char. I've fixed the problem, compiles fine, but I haven't tested the change.

I've tested some demos, and I see that 3D acceleration is needed, for example Color demo was running at 2 FPS (with the current driver, I only 2d acceleration is available). It's very nice, but I don't feed my needs.

Joaquim Duran

jduran

23-01-2010 21:29:08

Hello,

As it is not possible to attach the diff of the patch I post to the message:


--- Tools/LayoutEditor/CodeGenerator.cpp (revision 2690)
+++ Tools/LayoutEditor/CodeGenerator.cpp (working copy)
@@ -94,7 +94,7 @@
for (StringPairs::iterator iter = mTemplateFiles.begin(); iter != mTemplateFiles.end(); ++iter)
{
std::ifstream input_file(MyGUI::DataManager::getInstance().getDataPath(iter->first).c_str());
- std::ofstream output_file(lm.replaceTags(iter->second).c_str());
+ std::ofstream output_file(lm.replaceTags(iter->second).asUTF8_c_str());
while (!input_file.eof() && !input_file.fail() && !output_file.fail())
{
char str[256];


Joaquim Duran

Altren

23-01-2010 23:08:50

Thx for patch. Applied.