Blob Blame History Raw
# HG changeset patch
# User Lukas Meindl <bitbucket@lukasmeindl.at>
# Date 1404757487 -7200
# Branch v0-8
# Node ID 2e42d608efa1072bb99e49cede63eb0183a9f983
# Parent  0b8b73e19148513b67dc14d16d6088686fcb0135
MOD: Remove SampleBrowser error even if a chosen Renderer's dependency ismissing
In that case the Renderer and related functionality are just
not added to the SampleBrowser

diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -194,40 +194,54 @@
     if (NOT Boost_VERSION LESS 105000 AND "${OGRE_THREAD_PROVIDER}" STREQUAL "1") #Check additionally if we use boost as thread provider at all
         if (Boost_SYSTEM_FOUND)
             set (CEGUI_OGRE_SAMPLES_EXTRALIBS ${Boost_SYSTEM_LIBRARY})
-            set (CEGUI_OGRE_SAMPLES_AVAILABLE TRUE)
+            set (CEGUI_OGRE_DEPS_AVAILABLE TRUE)
         else()
             set (CEGUI_OGRE_SAMPLES_EXTRALIBS)
-            set (CEGUI_OGRE_SAMPLES_AVAILABLE FALSE)
+            set (CEGUI_OGRE_DEPS_AVAILABLE FALSE)
         endif()
     else()
         set (CEGUI_OGRE_SAMPLES_EXTRALIBS)
-        set (CEGUI_OGRE_SAMPLES_AVAILABLE TRUE)
+        set (CEGUI_OGRE_DEPS_AVAILABLE TRUE)
+    endif()
+endif()
+
+# Activates Renderers in the SampleBrowser. By default all the Renderers that are built are activated. Some of them might require extra dependencies to run in the SampleBrowser and thus will be disabled if the deps are not given
+if(CEGUI_BUILD_RENDERER_OPENGL OR CEGUI_BUILD_RENDERER_OPENGL3)
+    set (CEGUI_SAMPLES_RENDERER_OPENGL_ACTIVE TRUE)
+else()
+    set (CEGUI_SAMPLES_RENDERER_OPENGL_ACTIVE FALSE)
+endif()
+set (CEGUI_SAMPLES_RENDERER_OGRE_ACTIVE ${CEGUI_BUILD_RENDERER_OGRE})
+set (CEGUI_SAMPLES_RENDERER_IRRLICHT_ACTIVE ${CEGUI_BUILD_RENDERER_IRRLICHT})
+set (CEGUI_SAMPLES_RENDERER_DIRECT3D9_ACTIVE ${CEGUI_BUILD_RENDERER_DIRECT3D9})
+set (CEGUI_SAMPLES_RENDERER_DIRECT3D10_ACTIVE ${CEGUI_BUILD_RENDERER_DIRECT3D10})
+set (CEGUI_SAMPLES_RENDERER_DIRECT3D11_ACTIVE ${CEGUI_BUILD_RENDERER_DIRECT3D11})
+set (CEGUI_SAMPLES_RENDERER_DIRECTFB_ACTIVE ${CEGUI_BUILD_RENDERER_DIRECTFB})
+
+# Ogre and OpenGL have dependencies for the sample browser, if these are not available then the SampleBrowser won't support the respective Renderers and the option to choose them won't show up
+if (CEGUI_BUILD_RENDERER_OGRE AND NOT CEGUI_OGRE_DEPS_AVAILABLE)
+    if (NOT OIS_FOUND)
+        message(STATUS "Info: The OgreRenderer is disabled in the SampleBrowser because of missing dependencies (OIS not found). Please add the dependencies and run 'Configure' in CMake again, in case you want to run the SampleBrowser using OgreRenderer.")
+    else()
+        message(STATUS "Info: The OgreRenderer is disabled in the SampleBrowser because of missing dependencies (boost libraries). Please add the dependencies and run 'Configure' in CMake again, in case you want to run the SampleBrowser using OgreRenderer.")
+    endif()
+    set (CEGUI_SAMPLES_RENDERER_OGRE_ACTIVE FALSE)
+endif()
+
+if (CEGUI_SAMPLES_RENDERER_OPENGL_ACTIVE)
+    if(NOT GLFW_FOUND)
+        set (CEGUI_SAMPLES_RENDERER_OPENGL_ACTIVE FALSE)
+        message(STATUS "Info: The OpenGL- and/or OpenGL3 Renderers are disabled in the SampleBrowser because of missing dependencies (GLFW library).  Please add the GFLW dependency and run 'Configure' in CMake again, in case you want to run the SampleBrowser using the OpenGL or OpenGL3 Renderers.")
     endif()
 endif()
 
 # If we use a Renderer then our samples should be ON by default
