diff --git a/configure.ac b/configure.ac index d8b53c7..2568da1 100644 --- a/configure.ac +++ b/configure.ac @@ -32,6 +32,17 @@ LDFLAGS="$LDFLAGS $($OBJFW_CONFIG $OBJFW_CONFIG_FLAGS --ldflags)" FRAMEWORK_LIBS="$($OBJFW_CONFIG $OBJFW_CONFIG_FLAGS --framework-libs) $LIBS" LIBS="$($OBJFW_CONFIG $OBJFW_CONFIG_FLAGS --libs --rpath) $LIBS" +AX_CHECK_COMPILER_FLAGS(-std=gnu11, [ + OBJCFLAGS="$OBJCFLAGS -std=gnu11" +], [ + AX_CHECK_COMPILER_FLAGS(-std=gnu1x, [ + OBJCFLAGS="$OBJCFLAGS -std=gnu1x" + ], [ + AX_CHECK_COMPILER_FLAGS(-std=gnu99, + [OBJCFLAGS="$OBJCFLAGS -std=gnu99"]) + ]) +]) + AX_CHECK_COMPILER_FLAGS(-Wdocumentation, [OBJCFLAGS="$OBJCFLAGS -Wdocumentation"]) diff --git a/src/O3DEngine.m b/src/O3DEngine.m index 06a1337..0197772 100644 --- a/src/O3DEngine.m +++ b/src/O3DEngine.m @@ -31,7 +31,8 @@ self = [super init]; @try { - _renderer = [[renderer alloc] initWithOptions: options]; + _renderer = [(id )[(Class)renderer alloc] + initWithOptions: options]; } @catch (id e) { [self release]; @throw e; diff --git a/src/O3DGlide3Renderer.m b/src/O3DGlide3Renderer.m index fb6101e..c6a20ca 100644 --- a/src/O3DGlide3Renderer.m +++ b/src/O3DGlide3Renderer.m @@ -293,7 +293,7 @@ floatToScreenRefresh(float refresh) hWnd = (FxU32)_winAPIWindow.hWnd; #endif - if ((_context = grSstWinOpen(hWnd, screenRefresh, screenRefresh, + if ((_context = grSstWinOpen(hWnd, screenResolution, screenRefresh, GR_COLORFORMAT_RGBA, GR_ORIGIN_LOWER_LEFT, 2, 1)) == 0) @throw [OFInitializationFailedException exceptionWithClass: self.class]; diff --git a/src/O3DRenderer.h b/src/O3DRenderer.h index 87ccf4b..5de2758 100644 --- a/src/O3DRenderer.h +++ b/src/O3DRenderer.h @@ -23,7 +23,6 @@ typedef OFPair OF_GENERIC(OFValue *, OFNumber *) *O3DResolution; @property (readonly, nonatomic) OFArray OF_GENERIC(OFPair OF_GENERIC(OFValue *, OFNumber *) *) *availableResolutions; -+ (instancetype)alloc; - (instancetype)initWithOptions: (nullable OFDictionary OF_GENERIC(OFString *, id) *)options; - (void)createWithResolution: (O3DResolution)resolution;