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)
add_definitions(-DNO_IRR_COMPILE_WITH_OPENGL_)
add_definitions(-DNO_IRR_COMPILE_WITH_X11_)
add_definitions(-DNO_IRR_COMPILE_WITH_WAYLAND)
add_definitions(-DNO_IRR_COMPILE_WITH_WAYLAND_DEVICE_)
else()
if(NOT USE_GLES2)
find_package(OpenGL REQUIRED)
@ -25,7 +25,7 @@ if (UNIX AND NOT APPLE)
endif()
if(ENABLE_WAYLAND_DEVICE)
add_definitions(-D_IRR_COMPILE_WITH_WAYLAND)
add_definitions(-D_IRR_COMPILE_WITH_WAYLAND_DEVICE_)
endif()
if(APPLE)

View File

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

View File

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

View File

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

View File

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

View File

@ -26,7 +26,7 @@ extern bool GLContextDebugBit;
#include "MacOSX/CIrrDeviceMacOSX.h"
#endif
#ifdef _IRR_COMPILE_WITH_WAYLAND
#ifdef _IRR_COMPILE_WITH_WAYLAND_DEVICE_
#include "CIrrDeviceWayland.h"
#include "CContextEGL.h"
#endif
@ -685,7 +685,7 @@ bool COpenGLDriver::initDriver(CIrrDeviceLinux* device)
// -----------------------------------------------------------------------
// Wayland CONSTRUCTOR
// -----------------------------------------------------------------------
#ifdef _IRR_COMPILE_WITH_WAYLAND
#ifdef _IRR_COMPILE_WITH_WAYLAND_DEVICE_
//! Linux constructor and init code
COpenGLDriver::COpenGLDriver(const SIrrlichtCreationParameters& params,
io::IFileSystem* io, CIrrDeviceWayland* device)
@ -723,7 +723,7 @@ bool COpenGLDriver::initDriver(CIrrDeviceWayland* device)
return true;
}
#endif // _IRR_COMPILE_WITH_WAYLAND
#endif // _IRR_COMPILE_WITH_WAYLAND_DEVICE
@ -979,7 +979,7 @@ bool COpenGLDriver::endScene()
}
#endif
#ifdef _IRR_COMPILE_WITH_WAYLAND
#ifdef _IRR_COMPILE_WITH_WAYLAND_DEVICE_
if (DeviceType == EIDT_WAYLAND)
{
wl_device->swapBuffers();
@ -1055,7 +1055,7 @@ bool COpenGLDriver::beginScene(bool backBuffer, bool zBuffer, SColor color,
changeRenderContext(videoData, X11Device);
break;
#endif
#ifdef _IRR_COMPILE_WITH_WAYLAND
#ifdef _IRR_COMPILE_WITH_WAYLAND_DEVICE_
case EIDT_WAYLAND:
changeRenderContext(videoData, wl_device);
break;
@ -4994,7 +4994,7 @@ IVideoDriver* createOpenGLDriver(const SIrrlichtCreationParameters& params,
// -----------------------------------
// Wayland VERSION
// -----------------------------------
#ifdef _IRR_COMPILE_WITH_WAYLAND
#ifdef _IRR_COMPILE_WITH_WAYLAND_DEVICE_
IVideoDriver* createOpenGLDriver(const SIrrlichtCreationParameters& params,
io::IFileSystem* io, CIrrDeviceWayland* device)
{
@ -5007,7 +5007,7 @@ IVideoDriver* createOpenGLDriver(const SIrrlichtCreationParameters& params,
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);
#endif
#ifdef _IRR_COMPILE_WITH_WAYLAND
#ifdef _IRR_COMPILE_WITH_WAYLAND_DEVICE_
COpenGLDriver(const SIrrlichtCreationParameters& params, io::IFileSystem* io, CIrrDeviceWayland* device);
//! inits the EGL specific parts of the open gl driver
bool initDriver(CIrrDeviceWayland* device);
@ -595,7 +595,7 @@ namespace video
Display* X11Display;
CIrrDeviceLinux *X11Device;
#endif
#ifdef _IRR_COMPILE_WITH_WAYLAND
#ifdef _IRR_COMPILE_WITH_WAYLAND_DEVICE_
CIrrDeviceWayland *wl_device;
#endif
#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_

View File

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