-if (CEGUI_BUILD_RENDERER_OPENGL OR CEGUI_BUILD_RENDERER_OPENGL3 OR CEGUI_BUILD_RENDERER_OGRE OR CEGUI_BUILD_RENDERER_IRRLICHT OR CEGUI_BUILD_RENDERER_DIRECT3D9 OR CEGUI_BUILD_RENDERER_DIRECT3D10 OR CEGUI_BUILD_RENDERER_DIRECT3D11 OR CEGUI_BUILD_RENDERER_DIRECTFB)
+if (CEGUI_SAMPLES_RENDERER_OPENGL_ACTIVE OR CEGUI_SAMPLES_RENDERER_OGRE_ACTIVE OR CEGUI_SAMPLES_RENDERER_IRRLICHT_ACTIVE OR CEGUI_SAMPLES_RENDERER_DIRECT3D9_ACTIVE OR CEGUI_SAMPLES_RENDERER_DIRECT3D10_ACTIVE OR CEGUI_SAMPLES_RENDERER_DIRECT3D11_ACTIVE OR CEGUI_SAMPLES_RENDERER_DIRECTFB_ACTIVE)
     set (_CEGUI_SAMPLES_ENABLED_DEFAULT TRUE)
 else()
     set (_CEGUI_SAMPLES_ENABLED_DEFAULT FALSE)
 endif()
 
-# Ogre and OpenGL have dependencies for the sample browser, if these are not available then the samples will be OFF by default   
-if (CEGUI_BUILD_RENDERER_OGRE AND NOT CEGUI_OGRE_SAMPLES_AVAILABLE)
-    set (_CEGUI_SAMPLES_ENABLED_DEFAULT FALSE)
-    if (NOT OIS_FOUND)
-        message(STATUS "The SampleFramework is deactivated due to missing Ogre dependencies (OIS not found)")
-    else()
-        message(STATUS "The SampleFramework is deactivated due to missing Ogre dependencies (boost libraries)")
-    endif()
-endif()
-if (CEGUI_BUILD_RENDERER_OPENGL OR CEGUI_BUILD_RENDERER_OPENGL3)
-    if(NOT GLFW_FOUND)
-        set (_CEGUI_SAMPLES_ENABLED_DEFAULT FALSE)
-        message(STATUS "The SampleFramework is deactivated due to missing OpenGL dependencies (GLFW library)")
-    endif()
-endif()
-
 # We set the Samples to the default value
 option( CEGUI_SAMPLES_ENABLED "Specifies whether to build the CEGUI sample applications" ${_CEGUI_SAMPLES_ENABLED_DEFAULT} )
 
diff --git a/cegui/include/CEGUI/ModuleConfig.h.in b/cegui/include/CEGUI/ModuleConfig.h.in
--- a/cegui/include/CEGUI/ModuleConfig.h.in
+++ b/cegui/include/CEGUI/ModuleConfig.h.in
@@ -42,15 +42,15 @@
 // not actually include them in the final distribution (or some other
 // event that we do not have control over)
 //////////////////////////////////////////////////////////////////////////
+#cmakedefine CEGUI_BUILD_RENDERER_NULL
 #cmakedefine CEGUI_BUILD_RENDERER_OPENGL
 #cmakedefine CEGUI_BUILD_RENDERER_OPENGL3
 #cmakedefine CEGUI_BUILD_RENDERER_OGRE
 #cmakedefine CEGUI_BUILD_RENDERER_IRRLICHT
-#cmakedefine CEGUI_BUILD_RENDERER_DIRECTFB
 #cmakedefine CEGUI_BUILD_RENDERER_DIRECT3D9
 #cmakedefine CEGUI_BUILD_RENDERER_DIRECT3D10
 #cmakedefine CEGUI_BUILD_RENDERER_DIRECT3D11
-#cmakedefine CEGUI_BUILD_RENDERER_NULL
+#cmakedefine CEGUI_BUILD_RENDERER_DIRECTFB
 #cmakedefine CEGUI_BUILD_RENDERER_OPENGLES
 
 //////////////////////////////////////////////////////////////////////////
diff --git a/samples/common/include/CEGUISamplesConfig.h.in b/samples/common/include/CEGUISamplesConfig.h.in
--- a/samples/common/include/CEGUISamplesConfig.h.in
+++ b/samples/common/include/CEGUISamplesConfig.h.in
@@ -53,13 +53,21 @@
 //////////////////////////////////////////////////////////////////////////
 #cmakedefine CEGUI_BUILD_RENDERER_OPENGL
 #cmakedefine CEGUI_BUILD_RENDERER_OPENGL3
