Index: llwindow/llwindow.cpp =================================================================== --- llwindow/llwindow.cpp (revision 829) +++ llwindow/llwindow.cpp (working copy) @@ -34,8 +34,12 @@ #if LL_MESA_HEADLESS #include "llwindowmesaheadless.h" +#elif LL_SDL && LL_GTKGL +#include "llwindowsdl.h" +#include "llwindowgtk.h" #elif LL_SDL #include "llwindowsdl.h" +#elif LL_GTKGL #include "llwindowgtk.h" #elif LL_WINDOWS #include "llwindowwin32.h" @@ -220,11 +224,13 @@ } +#if LL_SDL && LL_GTKGL static bool ll_use_sdl() { const char *value = getenv("LL_USE_SDL"); return value && strcmp(value, "1") == 0; } +#endif S32 OSMessageBox(const std::string& text, const std::string& caption, U32 type) { @@ -244,7 +250,7 @@ result = OSMessageBoxWin32(text, caption, type); #elif LL_DARWIN result = OSMessageBoxMacOSX(text, caption, type); -#elif LL_SDL +#elif LL_SDL && LL_GTKGL if (ll_use_sdl()) { result = OSMessageBoxSDL(text, caption, type); @@ -253,6 +259,10 @@ { result = OSMessageBoxGTK(text, caption, type); } +#elif LL_SDL + result = OSMessageBoxSDL(text, caption, type); +#elif LL_GTKGL + result = OSMessageBoxGTK(text, caption, type); #else #error("OSMessageBox not implemented for this platform!") #endif @@ -328,7 +338,7 @@ return LLWindowWin32::getFontListSans(); #elif LL_DARWIN return LLWindowMacOSX::getFontListSans(); -#elif LL_SDL +#elif LL_SDL && LL_GTKGL if (ll_use_sdl()) { return LLWindowSDL::getFontListSans(); @@ -337,6 +347,10 @@ { return LLWindowGTK::getFontListSans(); } +#elif LL_SDL + return LLWindowSDL::getFontListSans(); +#elif LL_GTKGL + return LLWindowGTK::getFontListSans(); #else return ""; #endif @@ -408,7 +422,7 @@ // static LLSplashScreen *LLSplashScreen::create() { -#if LL_MESA_HEADLESS || LL_SDL // !!! *FIX: (???) +#if LL_MESA_HEADLESS || LL_SDL || LL_GTKGL // !!! *FIX: (???) return 0; #elif LL_WINDOWS return new LLSplashScreenWin32; @@ -499,7 +513,7 @@ new_window = new LLWindowMesaHeadless( title, name, x, y, width, height, flags, fullscreen, clearBg, disable_vsync, use_gl, ignore_pixel_depth); -#elif LL_SDL +#elif LL_SDL && LL_GTKGL if (ll_use_sdl()) { new_window = new LLWindowSDL( @@ -512,6 +526,14 @@ title, x, y, width, height, flags, fullscreen, clearBg, disable_vsync, use_gl, ignore_pixel_depth, fsaa_samples); } +#elif LL_SDL + new_window = new LLWindowSDL( + title, x, y, width, height, flags, + fullscreen, clearBg, disable_vsync, use_gl, ignore_pixel_depth, fsaa_samples); +#elif LL_GTKGL + new_window = new LLWindowGTK( + title, x, y, width, height, flags, + fullscreen, clearBg, disable_vsync, use_gl, ignore_pixel_depth, fsaa_samples); #elif LL_WINDOWS new_window = new LLWindowWin32( title, name, x, y, width, height, flags, Index: llwindow/llkeyboardgtk.cpp =================================================================== --- llwindow/llkeyboardgtk.cpp (revision 829) +++ llwindow/llkeyboardgtk.cpp (working copy) @@ -29,6 +29,8 @@ * $/LicenseInfo$ */ +#if LL_GTKGL + #include "linden_common.h" #include "llkeyboardgtk.h" #include "llwindowgtk.h" @@ -379,3 +381,5 @@ } return inverseTranslateKey(translated_key); } + +#endif // LL_GTKGL Index: llwindow/llwindowgtk.cpp =================================================================== --- llwindow/llwindowgtk.cpp (revision 829) +++ llwindow/llwindowgtk.cpp (working copy) @@ -29,6 +29,8 @@ * $/LicenseInfo$ */ +#ifdef LL_GTKGL + #include "linden_common.h" #include "llwindowgtk.h" @@ -48,6 +50,8 @@ #include "gtk/gtk.h" #include "gtk/gtkgl.h" +#if LL_X11 + #if LL_XRANDR #include "gdk/gdkx.h" #include @@ -67,6 +71,8 @@ #endif #endif +#endif + #include extern "C" { # include "fontconfig/fontconfig.h" @@ -3221,3 +3227,5 @@ return rtn + final_fallback; } + +#endif // LL_GTKGL Index: cmake/LLWindow.cmake =================================================================== --- cmake/LLWindow.cmake (revision 829) +++ cmake/LLWindow.cmake (working copy) @@ -23,7 +23,9 @@ endif (STANDALONE) if (SDL_FOUND) - add_definitions(-DLL_SDL=1) + add_definitions(-DLL_SDL=1 -DLL_GTKGL=1) +# add_definitions(-DLL_SDL=1) +# add_definitions(-DLL_GTKGL=1) include_directories(${SDL_INCLUDE_DIR}) endif (SDL_FOUND)