From Stephan Huber, "minor ios-fixes/-enhancements

* force _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC for IOS device + simulator as the test does not pick the right implementation
* fixed a small compile-bug for iphone-example
* added a check to prevent multiple realization of a GraphicsWindowIOS-object
"
This commit is contained in:
Robert Osfield 2013-11-18 14:21:06 +00:00
parent d8c1c4bbeb
commit dbf88cc209
3 changed files with 107 additions and 95 deletions

View File

@ -15,7 +15,17 @@ IF (OPENTHREADS_ATOMIC_USE_MUTEX)
SET(_OPENTHREADS_ATOMIC_USE_MUTEX 1)
ELSE()
# as the test does not work for IOS hardcode the ATOMIC implementation
IF(OSG_BUILD_PLATFORM_IPHONE_SIMULATOR OR OSG_BUILD_PLATFORM_IPHONE)
SET(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS 0)
SET(_OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS 0)
SET(_OPENTHREADS_ATOMIC_USE_SUN 0)
SET(_OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED 0)
SET(_OPENTHREADS_ATOMIC_USE_MUTEX 0)
SET(_OPENTHREADS_ATOMIC_USE_BSD_ATOMIC 1)
ELSE()
INCLUDE(CheckCXXSourceRuns)
# Do step by step checking,
@ -133,5 +143,6 @@ ELSE()
NOT _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC)
SET(_OPENTHREADS_ATOMIC_USE_MUTEX 1)
ENDIF()
ENDIF()
ENDIF()

View File

@ -5,7 +5,6 @@
#include <osgDB/ReadFile>
#include <osg/MatrixTransform>
#include <osg/CameraNode>
#include <osgText/Text>
#include <osgViewer/Viewer>

View File

@ -746,6 +746,8 @@ void GraphicsWindowIOS::init()
bool GraphicsWindowIOS::realizeImplementation()
{
if (_realized) return true;
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
BOOL bar_hidden = (_traits->windowDecoration) ? NO: YES;