+#cmakedefine CEGUI_BUILD_RENDERER_OGRE
+#cmakedefine CEGUI_BUILD_RENDERER_IRRLICHT
 #cmakedefine CEGUI_BUILD_RENDERER_DIRECT3D9
 #cmakedefine CEGUI_BUILD_RENDERER_DIRECT3D10
 #cmakedefine CEGUI_BUILD_RENDERER_DIRECT3D11
-#cmakedefine CEGUI_BUILD_RENDERER_OGRE
-#cmakedefine CEGUI_BUILD_RENDERER_IRRLICHT
 #cmakedefine CEGUI_BUILD_RENDERER_DIRECTFB
 #cmakedefine CEGUI_SAMPLES_USE_GTK2
 
+#cmakedefine CEGUI_SAMPLES_RENDERER_OPENGL_ACTIVE
+#cmakedefine CEGUI_SAMPLES_RENDERER_OGRE_ACTIVE
+#cmakedefine CEGUI_SAMPLES_RENDERER_IRRLICHT_ACTIVE
+#cmakedefine CEGUI_SAMPLES_RENDERER_DIRECT3D9_ACTIVE
+#cmakedefine CEGUI_SAMPLES_RENDERER_DIRECT3D10_ACTIVE
+#cmakedefine CEGUI_SAMPLES_RENDERER_DIRECT3D11_ACTIVE
+#cmakedefine CEGUI_SAMPLES_RENDERER_DIRECTFB_ACTIVE
+
 #endif  // end of guard _CEGUISamplesConfig_h_
 
diff --git a/samples_framework/CMakeLists.txt b/samples_framework/CMakeLists.txt
--- a/samples_framework/CMakeLists.txt
+++ b/samples_framework/CMakeLists.txt
@@ -1,15 +1,3 @@
-# We check if the required dependencies are available for the sample framework
-
-if(CEGUI_BUILD_RENDERER_OGRE AND NOT CEGUI_OGRE_SAMPLES_AVAILABLE)
-    message(SEND_ERROR "The Samples and the OgreRenderer are enabled, but Ogre dependencies are missing (boost). Please add the dependencies and run 'Configure' in CMake again.")
-endif()
-if(CEGUI_BUILD_RENDERER_OPENGL OR CEGUI_BUILD_RENDERER_OPENGL3)
-    if(NOT GLFW_FOUND)
-        message(SEND_ERROR "The Samples and the OpenGL or OpenGL3+ Renderer are enabled - GLFW is required for this configuration but was not found. Please add GFLW to your dependencies and run 'Configure' in CMake again.")
-    endif()
-endif()
-
-
 set( CEGUI_TARGET_NAME ${CEGUI_SAMPLEFRAMEWORK_EXENAME} )
 
 set( CORE_SOURCE_FILES
@@ -61,25 +49,27 @@
 endif()
 
 
-if (CEGUI_BUILD_RENDERER_OPENGL OR CEGUI_BUILD_RENDERER_OPENGL3)
+if (CEGUI_SAMPLES_RENDERER_OPENGL_ACTIVE)
+    # Append OpenGL and OpenGL3 files
     list (APPEND CORE_SOURCE_FILES
         ./src/CEGuiGLFWSharedBase.cpp
     )
+
+    if (CEGUI_BUILD_RENDERER_OPENGL)
+        list (APPEND CORE_SOURCE_FILES
+            ./src/CEGuiOpenGLBaseApplication.cpp
+        )
+    endif()
+
+    if (CEGUI_BUILD_RENDERER_OPENGL3)
+        list (APPEND CORE_SOURCE_FILES
+            ./src/CEGuiOpenGL3BaseApplication.cpp
+        )
+    endif()
+
 endif()
 
-if (CEGUI_BUILD_RENDERER_OPENGL)
-    list (APPEND CORE_SOURCE_FILES
-        ./src/CEGuiOpenGLBaseApplication.cpp
-    )
-endif()
-
-if (CEGUI_BUILD_RENDERER_OPENGL3)
-    list (APPEND CORE_SOURCE_FILES
-        ./src/CEGuiOpenGL3BaseApplication.cpp
-    )
-endif()
-
-if (CEGUI_OGRE_SAMPLES_AVAILABLE)
+if (CEGUI_SAMPLES_RENDERER_OGRE_ACTIVE)
     # this prevents the boost auto-link dis-feature
     add_definitions(-DBOOST_ALL_NO_LIB)
 
@@ -88,40 +78,40 @@
     )
 endif()
 
-if (CEGUI_BUILD_RENDERER_IRRLICHT)
+if (CEGUI_SAMPLES_RENDERER_IRRLICHT_ACTIVE)
     list (APPEND CORE_SOURCE_FILES
         ./src/CEGuiIrrlichtBaseApplication.cpp
     )
 endif()
 
