Keep consistency with other irrlicht defines

This commit is contained in:
Deve 2017-05-18 20:48:42 +02:00
parent abde57cd4a
commit bc25bc4435
8 changed files with 25 additions and 25 deletions

View File

@ -11,7 +11,7 @@ include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include/"
if (SERVER_ONLY) if (SERVER_ONLY)
add_definitions(-DNO_IRR_COMPILE_WITH_OPENGL_) add_definitions(-DNO_IRR_COMPILE_WITH_OPENGL_)
add_definitions(-DNO_IRR_COMPILE_WITH_X11_) add_definitions(-DNO_IRR_COMPILE_WITH_X11_)
add_definitions(-DNO_IRR_COMPILE_WITH_WAYLAND) add_definitions(-DNO_IRR_COMPILE_WITH_WAYLAND_DEVICE_)
else() else()
if(NOT USE_GLES2) if(NOT USE_GLES2)
find_package(OpenGL REQUIRED) find_package(OpenGL REQUIRED)
@ -25,7 +25,7 @@ if (UNIX AND NOT APPLE)
endif() endif()
if(ENABLE_WAYLAND_DEVICE) if(ENABLE_WAYLAND_DEVICE)
add_definitions(-D_IRR_COMPILE_WITH_WAYLAND) add_definitions(-D_IRR_COMPILE_WITH_WAYLAND_DEVICE_)
endif() endif()
if(APPLE) if(APPLE)

View File

@ -127,14 +127,14 @@
#endif #endif
#define _IRR_POSIX_API_ #define _IRR_POSIX_API_
#define _IRR_COMPILE_WITH_X11_DEVICE_ #define _IRR_COMPILE_WITH_X11_DEVICE_
//#define _IRR_COMPILE_WITH_WAYLAND //#define _IRR_COMPILE_WITH_WAYLAND_DEVICE_
#endif #endif
#ifdef NO_IRR_COMPILE_WITH_WAYLAND #ifdef NO_IRR_COMPILE_WITH_WAYLAND_DEVICE_
#undef _IRR_COMPILE_WITH_WAYLAND #undef _IRR_COMPILE_WITH_WAYLAND_DEVICE_
#endif #endif
#ifdef _IRR_COMPILE_WITH_WAYLAND #ifdef _IRR_COMPILE_WITH_WAYLAND_DEVICE_
#define _IRR_COMPILE_WITH_EGL_ #define _IRR_COMPILE_WITH_EGL_
#endif #endif

View File

@ -18,7 +18,7 @@
#include "CIrrDeviceWayland.h" #include "CIrrDeviceWayland.h"
#ifdef _IRR_COMPILE_WITH_WAYLAND #ifdef _IRR_COMPILE_WITH_WAYLAND_DEVICE_
#include <cstdio> #include <cstdio>
#include <cstdlib> #include <cstdlib>

View File

@ -21,7 +21,7 @@
#include "IrrCompileConfig.h" #include "IrrCompileConfig.h"
#ifdef _IRR_COMPILE_WITH_WAYLAND #ifdef _IRR_COMPILE_WITH_WAYLAND_DEVICE_
#include "CIrrDeviceStub.h" #include "CIrrDeviceStub.h"
#include "IImagePresenter.h" #include "IImagePresenter.h"

View File

