mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-10 01:09:50 +00:00
LibOVR is optional, and is disabled by default
--HG-- branch : multipass-stereo
This commit is contained in:
parent
0036b5c619
commit
a33a0e5c56
5 changed files with 20 additions and 1 deletions
|
@ -324,6 +324,8 @@ MACRO(NL_SETUP_NEL_DEFAULT_OPTIONS)
|
||||||
OPTION(WITH_NEL_MAXPLUGIN "Build NeL 3dsMax Plugin" OFF)
|
OPTION(WITH_NEL_MAXPLUGIN "Build NeL 3dsMax Plugin" OFF)
|
||||||
OPTION(WITH_NEL_SAMPLES "Build NeL Samples" ON )
|
OPTION(WITH_NEL_SAMPLES "Build NeL Samples" ON )
|
||||||
OPTION(WITH_NEL_TESTS "Build NeL Unit Tests" ON )
|
OPTION(WITH_NEL_TESTS "Build NeL Unit Tests" ON )
|
||||||
|
|
||||||
|
OPTION(WITH_LIBOVR "With LibOVR support" OFF)
|
||||||
ENDMACRO(NL_SETUP_NEL_DEFAULT_OPTIONS)
|
ENDMACRO(NL_SETUP_NEL_DEFAULT_OPTIONS)
|
||||||
|
|
||||||
MACRO(NL_SETUP_NELNS_DEFAULT_OPTIONS)
|
MACRO(NL_SETUP_NELNS_DEFAULT_OPTIONS)
|
||||||
|
|
|
@ -41,7 +41,9 @@ IF(WITH_GTK)
|
||||||
FIND_PACKAGE(GTK2)
|
FIND_PACKAGE(GTK2)
|
||||||
ENDIF(WITH_GTK)
|
ENDIF(WITH_GTK)
|
||||||
|
|
||||||
FIND_PACKAGE(LibOVR)
|
IF(WITH_LIBOVR)
|
||||||
|
FIND_PACKAGE(LibOVR)
|
||||||
|
ENDIF(WITH_LIBOVR)
|
||||||
|
|
||||||
IF(WITH_INSTALL_LIBRARIES)
|
IF(WITH_INSTALL_LIBRARIES)
|
||||||
IF(UNIX)
|
IF(UNIX)
|
||||||
|
|
|
@ -43,6 +43,9 @@
|
||||||
|
|
||||||
#ifndef NL3D_STEREO_OVR_H
|
#ifndef NL3D_STEREO_OVR_H
|
||||||
#define NL3D_STEREO_OVR_H
|
#define NL3D_STEREO_OVR_H
|
||||||
|
|
||||||
|
#ifdef WITH_LIBOVR
|
||||||
|
|
||||||
#include <nel/misc/types_nl.h>
|
#include <nel/misc/types_nl.h>
|
||||||
|
|
||||||
// STL includes
|
// STL includes
|
||||||
|
@ -166,6 +169,8 @@ private:
|
||||||
|
|
||||||
} /* namespace NL3D */
|
} /* namespace NL3D */
|
||||||
|
|
||||||
|
#endif /* WITH_LIBOVR */
|
||||||
|
|
||||||
#endif /* #ifndef NL3D_STEREO_OVR_H */
|
#endif /* #ifndef NL3D_STEREO_OVR_H */
|
||||||
|
|
||||||
/* end of file */
|
/* end of file */
|
||||||
|
|
|
@ -75,7 +75,9 @@ const char *IStereoDisplay::getLibraryName(CStereoDeviceInfo::TStereoDeviceLibra
|
||||||
|
|
||||||
void IStereoDisplay::listDevices(std::vector<CStereoDeviceInfo> &devicesOut)
|
void IStereoDisplay::listDevices(std::vector<CStereoDeviceInfo> &devicesOut)
|
||||||
{
|
{
|
||||||
|
#ifdef WITH_LIBOVR
|
||||||
CStereoOVR::listDevices(devicesOut);
|
CStereoOVR::listDevices(devicesOut);
|
||||||
|
#endif
|
||||||
#if !FINAL_VERSION
|
#if !FINAL_VERSION
|
||||||
CStereoDebugger::listDevices(devicesOut);
|
CStereoDebugger::listDevices(devicesOut);
|
||||||
#endif
|
#endif
|
||||||
|
@ -88,13 +90,17 @@ IStereoDisplay *IStereoDisplay::createDevice(const CStereoDeviceInfo &deviceInfo
|
||||||
|
|
||||||
void IStereoDisplay::releaseUnusedLibraries()
|
void IStereoDisplay::releaseUnusedLibraries()
|
||||||
{
|
{
|
||||||
|
#ifdef WITH_LIBOVR
|
||||||
if (!CStereoOVR::isLibraryInUse())
|
if (!CStereoOVR::isLibraryInUse())
|
||||||
CStereoOVR::releaseLibrary();
|
CStereoOVR::releaseLibrary();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void IStereoDisplay::releaseAllLibraries()
|
void IStereoDisplay::releaseAllLibraries()
|
||||||
{
|
{
|
||||||
|
#ifdef WITH_LIBOVR
|
||||||
CStereoOVR::releaseLibrary();
|
CStereoOVR::releaseLibrary();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
} /* namespace NL3D */
|
} /* namespace NL3D */
|
||||||
|
|
|
@ -41,6 +41,8 @@
|
||||||
* so, delete this exception statement from your version.
|
* so, delete this exception statement from your version.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef WITH_LIBOVR
|
||||||
|
|
||||||
#include <nel/misc/types_nl.h>
|
#include <nel/misc/types_nl.h>
|
||||||
#include <nel/3d/stereo_ovr.h>
|
#include <nel/3d/stereo_ovr.h>
|
||||||
|
|
||||||
|
@ -736,4 +738,6 @@ bool CStereoOVR::isDeviceCreated()
|
||||||
|
|
||||||
} /* namespace NL3D */
|
} /* namespace NL3D */
|
||||||
|
|
||||||
|
#endif /* WITH_LIBOVR */
|
||||||
|
|
||||||
/* end of file */
|
/* end of file */
|
||||||
|
|
Loading…
Reference in a new issue