-if (CEGUI_BUILD_RENDERER_DIRECT3D9)
+if (CEGUI_SAMPLES_RENDERER_DIRECT3D9_ACTIVE)
     list (APPEND CORE_SOURCE_FILES
         ./src/CEGuiD3D9BaseApplication.cpp
         ./src/DeviceReset_Direct3D9.cpp
     )
 endif()
 
-if (CEGUI_BUILD_RENDERER_DIRECT3D10)
+if (CEGUI_SAMPLES_RENDERER_DIRECT3D10_ACTIVE)
     list (APPEND CORE_SOURCE_FILES
         ./src/CEGuiD3D10BaseApplication.cpp
         ./src/DeviceReset_Direct3D10.cpp
     )
 endif()
 
-if (CEGUI_BUILD_RENDERER_DIRECT3D11)
+if (CEGUI_SAMPLES_RENDERER_DIRECT3D11_ACTIVE)
     list (APPEND CORE_SOURCE_FILES
         ./src/CEGuiD3D11BaseApplication.cpp
         ./src/DeviceReset_Direct3D11.cpp
     )
 endif()
 
-if (CEGUI_BUILD_RENDERER_DIRECTFB)
+if (CEGUI_SAMPLES_RENDERER_DIRECTFB_ACTIVE)
     list (APPEND CORE_SOURCE_FILES
         ./src/CEGuiDirectFBBaseApplication.cpp
     )
 endif()
 
-if (CEGUI_BUILD_RENDERER_DIRECT3D9 OR CEGUI_BUILD_RENDERER_DIRECT3D10 OR CEGUI_BUILD_RENDERER_DIRECT3D11)
+if (CEGUI_SAMPLES_RENDERER_DIRECT3D9_ACTIVE OR CEGUI_SAMPLES_RENDERER_DIRECT3D10_ACTIVE OR CEGUI_SAMPLES_RENDERER_DIRECT3D11_ACTIVE)
     include_directories(${DIRECTXSDK_INCLUDE_DIR})
     link_directories(${DIRECTXSDK_LIBRARY_DIR})
 endif()
@@ -241,41 +231,41 @@
 )
 endif()
 
-if (CEGUI_BUILD_RENDERER_OPENGL OR CEGUI_BUILD_RENDERER_OPENGL3)
+if (CEGUI_SAMPLES_RENDERER_OPENGL_ACTIVE)
     cegui_add_dependency(${CEGUI_TARGET_NAME} OPENGL)
     cegui_add_dependency(${CEGUI_TARGET_NAME} GLFW)
     cegui_target_link_libraries(${CEGUI_TARGET_NAME} ${CEGUI_OPENGL_RENDERER_LIBNAME})
 endif()
 
-if (CEGUI_BUILD_RENDERER_OGRE)
+if (CEGUI_SAMPLES_RENDERER_OGRE_ACTIVE)
     cegui_add_dependency(${CEGUI_TARGET_NAME} OGRE)
     cegui_add_dependency(${CEGUI_TARGET_NAME} OIS)
     cegui_target_link_libraries(${CEGUI_TARGET_NAME} ${CEGUI_OGRE_RENDERER_LIBNAME} ${CEGUI_OGRE_SAMPLES_EXTRALIBS})
 endif()
 
-if (CEGUI_BUILD_RENDERER_IRRLICHT)
+if (CEGUI_SAMPLES_RENDERER_IRRLICHT_ACTIVE)
     cegui_add_dependency(${CEGUI_TARGET_NAME} IRRLICHT)
     cegui_target_link_libraries(${CEGUI_TARGET_NAME} ${CEGUI_IRRLICHT_RENDERER_LIBNAME})
 endif()
 
-if (CEGUI_BUILD_RENDERER_DIRECT3D9 OR CEGUI_BUILD_RENDERER_DIRECT3D10 OR CEGUI_BUILD_RENDERER_DIRECT3D11)
+if (CEGUI_SAMPLES_RENDERER_DIRECT3D9_ACTIVE OR CEGUI_SAMPLES_RENDERER_DIRECT3D10_ACTIVE OR CEGUI_SAMPLES_RENDERER_DIRECT3D11_ACTIVE)
     cegui_target_link_libraries(${CEGUI_TARGET_NAME} dxerr)
 
-    if (CEGUI_BUILD_RENDERER_DIRECT3D9)
+    if (CEGUI_SAMPLES_RENDERER_DIRECT3D9_ACTIVE)
         cegui_target_link_libraries(${CEGUI_TARGET_NAME} ${CEGUI_DIRECT3D9_RENDERER_LIBNAME} d3d9)
     endif()
 
