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
This commit is contained in:
parent
ed8e0edfd0
commit
69c194f57f
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_SAMPLES "Build NeL Samples" ON )
|
||||
OPTION(WITH_NEL_TESTS "Build NeL Unit Tests" ON )
|
||||
|
||||
OPTION(WITH_LIBOVR "With LibOVR support" OFF)
|
||||
ENDMACRO(NL_SETUP_NEL_DEFAULT_OPTIONS)
|
||||
|
||||
MACRO(NL_SETUP_NELNS_DEFAULT_OPTIONS)
|
||||
|
|
|
@ -41,7 +41,9 @@ IF(WITH_GTK)
|
|||
FIND_PACKAGE(GTK2)
|
||||
ENDIF(WITH_GTK)
|
||||
|
||||
FIND_PACKAGE(LibOVR)
|
||||
IF(WITH_LIBOVR)
|
||||
FIND_PACKAGE(LibOVR)
|
||||
ENDIF(WITH_LIBOVR)
|
||||
|
||||
IF(WITH_INSTALL_LIBRARIES)
|
||||
IF(UNIX)
|
||||
|
|
|
@ -43,6 +43,9 @@
|
|||
|
||||
#ifndef NL3D_STEREO_OVR_H
|
||||
#define NL3D_STEREO_OVR_H
|
||||
|
||||
#ifdef WITH_LIBOVR
|
||||
|
||||
#include <nel/misc/types_nl.h>
|
||||
|
||||
// STL includes
|
||||
|
@ -166,6 +169,8 @@ private:
|
|||
|
||||
} /* namespace NL3D */
|
||||
|
||||
#endif /* WITH_LIBOVR */
|
||||
|
||||
#endif /* #ifndef NL3D_STEREO_OVR_H */
|
||||
|
||||
/* end of file */
|
||||
|
|
|
@ -75,7 +75,9 @@ const char *IStereoDisplay::getLibraryName(CStereoDeviceInfo::TStereoDeviceLibra
|
|||
|
||||
void IStereoDisplay::listDevices(std::vector<CStereoDeviceInfo> &devicesOut)
|
||||
{
|
||||
#ifdef WITH_LIBOVR
|
||||
CStereoOVR::listDevices(devicesOut);
|
||||
#endif
|
||||
#if !FINAL_VERSION
|
||||
CStereoDebugger::listDevices(devicesOut);
|
||||
#endif
|
||||
|
@ -88,13 +90,17 @@ IStereoDisplay *IStereoDisplay::createDevice(const CStereoDeviceInfo &deviceInfo
|
|||
|
||||
void IStereoDisplay::releaseUnusedLibraries()
|
||||
{
|
||||
#ifdef WITH_LIBOVR
|
||||
if (!CStereoOVR::isLibraryInUse())
|
||||
CStereoOVR::releaseLibrary();
|
||||
#endif
|
||||
}
|
||||
|
||||
void IStereoDisplay::releaseAllLibraries()
|
||||
{
|
||||
#ifdef WITH_LIBOVR
|
||||
CStereoOVR::releaseLibrary();
|
||||
#endif
|
||||
}
|
||||
|
||||
} /* namespace NL3D */
|
||||
|
|
|
@ -41,6 +41,8 @@
|
|||
* so, delete this exception statement from your version.
|
||||
*/
|
||||
|
||||
#ifdef WITH_LIBOVR
|
||||
|
||||
#include <nel/misc/types_nl.h>
|
||||
#include <nel/3d/stereo_ovr.h>
|
||||
|
||||
|
@ -736,4 +738,6 @@ bool CStereoOVR::isDeviceCreated()
|
|||
|
||||
} /* namespace NL3D */
|
||||
|
||||
#endif /* WITH_LIBOVR */
|
||||
|
||||
/* end of file */
|
||||
|
|
Loading…
Reference in a new issue