@ -28,7 +28,7 @@
#if defined(_IRR_COMPILE_WITH_X11_DEVICE_) #if defined(_IRR_COMPILE_WITH_X11_DEVICE_)
#include "CIrrDeviceLinux.h" #include "CIrrDeviceLinux.h"
#endif #endif
#if defined(_IRR_COMPILE_WITH_WAYLAND) #if defined(_IRR_COMPILE_WITH_WAYLAND_DEVICE_)
#include "CIrrDeviceWayland.h" #include "CIrrDeviceWayland.h"
#endif #endif
#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_ #ifdef _IRR_COMPILE_WITH_OSX_DEVICE_
@ -124,7 +124,7 @@ void COSOperator::copyToClipboard(const c8* text) const
OSXCopyToClipboard(text); OSXCopyToClipboard(text);
#elif defined(_IRR_COMPILE_WITH_X11_DEVICE_) || defined(_IRR_COMPILE_WITH_WAYLAND) #elif defined(_IRR_COMPILE_WITH_X11_DEVICE_) || defined(_IRR_COMPILE_WITH_WAYLAND_DEVICE_)
if (IrrDevice != NULL) if (IrrDevice != NULL)
{ {
#if defined(_IRR_COMPILE_WITH_X11_DEVICE_) #if defined(_IRR_COMPILE_WITH_X11_DEVICE_)
@ -136,7 +136,7 @@ void COSOperator::copyToClipboard(const c8* text) const
device->copyToClipboard(text); device->copyToClipboard(text);
} }
#endif #endif
#if defined(_IRR_COMPILE_WITH_WAYLAND) #if defined(_IRR_COMPILE_WITH_WAYLAND_DEVICE_)
if (IrrDevice->getType() == EIDT_WAYLAND) if (IrrDevice->getType() == EIDT_WAYLAND)
{ {
CIrrDeviceWayland* device = dynamic_cast<CIrrDeviceWayland*>(IrrDevice); CIrrDeviceWayland* device = dynamic_cast<CIrrDeviceWayland*>(IrrDevice);
@ -199,7 +199,7 @@ const c8* COSOperator::getTextFromClipboard() const
#elif defined(_IRR_COMPILE_WITH_X11_DEVICE_) || defined(_IRR_COMPILE_WITH_WAYLAND) #elif defined(_IRR_COMPILE_WITH_X11_DEVICE_) || defined(_IRR_COMPILE_WITH_WAYLAND_DEVICE_)
if (IrrDevice != NULL) if (IrrDevice != NULL)
{ {
#if defined(_IRR_COMPILE_WITH_X11_DEVICE_) #if defined(_IRR_COMPILE_WITH_X11_DEVICE_)
@ -211,7 +211,7 @@ const c8* COSOperator::getTextFromClipboard() const
return device->getTextFromClipboard(); return device->getTextFromClipboard();
} }
#endif #endif
#if defined(_IRR_COMPILE_WITH_WAYLAND) #if defined(_IRR_COMPILE_WITH_WAYLAND_DEVICE_)
if (IrrDevice->getType() == EIDT_WAYLAND) if (IrrDevice->getType() == EIDT_WAYLAND)
{ {
CIrrDeviceWayland* device = dynamic_cast<CIrrDeviceWayland*>(IrrDevice); CIrrDeviceWayland* device = dynamic_cast<CIrrDeviceWayland*>(IrrDevice);

View File

@ -26,7 +26,7 @@ extern bool GLContextDebugBit;
#include "MacOSX/CIrrDeviceMacOSX.h" #include "MacOSX/CIrrDeviceMacOSX.h"
#endif #endif
#ifdef _IRR_COMPILE_WITH_WAYLAND #ifdef _IRR_COMPILE_WITH_WAYLAND_DEVICE_
#include "CIrrDeviceWayland.h" #include "CIrrDeviceWayland.h"
#include "CContextEGL.h" #include "CContextEGL.h"
#endif #endif
@ -685,7 +685,7 @@ bool COpenGLDriver::initDriver(CIrrDeviceLinux* device)
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
// Wayland CONSTRUCTOR // Wayland CONSTRUCTOR
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
#ifdef _IRR_COMPILE_WITH_WAYLAND #ifdef _IRR_COMPILE_WITH_WAYLAND_DEVICE_
//! Linux constructor and init code //! Linux constructor and init code
COpenGLDriver::COpenGLDriver(const SIrrlichtCreationParameters& params, COpenGLDriver::COpenGLDriver(const SIrrlichtCreationParameters& params,
io::IFileSystem* io, CIrrDeviceWayland* device) io::IFileSystem* io, CIrrDeviceWayland* device)
@ -723,7 +723,7 @@ bool COpenGLDriver::initDriver(CIrrDeviceWayland* device)
return true; return true;
} }
#endif // _IRR_COMPILE_WITH_WAYLAND #endif // _IRR_COMPILE_WITH_WAYLAND_DEVICE
@ -979,7 +979,7 @@ bool COpenGLDriver::endScene()
} }
#endif #endif
#ifdef _IRR_COMPILE_WITH_WAYLAND #ifdef _IRR_COMPILE_WITH_WAYLAND_DEVICE_
if (DeviceType == EIDT_WAYLAND) if (DeviceType == EIDT_WAYLAND)
{ {
wl_device->swapBuffers(); wl_device->swapBuffers();
@ -1055,7 +1055,7 @@ bool COpenGLDriver::beginScene(bool backBuffer, bool zBuffer, SColor color,
changeRenderContext(videoData, X11Device); changeRenderContext(videoData, X11Device);
break; break;
#endif #endif
#ifdef _IRR_COMPILE_WITH_WAYLAND #ifdef _IRR_COMPILE_WITH_WAYLAND_DEVICE_
case EIDT_WAYLAND: case EIDT_WAYLAND:
changeRenderContext(videoData, wl_device); changeRenderContext(videoData, wl_device);
break; break;
@ -4994,7 +4994,7 @@ IVideoDriver* createOpenGLDriver(const SIrrlichtCreationParameters& params,
// ----------------------------------- // -----------------------------------
// Wayland VERSION // Wayland VERSION
// ----------------------------------- // -----------------------------------
#ifdef _IRR_COMPILE_WITH_WAYLAND #ifdef _IRR_COMPILE_WITH_WAYLAND_DEVICE_
IVideoDriver* createOpenGLDriver(const SIrrlichtCreationParameters& params, IVideoDriver* createOpenGLDriver(const SIrrlichtCreationParameters& params,
io::IFileSystem* io, CIrrDeviceWayland* device) io::IFileSystem* io, CIrrDeviceWayland* device)
{ {
@ -5007,7 +5007,7 @@ IVideoDriver* createOpenGLDriver(const SIrrlichtCreationParameters& params,
return ogl; return ogl;
} }
#endif // _IRR_COMPILE_WITH_WAYLAND #endif // _IRR_COMPILE_WITH_WAYLAND_DEVICE
// ----------------------------------- // -----------------------------------

View File

@ -45,7 +45,7 @@ namespace video
bool changeRenderContext(const SExposedVideoData& videoData, CIrrDeviceWin32* device); bool changeRenderContext(const SExposedVideoData& videoData, CIrrDeviceWin32* device);
#endif #endif
#ifdef _IRR_COMPILE_WITH_WAYLAND #ifdef _IRR_COMPILE_WITH_WAYLAND_DEVICE_
COpenGLDriver(const SIrrlichtCreationParameters& params, io::IFileSystem* io, CIrrDeviceWayland* device); COpenGLDriver(const SIrrlichtCreationParameters& params, io::IFileSystem* io, CIrrDeviceWayland* device);
//! inits the EGL specific parts of the open gl driver //! inits the EGL specific parts of the open gl driver
bool initDriver(CIrrDeviceWayland* device); bool initDriver(CIrrDeviceWayland* device);
@ -595,7 +595,7 @@ namespace video
Display* X11Display; Display* X11Display;
CIrrDeviceLinux *X11Device; CIrrDeviceLinux *X11Device;
#endif #endif
#ifdef _IRR_COMPILE_WITH_WAYLAND #ifdef _IRR_COMPILE_WITH_WAYLAND_DEVICE_
CIrrDeviceWayland *wl_device; CIrrDeviceWayland *wl_device;
#endif #endif
#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_ #ifdef _IRR_COMPILE_WITH_OSX_DEVICE_

View File

@ -26,7 +26,7 @@
#include "CIrrDeviceWinCE.h" #include "CIrrDeviceWinCE.h"
#endif #endif
#ifdef _IRR_COMPILE_WITH_WAYLAND #ifdef _IRR_COMPILE_WITH_WAYLAND_DEVICE_
#include "CIrrDeviceWayland.h" #include "CIrrDeviceWayland.h"
#endif #endif
@ -100,7 +100,7 @@ namespace irr
device_type = EIDT_WINCE; device_type = EIDT_WINCE;
} }
#endif #endif
#ifdef _IRR_COMPILE_WITH_WAYLAND #ifdef _IRR_COMPILE_WITH_WAYLAND_DEVICE_
if (strcmp(irr_device_type, "wayland") == 0) if (strcmp(irr_device_type, "wayland") == 0)
{ {
device_type = EIDT_WAYLAND; device_type = EIDT_WAYLAND;
@ -161,7 +161,7 @@ namespace irr
dev = new CIrrDeviceWinCE(creation_params); dev = new CIrrDeviceWinCE(creation_params);
#endif #endif
#ifdef _IRR_COMPILE_WITH_WAYLAND #ifdef _IRR_COMPILE_WITH_WAYLAND_DEVICE_
if (creation_params.DeviceType == EIDT_WAYLAND || (!dev && creation_params.DeviceType == EIDT_BEST)) if (creation_params.DeviceType == EIDT_WAYLAND || (!dev && creation_params.DeviceType == EIDT_BEST))
{ {
if (CIrrDeviceWayland::isWaylandDeviceWorking()) if (CIrrDeviceWayland::isWaylandDeviceWorking())