-    if (CEGUI_BUILD_RENDERER_DIRECT3D10)
+    if (CEGUI_SAMPLES_RENDERER_DIRECT3D10_ACTIVE)
         cegui_target_link_libraries(${CEGUI_TARGET_NAME} ${CEGUI_DIRECT3D10_RENDERER_LIBNAME} d3d10)
     endif()
 
-    if (CEGUI_BUILD_RENDERER_DIRECT3D11)
+    if (CEGUI_SAMPLES_RENDERER_DIRECT3D11_ACTIVE)
         cegui_target_link_libraries(${CEGUI_TARGET_NAME} ${CEGUI_DIRECT3D11_RENDERER_LIBNAME} d3d11)
     endif()
 
 endif()
 
-if (CEGUI_BUILD_RENDERER_DIRECTFB)
+if (CEGUI_SAMPLES_RENDERER_DIRECTFB_ACTIVE)
     cegui_add_dependency(${CEGUI_TARGET_NAME} DIRECTFB)
     cegui_target_link_libraries(${CEGUI_TARGET_NAME} ${CEGUI_DIRECTFB_RENDERER_LIBNAME})
 endif()
@@ -287,7 +277,7 @@
 if (APPLE)
     set (CEGUI_EXTRA_FRAMEWORKS "-framework Cocoa")
 
-    if (CEGUI_BUILD_RENDERER_OGRE)
+    if (CEGUI_SAMPLES_RENDERER_OGRE_ACTIVE)
         set (CEGUI_EXTRA_FRAMEWORKS "${CEGUI_EXTRA_FRAMEWORKS} -framework IOKit -framework Carbon")
     endif()
 
diff --git a/samples_framework/src/CEGuiD3D10BaseApplication.cpp b/samples_framework/src/CEGuiD3D10BaseApplication.cpp
--- a/samples_framework/src/CEGuiD3D10BaseApplication.cpp
+++ b/samples_framework/src/CEGuiD3D10BaseApplication.cpp
@@ -26,7 +26,7 @@
  ***************************************************************************/
 #include "CEGUISamplesConfig.h"
 
-#ifdef CEGUI_BUILD_RENDERER_DIRECT3D10
+#ifdef CEGUI_SAMPLES_RENDERER_DIRECT3D10_ACTIVE
 
 #include "CEGuiD3D10BaseApplication.h"
 #include "CEGUI/RendererModules/Direct3D10/Renderer.h"
diff --git a/samples_framework/src/CEGuiD3D11BaseApplication.cpp b/samples_framework/src/CEGuiD3D11BaseApplication.cpp
--- a/samples_framework/src/CEGuiD3D11BaseApplication.cpp
+++ b/samples_framework/src/CEGuiD3D11BaseApplication.cpp
@@ -26,7 +26,7 @@
  ***************************************************************************/
 #include "CEGUISamplesConfig.h"
 
-#ifdef CEGUI_BUILD_RENDERER_DIRECT3D11
+#ifdef CEGUI_SAMPLES_RENDERER_DIRECT3D11_ACTIVE
 
 #include "CEGuiD3D11BaseApplication.h"
 #include "CEGUI/RendererModules/Direct3D11/Renderer.h"
diff --git a/samples_framework/src/CEGuiD3D9BaseApplication.cpp b/samples_framework/src/CEGuiD3D9BaseApplication.cpp
--- a/samples_framework/src/CEGuiD3D9BaseApplication.cpp
+++ b/samples_framework/src/CEGuiD3D9BaseApplication.cpp
@@ -26,7 +26,7 @@
  ***************************************************************************/
 #include "CEGUISamplesConfig.h"
 
-#ifdef CEGUI_BUILD_RENDERER_DIRECT3D9
+#ifdef CEGUI_SAMPLES_RENDERER_DIRECT3D9_ACTIVE
 
 #include "CEGuiD3D9BaseApplication.h"
 
diff --git a/samples_framework/src/CEGuiDirectFBBaseApplication.cpp b/samples_framework/src/CEGuiDirectFBBaseApplication.cpp
--- a/samples_framework/src/CEGuiDirectFBBaseApplication.cpp
+++ b/samples_framework/src/CEGuiDirectFBBaseApplication.cpp
@@ -29,7 +29,7 @@
 #endif
 
 #include "CEGUISamplesConfig.h"
-#ifdef CEGUI_BUILD_RENDERER_DIRECTFB
+#ifdef CEGUI_SAMPLES_RENDERER_DIRECTFB_ACTIVE
 
 #include "CEGuiDirectFBBaseApplication.h"
 #include "CEGUI/RendererModules/DirectFB/Renderer.h"
