Linux OpenGL platform

eds

02-02-2011 23:20:31

This is something of a continuation of viewtopic.php?f=17&t=13970. I'd like to compile MyGUI with OpenGL on Linux.

Does gdiplus (or gdi for that matter) exist on Linux? The #include "gdiplus.h" line we added to fix MinGW breaks the Linux build:

[ 34%] Building CXX object Common/CMakeFiles/Common.dir/Base/OpenGL/BaseManager.cpp.o
/home/elliott/mygui_build/mygui-svn-4112/Common/Base/OpenGL/BaseManager.cpp:14: fatal error: gdiplus.h: No such file or directory

$ uname -a
Linux 2.6.35.4-x86_64 SMP Mon Sep 20 16:03:34 UTC 2010 x86_64 GNU/Linux
$ gcc --version
gcc (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5

eds

06-02-2011 04:49:25

Slight correction: MyGUI itself builds, but the demos don't. If I turn off MYGUI_BUILD_DEMOS and MYGUI_BUILD_TOOLS, the build finishes without trouble.

Is that a problem? Is MyGUI really usable if I am having trouble building the demos?

Altren

06-02-2011 12:33:34

I'm sorry, that I not responded earlier. OpenGL plaform itself is crossplatform, but BaseManager was written with WinApi and gdiplus as image loader (because developer of OpenGL BaseManager found no easy ways of making it cross-platform). At least I thought so...

How you compiled tools, if code use WinApi?

What you should actually need to do, if you want to use OpenGL and not Ogre platform under Linux, MacOSX and may be other platforms is rewrite some parts of BaseManager in portable way and implement image loader (MyGUI::OpenGLImageLoader interface) with libpng or something.

orcyang

11-03-2011 07:41:53

i want to use MyGUI without Orge on linux, too.So i use SDL and OpenGL

when i try to compile Demo,i found BaseManager->loadimage is using gdiplus

so i try to use libpng or SDL_image to rewrite it. but ... i don't understand what is this function actually doing?

Altren

11-03-2011 09:06:35

This function load image from file, write it's width and heigtht into _width and _height references and return buffer of unsigned char[width*heigth*bytes_per_pixel] with raw image data.