diff --git a/samples_framework/src/CEGuiIrrlichtBaseApplication.cpp b/samples_framework/src/CEGuiIrrlichtBaseApplication.cpp
--- a/samples_framework/src/CEGuiIrrlichtBaseApplication.cpp
+++ b/samples_framework/src/CEGuiIrrlichtBaseApplication.cpp
@@ -34,7 +34,7 @@
 
 // this controls conditional compile of file for Apple
 #include "CEGUISamplesConfig.h"
-#ifdef CEGUI_BUILD_RENDERER_IRRLICHT
+#ifdef CEGUI_SAMPLES_RENDERER_IRRLICHT_ACTIVE
 
 #include "CEGuiIrrlichtBaseApplication.h"
 #include "SamplesFrameworkBase.h"
diff --git a/samples_framework/src/CEGuiOgreBaseApplication.cpp b/samples_framework/src/CEGuiOgreBaseApplication.cpp
--- a/samples_framework/src/CEGuiOgreBaseApplication.cpp
+++ b/samples_framework/src/CEGuiOgreBaseApplication.cpp
@@ -34,7 +34,7 @@
 
 // this controls conditional compile of file for Apple
 #include "CEGUISamplesConfig.h"
-#ifdef CEGUI_BUILD_RENDERER_OGRE
+#ifdef CEGUI_SAMPLES_RENDERER_OGRE_ACTIVE
 
 #include <OgreWindowEventUtilities.h>
 #include "CEGuiOgreBaseApplication.h"
diff --git a/samples_framework/src/DeviceReset_Direct3D10.cpp b/samples_framework/src/DeviceReset_Direct3D10.cpp
--- a/samples_framework/src/DeviceReset_Direct3D10.cpp
+++ b/samples_framework/src/DeviceReset_Direct3D10.cpp
@@ -26,7 +26,7 @@
  ***************************************************************************/
 #include "CEGUISamplesConfig.h"
 
-#ifdef CEGUI_BUILD_RENDERER_DIRECT3D10
+#ifdef CEGUI_SAMPLES_RENDERER_DIRECT3D10_ACTIVE
 
 #include "CEGUI/CEGUI.h"
 #include "CEGUI/RendererModules/Direct3D10/Renderer.h"
diff --git a/samples_framework/src/DeviceReset_Direct3D11.cpp b/samples_framework/src/DeviceReset_Direct3D11.cpp
--- a/samples_framework/src/DeviceReset_Direct3D11.cpp
+++ b/samples_framework/src/DeviceReset_Direct3D11.cpp
@@ -26,7 +26,7 @@
  ***************************************************************************/
 #include "CEGUISamplesConfig.h"
 
-#ifdef CEGUI_BUILD_RENDERER_DIRECT3D11
+#ifdef CEGUI_SAMPLES_RENDERER_DIRECT3D11_ACTIVE
 
 #include "CEGUI/CEGUI.h"
 #include "CEGUI/RendererModules/Direct3D11/Renderer.h"
diff --git a/samples_framework/src/DeviceReset_Direct3D9.cpp b/samples_framework/src/DeviceReset_Direct3D9.cpp
--- a/samples_framework/src/DeviceReset_Direct3D9.cpp
+++ b/samples_framework/src/DeviceReset_Direct3D9.cpp
@@ -26,7 +26,7 @@
  ***************************************************************************/
 #include "CEGUISamplesConfig.h"
 
-#ifdef CEGUI_BUILD_RENDERER_DIRECT3D9
+#ifdef CEGUI_SAMPLES_RENDERER_DIRECT3D9_ACTIVE
 
 #include "CEGUI/CEGUI.h"
 #include "CEGUI/RendererModules/Direct3D9/Renderer.h"
diff --git a/samples_framework/src/SamplesFrameworkBase.cpp b/samples_framework/src/SamplesFrameworkBase.cpp
--- a/samples_framework/src/SamplesFrameworkBase.cpp
+++ b/samples_framework/src/SamplesFrameworkBase.cpp
@@ -45,29 +45,31 @@
 #endif
 
 // includes for application types
-#ifdef CEGUI_BUILD_RENDERER_OGRE
+#ifdef CEGUI_SAMPLES_RENDERER_OGRE_ACTIVE
 #   include "CEGuiOgreBaseApplication.h"
 #endif
-#ifdef CEGUI_BUILD_RENDERER_OPENGL
-#   include "CEGuiOpenGLBaseApplication.h"
+#ifdef CEGUI_SAMPLES_RENDERER_OPENGL_ACTIVE
+#   ifdef CEGUI_BUILD_RENDERER_OPENGL
+#      include "CEGuiOpenGLBaseApplication.h"
+#   endif
+#   ifdef CEGUI_BUILD_RENDERER_OPENGL3
+#      include "CEGuiOpenGL3BaseApplication.h"
+#   endif
 #endif
-#ifdef CEGUI_BUILD_RENDERER_OPENGL3
-#   include "CEGuiOpenGL3BaseApplication.h"
-#endif
-#ifdef CEGUI_BUILD_RENDERER_IRRLICHT
+#ifdef CEGUI_SAMPLES_RENDERER_IRRLICHT_ACTIVE
 #   include "CEGuiIrrlichtBaseApplication.h"
 #endif
-#ifdef CEGUI_BUILD_RENDERER_DIRECTFB
+#ifdef CEGUI_SAMPLES_RENDERER_DIRECTFB_ACTIVE
 #   include "CEGuiDirectFBBaseApplication.h"
 #endif
 #if defined( __WIN32__ ) || defined( _WIN32 )
-#   ifdef CEGUI_BUILD_RENDERER_DIRECT3D9
+#   ifdef CEGUI_SAMPLES_RENDERER_DIRECT3D9_ACTIVE
 #       include "CEGuiD3D9BaseApplication.h"
 #   endif
-#   ifdef CEGUI_BUILD_RENDERER_DIRECT3D10
+#   ifdef CEGUI_SAMPLES_RENDERER_DIRECT3D10_ACTIVE
 #       include "CEGuiD3D10BaseApplication.h"
 #   endif
-#   ifdef CEGUI_BUILD_RENDERER_DIRECT3D11
+#   ifdef CEGUI_SAMPLES_RENDERER_DIRECT3D11_ACTIVE
 #       include "CEGuiD3D11BaseApplication.h"
 #   endif
 #endif
@@ -157,13 +159,13 @@
     d_rendererSelector = new Win32CEGuiRendererSelector;
 
     // enable renderer types supported for Win32
-#ifdef CEGUI_BUILD_RENDERER_DIRECT3D9
+#ifdef CEGUI_SAMPLES_RENDERER_DIRECT3D9_ACTIVE
     d_rendererSelector->setRendererAvailability(Direct3D9GuiRendererType);
 #endif
-#ifdef CEGUI_BUILD_RENDERER_DIRECT3D10
+#ifdef CEGUI_SAMPLES_RENDERER_DIRECT3D10_ACTIVE
     d_rendererSelector->setRendererAvailability(Direct3D10GuiRendererType);
 #endif
-#ifdef CEGUI_BUILD_RENDERER_DIRECT3D11
+#ifdef CEGUI_SAMPLES_RENDERER_DIRECT3D11_ACTIVE
     d_rendererSelector->setRendererAvailability(Direct3D11GuiRendererType);
 #endif
 
@@ -181,19 +183,21 @@
 #endif
 
     // enable available renderer types
-#ifdef CEGUI_BUILD_RENDERER_OGRE
+#ifdef CEGUI_SAMPLES_RENDERER_OGRE_ACTIVE
     d_rendererSelector->setRendererAvailability(OgreGuiRendererType);
 #endif
-#ifdef CEGUI_BUILD_RENDERER_OPENGL
-	d_rendererSelector->setRendererAvailability(OpenGLGuiRendererType);
+#ifdef CEGUI_SAMPLES_RENDERER_OPENGL_ACTIVE
+    #ifdef CEGUI_BUILD_RENDERER_OPENGL
+        d_rendererSelector->setRendererAvailability(OpenGLGuiRendererType);
+    #endif
+    #ifdef CEGUI_BUILD_RENDERER_OPENGL3
+        d_rendererSelector->setRendererAvailability(OpenGL3GuiRendererType);
+    #endif
 #endif
-#ifdef CEGUI_BUILD_RENDERER_OPENGL3
-	d_rendererSelector->setRendererAvailability(OpenGL3GuiRendererType);
-#endif
-#ifdef CEGUI_BUILD_RENDERER_IRRLICHT
+#ifdef CEGUI_SAMPLES_RENDERER_IRRLICHT_ACTIVE
     d_rendererSelector->setRendererAvailability(IrrlichtGuiRendererType);
 #endif
-#ifdef CEGUI_BUILD_RENDERER_DIRECTFB
+#ifdef CEGUI_SAMPLES_RENDERER_DIRECTFB_ACTIVE
     d_rendererSelector->setRendererAvailability(DirectFBGuiRendererType);
 #endif
 
@@ -203,7 +207,7 @@
         // create appropriate application type based upon users selection
         switch(d_rendererSelector->getSelectedRendererType())
         {
-#ifdef CEGUI_BUILD_RENDERER_OGRE
+#ifdef CEGUI_SAMPLES_RENDERER_OGRE_ACTIVE
         case OgreGuiRendererType:
             {
                 CEGuiOgreBaseApplication* ogreBaseApp = new CEGuiOgreBaseApplication();
@@ -215,38 +219,40 @@
             break;
 #endif
 #if defined( __WIN32__ ) || defined( _WIN32 )
-#ifdef CEGUI_BUILD_RENDERER_DIRECT3D9
+#ifdef CEGUI_SAMPLES_RENDERER_DIRECT3D9_ACTIVE
         case Direct3D9GuiRendererType:
             d_baseApp = new CEGuiD3D9BaseApplication();
             break;
 #endif // DX9
-#ifdef CEGUI_BUILD_RENDERER_DIRECT3D10
+#ifdef CEGUI_SAMPLES_RENDERER_DIRECT3D10_ACTIVE
         case Direct3D10GuiRendererType:
             d_baseApp = new CEGuiD3D10BaseApplication();
             break;
 #endif // DX10
-#ifdef CEGUI_BUILD_RENDERER_DIRECT3D11
+#ifdef CEGUI_SAMPLES_RENDERER_DIRECT3D11_ACTIVE
         case Direct3D11GuiRendererType:
             d_baseApp = new CEGuiD3D11BaseApplication();
             break;
 #endif // DX11
 #endif // Win32
-#ifdef CEGUI_BUILD_RENDERER_OPENGL
-        case OpenGLGuiRendererType:
-			d_baseApp = new CEGuiOpenGLBaseApplication();
-			break;
+#ifdef CEGUI_SAMPLES_RENDERER_OPENGL_ACTIVE
+    #ifdef CEGUI_BUILD_RENDERER_OPENGL
+            case OpenGLGuiRendererType:
+                d_baseApp = new CEGuiOpenGLBaseApplication();
+                break;
+    #endif
+    #ifdef CEGUI_BUILD_RENDERER_OPENGL3
+            case OpenGL3GuiRendererType:
+                d_baseApp = new CEGuiOpenGL3BaseApplication();
+                break;
+    #endif
 #endif
-#ifdef CEGUI_BUILD_RENDERER_OPENGL3
-		case OpenGL3GuiRendererType:
-			d_baseApp = new CEGuiOpenGL3BaseApplication();
-			break;
-#endif
-#ifdef CEGUI_BUILD_RENDERER_IRRLICHT
+#ifdef CEGUI_SAMPLES_RENDERER_IRRLICHT_ACTIVE
         case IrrlichtGuiRendererType:
             d_baseApp = new CEGuiIrrlichtBaseApplication();
             break;
 #endif
-#ifdef CEGUI_BUILD_RENDERER_DIRECTFB
+#ifdef CEGUI_SAMPLES_RENDERER_DIRECTFB_ACTIVE
         case DirectFBGuiRendererType:
             d_baseApp = new CEGuiDirectFBBaseApplication();
             break;
diff --git a/samples_framework/src/Win32AppHelper.cpp b/samples_framework/src/Win32AppHelper.cpp
--- a/samples_framework/src/Win32AppHelper.cpp
+++ b/samples_framework/src/Win32AppHelper.cpp
@@ -26,7 +26,7 @@
  ***************************************************************************/
 #include "CEGUISamplesConfig.h"
 
-#if defined(CEGUI_BUILD_RENDERER_DIRECT3D9) || defined(CEGUI_BUILD_RENDERER_DIRECT3D10) || defined(CEGUI_BUILD_RENDERER_DIRECT3D11)
+#if defined(CEGUI_SAMPLES_RENDERER_DIRECT3D9_ACTIVE) || defined(CEGUI_SAMPLES_RENDERER_DIRECT3D10_ACTIVE) || defined(CEGUI_SAMPLES_RENDERER_DIRECT3D11_ACTIVE)
 
 #include "Win32AppHelper.h"
 #include "CEGUI/CEGUI.h"
@@ -181,15 +181,15 @@
                 CEGUI::String id(renderer->getIdentifierString());
 
                 // invoke correct function based on the renderer we have ID'd
-#ifdef CEGUI_BUILD_RENDERER_DIRECT3D9
+#ifdef CEGUI_SAMPLES_RENDERER_DIRECT3D9_ACTIVE
                 if (id.find("Official Direct3D 9") != id.npos)
                     DeviceReset_Direct3D9(hWnd, renderer);
 #endif
-#ifdef CEGUI_BUILD_RENDERER_DIRECT3D10
+#ifdef CEGUI_SAMPLES_RENDERER_DIRECT3D10_ACTIVE
                 if (id.find("Official Direct3D 10") != id.npos)
                     DeviceReset_Direct3D10(hWnd, renderer);
 #endif
-#ifdef CEGUI_BUILD_RENDERER_DIRECT3D11
+#ifdef CEGUI_SAMPLES_RENDERER_DIRECT3D11_ACTIVE
                 if (id.find("Official Direct3D 11") != id.npos)
                     DeviceReset_Direct3D11(hWnd, renderer);
 #endif