summaryrefslogtreecommitdiffstats
path: root/Common/NativeApp/Apple
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-11-11 15:47:34 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-11-11 15:47:34 +0000
commitbb9394a46f2c541db7cfdf664bf4411a61afcba4 (patch)
tree1ecbb909b4275f722e9518a9c2ff5a538bd0f415 /Common/NativeApp/Apple
parentUpdated core (diff)
downloadDiligentEngine-bb9394a46f2c541db7cfdf664bf4411a61afcba4.tar.gz
DiligentEngine-bb9394a46f2c541db7cfdf664bf4411a61afcba4.zip
Moved NativeApp to Tools module
Diffstat (limited to 'Common/NativeApp/Apple')
-rw-r--r--Common/NativeApp/Apple/Data/OSX/Base.lproj/Main.storyboard215
-rw-r--r--Common/NativeApp/Apple/Data/OSX/Images.xcassets/AppIcon.appiconset/dg.icnsbin526978 -> 0 bytes
-rw-r--r--Common/NativeApp/Apple/Data/OSX/Images.xcassets/opengl-logo.pngbin42517 -> 0 bytes
-rw-r--r--Common/NativeApp/Apple/Data/OSX/Images.xcassets/vulkan-logo.pngbin35692 -> 0 bytes
-rw-r--r--Common/NativeApp/Apple/Data/OSX/Info.plist30
-rw-r--r--Common/NativeApp/Apple/Data/iOS/Base.lproj/LaunchScreen.xib45
-rw-r--r--Common/NativeApp/Apple/Data/iOS/Base.lproj/Main.storyboard89
-rw-r--r--Common/NativeApp/Apple/Data/iOS/Images.xcassets/AppIcon.appiconset/dg-icon.pngbin19386 -> 0 bytes
-rwxr-xr-xCommon/NativeApp/Apple/Data/iOS/Images.xcassets/opengles-logo.pngbin39013 -> 0 bytes
-rw-r--r--Common/NativeApp/Apple/Data/iOS/Images.xcassets/vulkan-logo.pngbin35692 -> 0 bytes
-rw-r--r--Common/NativeApp/Apple/Data/iOS/info.plist49
-rw-r--r--Common/NativeApp/Apple/LICENSE.txt42
-rw-r--r--Common/NativeApp/Apple/Source/Classes/OSX/AppDelegate.h15
-rw-r--r--Common/NativeApp/Apple/Source/Classes/OSX/AppDelegate.m30
-rw-r--r--Common/NativeApp/Apple/Source/Classes/OSX/FullscreenWindow.h15
-rw-r--r--Common/NativeApp/Apple/Source/Classes/OSX/FullscreenWindow.m52
-rw-r--r--Common/NativeApp/Apple/Source/Classes/OSX/GLView.h15
-rw-r--r--Common/NativeApp/Apple/Source/Classes/OSX/GLView.m211
-rw-r--r--Common/NativeApp/Apple/Source/Classes/OSX/MetalView.h30
-rw-r--r--Common/NativeApp/Apple/Source/Classes/OSX/MetalView.m139
-rw-r--r--Common/NativeApp/Apple/Source/Classes/OSX/ModeSelectionViewController.h30
-rw-r--r--Common/NativeApp/Apple/Source/Classes/OSX/ModeSelectionViewController.mm83
-rw-r--r--Common/NativeApp/Apple/Source/Classes/OSX/ViewBase.h43
-rw-r--r--Common/NativeApp/Apple/Source/Classes/OSX/ViewBase.m147
-rw-r--r--Common/NativeApp/Apple/Source/Classes/OSX/ViewController.h30
-rw-r--r--Common/NativeApp/Apple/Source/Classes/OSX/ViewController.mm116
-rw-r--r--Common/NativeApp/Apple/Source/Classes/OSX/WindowController.h14
-rw-r--r--Common/NativeApp/Apple/Source/Classes/OSX/WindowController.m181
-rw-r--r--Common/NativeApp/Apple/Source/Classes/iOS/AppDelegate.h18
-rw-r--r--Common/NativeApp/Apple/Source/Classes/iOS/AppDelegate.m89
-rw-r--r--Common/NativeApp/Apple/Source/Classes/iOS/AppViewBase.h16
-rw-r--r--Common/NativeApp/Apple/Source/Classes/iOS/AppViewBase.m166
-rw-r--r--Common/NativeApp/Apple/Source/Classes/iOS/BaseView.h12
-rw-r--r--Common/NativeApp/Apple/Source/Classes/iOS/BaseView.m21
-rw-r--r--Common/NativeApp/Apple/Source/Classes/iOS/EAGLView.h18
-rw-r--r--Common/NativeApp/Apple/Source/Classes/iOS/EAGLView.m74
-rw-r--r--Common/NativeApp/Apple/Source/Classes/iOS/MetalView.h7
-rw-r--r--Common/NativeApp/Apple/Source/Classes/iOS/MetalView.m44
-rw-r--r--Common/NativeApp/Apple/Source/Classes/iOS/ModeSelectionViewController.h29
-rw-r--r--Common/NativeApp/Apple/Source/Classes/iOS/ModeSelectionViewController.mm64
-rw-r--r--Common/NativeApp/Apple/Source/main.m25
41 files changed, 0 insertions, 2204 deletions
diff --git a/Common/NativeApp/Apple/Data/OSX/Base.lproj/Main.storyboard b/Common/NativeApp/Apple/Data/OSX/Base.lproj/Main.storyboard
deleted file mode 100644
index 9b6ac71..0000000
--- a/Common/NativeApp/Apple/Data/OSX/Base.lproj/Main.storyboard
+++ /dev/null
@@ -1,215 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
- <dependencies>
- <deployment identifier="macosx"/>
- <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14460.31"/>
- <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
- </dependencies>
- <scenes>
- <!--Application-->
- <scene sceneID="JPo-4y-FX3">
- <objects>
- <application id="hnw-xV-0zn" sceneMemberID="viewController">
- <menu key="mainMenu" title="Main Menu" systemMenu="main" id="AYu-sK-qS6">
- <items>
- <menuItem title="Application" id="1Xt-HY-uBw">
- <modifierMask key="keyEquivalentModifierMask"/>
- <menu key="submenu" title="Application" systemMenu="apple" id="uQy-DD-JDr">
- <items>
- <menuItem title="About" id="5kV-Vb-QxS" userLabel="About">
- <modifierMask key="keyEquivalentModifierMask"/>
- <connections>
- <action selector="orderFrontStandardAboutPanel:" target="Ady-hI-5gd" id="Exp-CZ-Vem"/>
- </connections>
- </menuItem>
- <menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/>
- <menuItem title="Preferences…" keyEquivalent="," id="BOF-NM-1cW"/>
- <menuItem isSeparatorItem="YES" id="wFC-TO-SCJ"/>
- <menuItem title="Services" id="NMo-om-nkz">
- <modifierMask key="keyEquivalentModifierMask"/>
- <menu key="submenu" title="Services" systemMenu="services" id="hz9-B4-Xy5"/>
- </menuItem>
- <menuItem isSeparatorItem="YES" id="4je-JR-u6R"/>
- <menuItem title="Hide" keyEquivalent="h" id="Olw-nP-bQN" userLabel="Hide">
- <connections>
- <action selector="hide:" target="Ady-hI-5gd" id="PnN-Uc-m68"/>
- </connections>
- </menuItem>
- <menuItem title="Hide Others" keyEquivalent="h" id="Vdr-fp-XzO">
- <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
- <connections>
- <action selector="hideOtherApplications:" target="Ady-hI-5gd" id="VT4-aY-XCT"/>
- </connections>
- </menuItem>
- <menuItem title="Show All" id="Kd2-mp-pUS">
- <modifierMask key="keyEquivalentModifierMask"/>
- <connections>
- <action selector="unhideAllApplications:" target="Ady-hI-5gd" id="Dhg-Le-xox"/>
- </connections>
- </menuItem>
- <menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/>
- <menuItem title="Quit" keyEquivalent="q" id="4sb-4s-VLi" userLabel="Quit">
- <connections>
- <action selector="terminate:" target="Ady-hI-5gd" id="Te7-pn-YzF"/>
- </connections>
- </menuItem>
- </items>
- </menu>
- </menuItem>
- <menuItem title="View" id="H8h-7b-M4v">
- <modifierMask key="keyEquivalentModifierMask"/>
- <menu key="submenu" title="View" id="HyV-fh-RgO">
- <items>
- <menuItem title="Show Toolbar" keyEquivalent="t" id="snW-S8-Cw5">
- <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
- <connections>
- <action selector="toggleToolbarShown:" target="Ady-hI-5gd" id="BXY-wc-z0C"/>
- </connections>
- </menuItem>
- <menuItem title="Customize Toolbar…" id="1UK-8n-QPP">
- <modifierMask key="keyEquivalentModifierMask"/>
- <connections>
- <action selector="runToolbarCustomizationPalette:" target="Ady-hI-5gd" id="pQI-g3-MTW"/>
- </connections>
- </menuItem>
- </items>
- </menu>
- </menuItem>
- <menuItem title="Window" id="aUF-d1-5bR">
- <modifierMask key="keyEquivalentModifierMask"/>
- <menu key="submenu" title="Window" systemMenu="window" id="Td7-aD-5lo">
- <items>
- <menuItem title="Minimize" keyEquivalent="m" id="OY7-WF-poV">
- <connections>
- <action selector="performMiniaturize:" target="Ady-hI-5gd" id="VwT-WD-YPe"/>
- </connections>
- </menuItem>
- <menuItem title="Zoom" id="R4o-n2-Eq4">
- <modifierMask key="keyEquivalentModifierMask"/>
- <connections>
- <action selector="performZoom:" target="Ady-hI-5gd" id="DIl-cC-cCs"/>
- </connections>
- </menuItem>
- <menuItem isSeparatorItem="YES" id="eu3-7i-yIM"/>
- <menuItem title="Bring All to Front" id="LE2-aR-0XJ">
- <modifierMask key="keyEquivalentModifierMask"/>
- <connections>
- <action selector="arrangeInFront:" target="Ady-hI-5gd" id="DRN-fu-gQh"/>
- </connections>
- </menuItem>
- </items>
- </menu>
- </menuItem>
- <menuItem title="Help" id="wpr-3q-Mcd">
- <modifierMask key="keyEquivalentModifierMask"/>
- <menu key="submenu" title="Help" systemMenu="help" id="F2S-fz-NVQ">
- <items>
- <menuItem title="Help" keyEquivalent="?" id="FKE-Sm-Kum" userLabel="Sample Help">
- <connections>
- <action selector="showHelp:" target="Ady-hI-5gd" id="y7X-2Q-9no"/>
- </connections>
- </menuItem>
- </items>
- </menu>
- </menuItem>
- </items>
- </menu>
- <connections>
- <outlet property="delegate" destination="Voe-Tx-rLC" id="PrD-fu-P6m"/>
- </connections>
- </application>
- <customObject id="Voe-Tx-rLC" customClass="AppDelegate"/>
- <customObject id="Ady-hI-5gd" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
- </objects>
- <point key="canvasLocation" x="75" y="0.0"/>
- </scene>
- <!--Window Controller-->
- <scene sceneID="R2V-B0-nI4">
- <objects>
- <windowController id="B8D-0N-5wS" customClass="WindowController" sceneMemberID="viewController">
- <window key="window" title="Diligent Engine" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="IQv-IB-iLA">
- <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
- <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
- <rect key="contentRect" x="196" y="240" width="480" height="270"/>
- <rect key="screenRect" x="0.0" y="0.0" width="1680" height="1027"/>
- <value key="minSize" type="size" width="10" height="20"/>
- <connections>
- <outlet property="delegate" destination="B8D-0N-5wS" id="owC-aB-m7U"/>
- </connections>
- </window>
- <connections>
- <segue destination="lYj-9Z-eqp" kind="relationship" relationship="window.shadowedContentViewController" id="aXj-gz-HUq"/>
- </connections>
- </windowController>
- <customObject id="Oky-zY-oP4" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
- </objects>
- <point key="canvasLocation" x="75" y="250"/>
- </scene>
- <!--View Controller-->
- <scene sceneID="hIz-AP-VOD">
- <objects>
- <viewController storyboardIdentifier="GLViewControllerID" id="XfG-lQ-9wD" customClass="ViewController" sceneMemberID="viewController">
- <view key="view" id="m2S-Jp-Qdl" userLabel="GL View" customClass="GLView">
- <rect key="frame" x="0.0" y="0.0" width="800" height="600"/>
- <autoresizingMask key="autoresizingMask"/>
- </view>
- </viewController>
- <customObject id="rPt-NT-nkU" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
- </objects>
- <point key="canvasLocation" x="75" y="655"/>
- </scene>
- <!--View Controller-->
- <scene sceneID="JAO-pz-Td3">
- <objects>
- <viewController storyboardIdentifier="MetalViewControllerID" id="VWH-wR-9QD" customClass="ViewController" sceneMemberID="viewController">
- <view key="view" id="0v6-SX-xCX" customClass="MetalView">
- <rect key="frame" x="0.0" y="0.0" width="800" height="600"/>
- <autoresizingMask key="autoresizingMask"/>
- </view>
- </viewController>
- <customObject id="CmR-bq-0b7" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
- </objects>
- </scene>
- <!--Mode Selection View Controller-->
- <scene sceneID="rTr-Qo-t8b">
- <objects>
- <viewController id="lYj-9Z-eqp" customClass="ModeSelectionViewController" sceneMemberID="viewController">
- <view key="view" autoresizesSubviews="NO" id="SPq-vc-rSb">
- <rect key="frame" x="0.0" y="0.0" width="350" height="255"/>
- <autoresizingMask key="autoresizingMask"/>
- <subviews>
- <button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="zEs-tf-G2z" userLabel="OpenGL">
- <rect key="frame" x="59" y="143" width="233" height="82"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
- <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="opengl-logo" imagePosition="only" alignment="center" borderStyle="border" imageScaling="proportionallyUpOrDown" inset="2" id="I5f-XW-9L1">
- <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
- <font key="font" metaFont="system"/>
- <connections>
- <action selector="goOpenGL:" target="lYj-9Z-eqp" id="Sg7-XX-Ktg"/>
- </connections>
- </buttonCell>
- </button>
- <button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="mhf-V7-TKz" userLabel="Vulkan">
- <rect key="frame" x="59" y="32" width="233" height="82"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
- <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="vulkan-logo" imagePosition="only" alignment="center" borderStyle="border" imageScaling="proportionallyUpOrDown" inset="2" id="PWi-41-bCy">
- <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
- <font key="font" metaFont="system"/>
- </buttonCell>
- <connections>
- <action selector="goVulkan:" target="lYj-9Z-eqp" id="Vj9-0Y-bjn"/>
- </connections>
- </button>
- </subviews>
- </view>
- </viewController>
- <customObject id="IGK-9x-tXY" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
- </objects>
- <point key="canvasLocation" x="171" y="1214"/>
- </scene>
- </scenes>
- <resources>
- <image name="opengl-logo" width="900" height="375"/>
- <image name="vulkan-logo" width="975" height="375"/>
- </resources>
-</document>
diff --git a/Common/NativeApp/Apple/Data/OSX/Images.xcassets/AppIcon.appiconset/dg.icns b/Common/NativeApp/Apple/Data/OSX/Images.xcassets/AppIcon.appiconset/dg.icns
deleted file mode 100644
index fddfdff..0000000
--- a/Common/NativeApp/Apple/Data/OSX/Images.xcassets/AppIcon.appiconset/dg.icns
+++ /dev/null
Binary files differ
diff --git a/Common/NativeApp/Apple/Data/OSX/Images.xcassets/opengl-logo.png b/Common/NativeApp/Apple/Data/OSX/Images.xcassets/opengl-logo.png
deleted file mode 100644
index 5d4a211..0000000
--- a/Common/NativeApp/Apple/Data/OSX/Images.xcassets/opengl-logo.png
+++ /dev/null
Binary files differ
diff --git a/Common/NativeApp/Apple/Data/OSX/Images.xcassets/vulkan-logo.png b/Common/NativeApp/Apple/Data/OSX/Images.xcassets/vulkan-logo.png
deleted file mode 100644
index 8a15b9e..0000000
--- a/Common/NativeApp/Apple/Data/OSX/Images.xcassets/vulkan-logo.png
+++ /dev/null
Binary files differ
diff --git a/Common/NativeApp/Apple/Data/OSX/Info.plist b/Common/NativeApp/Apple/Data/OSX/Info.plist
deleted file mode 100644
index c482b4a..0000000
--- a/Common/NativeApp/Apple/Data/OSX/Info.plist
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>en</string>
- <key>CFBundleExecutable</key>
- <string>$(EXECUTABLE_NAME)</string>
- <key>CFBundleIconFile</key>
- <string>dg.icns</string>
- <key>CFBundleIdentifier</key>
- <string></string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>$(PRODUCT_NAME)</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleShortVersionString</key>
- <string>2.4</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>LSMinimumSystemVersion</key>
- <string>$(MACOSX_DEPLOYMENT_TARGET)</string>
- <key>NSMainStoryboardFile</key>
- <string>Main</string>
- <key>NSPrincipalClass</key>
- <string>NSApplication</string>
-</dict>
-</plist>
diff --git a/Common/NativeApp/Apple/Data/iOS/Base.lproj/LaunchScreen.xib b/Common/NativeApp/Apple/Data/iOS/Base.lproj/LaunchScreen.xib
deleted file mode 100644
index 42589b0..0000000
--- a/Common/NativeApp/Apple/Data/iOS/Base.lproj/LaunchScreen.xib
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES">
- <device id="retina5_9" orientation="portrait">
- <adaptation id="fullscreen"/>
- </device>
- <dependencies>
- <deployment identifier="iOS"/>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
- <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
- </dependencies>
- <objects>
- <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
- <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
- <view contentMode="scaleToFill" id="iN0-l3-epB">
- <rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
- <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
- <subviews>
- <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text=" Copyright © 2015-2019 Diligent Graphics." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
- <rect key="frame" x="20" y="439" width="441" height="21"/>
- <fontDescription key="fontDescription" type="system" pointSize="17"/>
- <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
- <nil key="highlightedColor"/>
- </label>
- <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Diligent Engine" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
- <rect key="frame" x="20" y="140" width="441" height="43"/>
- <fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
- <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
- <nil key="highlightedColor"/>
- </label>
- </subviews>
- <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
- <constraints>
- <constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
- <constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
- <constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
- <constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
- <constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
- <constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
- </constraints>
- <nil key="simulatedStatusBarMetrics"/>
- <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
- <point key="canvasLocation" x="548" y="455"/>
- </view>
- </objects>
-</document>
diff --git a/Common/NativeApp/Apple/Data/iOS/Base.lproj/Main.storyboard b/Common/NativeApp/Apple/Data/iOS/Base.lproj/Main.storyboard
deleted file mode 100644
index 78a30e4..0000000
--- a/Common/NativeApp/Apple/Data/iOS/Base.lproj/Main.storyboard
+++ /dev/null
@@ -1,89 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="XIi-06-RrN">
- <device id="retina5_9" orientation="portrait">
- <adaptation id="fullscreen"/>
- </device>
- <dependencies>
- <deployment identifier="iOS"/>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
- <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
- </dependencies>
- <scenes>
- <!--Mode Selection View Controller-->
- <scene sceneID="zOR-Fi-Gze">
- <objects>
- <viewController id="XIi-06-RrN" customClass="ModeSelectionViewController" sceneMemberID="viewController">
- <layoutGuides>
- <viewControllerLayoutGuide type="top" id="xws-yS-Cpz"/>
- <viewControllerLayoutGuide type="bottom" id="eBA-xl-v26"/>
- </layoutGuides>
- <view key="view" contentMode="scaleToFill" id="bQn-Ig-dl7" customClass="BaseView">
- <rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
- <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
- <subviews>
- <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Exn-mx-E3B" userLabel="Vulkan">
- <rect key="frame" x="37" y="543" width="302" height="120"/>
- <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
- <state key="normal" title="Button" image="vulkan-logo.png"/>
- <connections>
- <action selector="goVulkan:" destination="XIi-06-RrN" eventType="touchUpInside" id="jsv-Uc-EF5"/>
- </connections>
- </button>
- <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="CtC-44-7bh" userLabel="OpenGLES">
- <rect key="frame" x="43" y="198" width="289" height="119"/>
- <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
- <state key="normal" title="Button" image="opengles-logo.png"/>
- <connections>
- <action selector="goOpenGLES:" destination="XIi-06-RrN" eventType="touchUpInside" id="Mad-GE-H0I"/>
- </connections>
- </button>
- </subviews>
- <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
- </view>
- </viewController>
- <placeholder placeholderIdentifier="IBFirstResponder" id="voS-RJ-rQF" userLabel="First Responder" sceneMemberID="firstResponder"/>
- </objects>
- <point key="canvasLocation" x="-1458.4000000000001" y="73.891625615763544"/>
- </scene>
- <!--Metal View Controller-->
- <scene sceneID="sxp-To-dZO">
- <objects>
- <viewController storyboardIdentifier="MetalViewControllerID" id="2n5-tG-bFt" userLabel="Metal View Controller" sceneMemberID="viewController">
- <layoutGuides>
- <viewControllerLayoutGuide type="top" id="X8x-0E-yac"/>
- <viewControllerLayoutGuide type="bottom" id="6Gz-x2-Owi"/>
- </layoutGuides>
- <view key="view" contentMode="scaleToFill" id="fUr-Le-qAJ" customClass="MetalView">
- <rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
- <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
- <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
- </view>
- </viewController>
- <placeholder placeholderIdentifier="IBFirstResponder" id="xSS-Vf-fsO" userLabel="First Responder" sceneMemberID="firstResponder"/>
- </objects>
- <point key="canvasLocation" x="-570" y="74"/>
- </scene>
- <!--EAGL View Controller-->
- <scene sceneID="tne-QT-ifu">
- <objects>
- <viewController storyboardIdentifier="EAGLViewControllerID" title="EAGL View Controller" id="BYZ-38-t0r" sceneMemberID="viewController">
- <layoutGuides>
- <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
- <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
- </layoutGuides>
- <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC" userLabel="EAGL View" customClass="EAGLView">
- <rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
- <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
- <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
- </view>
- </viewController>
- <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
- </objects>
- <point key="canvasLocation" x="214" y="74"/>
- </scene>
- </scenes>
- <resources>
- <image name="opengles-logo.png" width="1500" height="500"/>
- <image name="vulkan-logo.png" width="1300" height="500"/>
- </resources>
-</document>
diff --git a/Common/NativeApp/Apple/Data/iOS/Images.xcassets/AppIcon.appiconset/dg-icon.png b/Common/NativeApp/Apple/Data/iOS/Images.xcassets/AppIcon.appiconset/dg-icon.png
deleted file mode 100644
index c3f0b5e..0000000
--- a/Common/NativeApp/Apple/Data/iOS/Images.xcassets/AppIcon.appiconset/dg-icon.png
+++ /dev/null
Binary files differ
diff --git a/Common/NativeApp/Apple/Data/iOS/Images.xcassets/opengles-logo.png b/Common/NativeApp/Apple/Data/iOS/Images.xcassets/opengles-logo.png
deleted file mode 100755
index 88b6983..0000000
--- a/Common/NativeApp/Apple/Data/iOS/Images.xcassets/opengles-logo.png
+++ /dev/null
Binary files differ
diff --git a/Common/NativeApp/Apple/Data/iOS/Images.xcassets/vulkan-logo.png b/Common/NativeApp/Apple/Data/iOS/Images.xcassets/vulkan-logo.png
deleted file mode 100644
index 8a15b9e..0000000
--- a/Common/NativeApp/Apple/Data/iOS/Images.xcassets/vulkan-logo.png
+++ /dev/null
Binary files differ
diff --git a/Common/NativeApp/Apple/Data/iOS/info.plist b/Common/NativeApp/Apple/Data/iOS/info.plist
deleted file mode 100644
index 47629ab..0000000
--- a/Common/NativeApp/Apple/Data/iOS/info.plist
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>en</string>
- <key>CFBundleExecutable</key>
- <string>$(EXECUTABLE_NAME)</string>
- <key>CFBundleIdentifier</key>
- <string>com.diligentengine.sampleapp</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>$(PRODUCT_NAME)</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleShortVersionString</key>
- <string>2.4</string>
- <key>CFBundleVersion</key>
- <string>2.4</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleIconFile</key>
- <string>dg-icon.png</string>
- <key>LSRequiresIPhoneOS</key>
- <true/>
- <key>UILaunchStoryboardName</key>
- <string>LaunchScreen</string>
- <key>UIMainStoryboardFile</key>
- <string>Main</string>
- <key>UIRequiredDeviceCapabilities</key>
- <array>
- <string>armv7</string>
- </array>
- <key>UISupportedInterfaceOrientations</key>
- <array>
- <string>UIInterfaceOrientationPortrait</string>
- <string>UIInterfaceOrientationLandscapeLeft</string>
- <string>UIInterfaceOrientationLandscapeRight</string>
- </array>
- <key>UISupportedInterfaceOrientations~ipad</key>
- <array>
- <string>UIInterfaceOrientationPortrait</string>
- <string>UIInterfaceOrientationPortraitUpsideDown</string>
- <string>UIInterfaceOrientationLandscapeLeft</string>
- <string>UIInterfaceOrientationLandscapeRight</string>
- </array>
-</dict>
-</plist>
diff --git a/Common/NativeApp/Apple/LICENSE.txt b/Common/NativeApp/Apple/LICENSE.txt
deleted file mode 100644
index 73f0303..0000000
--- a/Common/NativeApp/Apple/LICENSE.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-Sample code project: GLEssentials
-Version: 3.0
-
-IMPORTANT: This Apple software is supplied to you by Apple
-Inc. ("Apple") in consideration of your agreement to the following
-terms, and your use, installation, modification or redistribution of
-this Apple software constitutes acceptance of these terms. If you do
-not agree with these terms, please do not use, install, modify or
-redistribute this Apple software.
-
-In consideration of your agreement to abide by the following terms, and
-subject to these terms, Apple grants you a personal, non-exclusive
-license, under Apple's copyrights in this original Apple software (the
-"Apple Software"), to use, reproduce, modify and redistribute the Apple
-Software, with or without modifications, in source and/or binary forms;
-provided that if you redistribute the Apple Software in its entirety and
-without modifications, you must retain this notice and the following
-text and disclaimers in all such redistributions of the Apple Software.
-Neither the name, trademarks, service marks or logos of Apple Inc. may
-be used to endorse or promote products derived from the Apple Software
-without specific prior written permission from Apple. Except as
-expressly stated in this notice, no other rights or licenses, express or
-implied, are granted by Apple herein, including but not limited to any
-patent rights that may be infringed by your derivative works or by other
-works in which the Apple Software may be incorporated.
-
-The Apple Software is provided by Apple on an "AS IS" basis. APPLE
-MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
-THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS
-FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND
-OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
-
-IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL
-OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,
-MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED
-AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
-STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
-
-Copyright (C) 2015 Apple Inc. All Rights Reserved.
diff --git a/Common/NativeApp/Apple/Source/Classes/OSX/AppDelegate.h b/Common/NativeApp/Apple/Source/Classes/OSX/AppDelegate.h
deleted file mode 100644
index d38403c..0000000
--- a/Common/NativeApp/Apple/Source/Classes/OSX/AppDelegate.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- Copyright (C) 2015 Apple Inc. All Rights Reserved.
- See LICENSE.txt for this sample’s licensing information
-
- Abstract:
- The Application Delegate.
- */
-
-#import <Cocoa/Cocoa.h>
-
-@interface AppDelegate : NSObject <NSApplicationDelegate>
-
-
-@end
-
diff --git a/Common/NativeApp/Apple/Source/Classes/OSX/AppDelegate.m b/Common/NativeApp/Apple/Source/Classes/OSX/AppDelegate.m
deleted file mode 100644
index fd52cc4..0000000
--- a/Common/NativeApp/Apple/Source/Classes/OSX/AppDelegate.m
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- Copyright (C) 2015 Apple Inc. All Rights Reserved.
- See LICENSE.txt for this sample’s licensing information
-
- Abstract:
- The Application Delegate.
- */
-
-#import "AppDelegate.h"
-
-@interface AppDelegate ()
-
-@end
-
-@implementation AppDelegate
-
-- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
- NSWindow* mainWindow = [[NSApplication sharedApplication]mainWindow];
- [mainWindow setAcceptsMouseMovedEvents:YES];
-}
-
-- (void)applicationWillTerminate:(NSNotification *)aNotification {
- // Insert code here to tear down your application
-}
-
-- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication {
- return YES;
-}
-
-@end
diff --git a/Common/NativeApp/Apple/Source/Classes/OSX/FullscreenWindow.h b/Common/NativeApp/Apple/Source/Classes/OSX/FullscreenWindow.h
deleted file mode 100644
index 2a61a51..0000000
--- a/Common/NativeApp/Apple/Source/Classes/OSX/FullscreenWindow.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- Copyright (C) 2015 Apple Inc. All Rights Reserved.
- See LICENSE.txt for this sample’s licensing information
-
- Abstract:
- Fullscreen window class.
- All logic here could have been done in the window controller except that, by default, borderless windows cannot be made key and input cannot go to them.
- Therefore, this class exists to override canBecomeKeyWindow allowing this borderless window to accept inputs.
- This class is not part of the NIB and entirely managed in code by the window controller.
- */
-#import <Cocoa/Cocoa.h>
-
-@interface FullscreenWindow : NSWindow
-
-@end
diff --git a/Common/NativeApp/Apple/Source/Classes/OSX/FullscreenWindow.m b/Common/NativeApp/Apple/Source/Classes/OSX/FullscreenWindow.m
deleted file mode 100644
index 69c9063..0000000
--- a/Common/NativeApp/Apple/Source/Classes/OSX/FullscreenWindow.m
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- Copyright (C) 2015 Apple Inc. All Rights Reserved.
- See LICENSE.txt for this sample’s licensing information
-
- Abstract:
- Fullscreen window class.
- All logic here could have been done in the window controller except that, by default, borderless windows cannot be made key and input cannot go to them.
- Therefore, this class exists to override canBecomeKeyWindow allowing this borderless window to accept inputs.
- This class is not part of the NIB and entirely managed in code by the window controller.
- */
-
-#import "FullscreenWindow.h"
-
-@implementation FullscreenWindow
-
--(instancetype)init
-{
- // Create a screen-sized window on the display you want to take over
- NSRect screenRect = [[NSScreen mainScreen] frame];
-
- // Initialize the window making it size of the screen and borderless
- self = [super initWithContentRect:screenRect
- styleMask:NSWindowStyleMaskBorderless
- backing:NSBackingStoreBuffered
- defer:YES];
-
- // Set the window level to be above the menu bar to cover everything else
- [self setLevel:NSMainMenuWindowLevel+1];
-
- // Set opaque
- [self setOpaque:YES];
-
- // Hide this when user switches to another window (or app)
- [self setHidesOnDeactivate:YES];
-
- return self;
-}
-
--(BOOL)canBecomeKeyWindow
-{
- // Return yes so that this borderless window can receive input
- return YES;
-}
-
-- (void)keyDown:(NSEvent *)event
-{
- // Implement keyDown since controller will not get [ESC] key event which
- // the controller uses to kill fullscreen
- [[self windowController] keyDown:event];
-}
-
-@end
diff --git a/Common/NativeApp/Apple/Source/Classes/OSX/GLView.h b/Common/NativeApp/Apple/Source/Classes/OSX/GLView.h
deleted file mode 100644
index 666305a..0000000
--- a/Common/NativeApp/Apple/Source/Classes/OSX/GLView.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- Copyright (C) 2015 Apple Inc. All Rights Reserved.
- See LICENSE.txt for this sample’s licensing information
-
- Abstract:
- OpenGL view subclass.
- */
-
-
-#import <Cocoa/Cocoa.h>
-#import "ViewBase.h"
-
-@interface GLView : ViewBase
-
-@end
diff --git a/Common/NativeApp/Apple/Source/Classes/OSX/GLView.m b/Common/NativeApp/Apple/Source/Classes/OSX/GLView.m
deleted file mode 100644
index 2e91b35..0000000
--- a/Common/NativeApp/Apple/Source/Classes/OSX/GLView.m
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- Copyright (C) 2015 Apple Inc. All Rights Reserved.
- See LICENSE.txt for this sample’s licensing information
-
- Abstract:
- OpenGL view subclass.
- */
-
-#include <memory>
-
-#import "GLView.h"
-
-@interface GLView ()
-{
- NSRect _viewRectPixels;
-}
-@end
-
-@implementation GLView
-
-
-- (CVReturn) getFrameForTime:(const CVTimeStamp*)outputTime
-{
- // There is no autorelease pool when this method is called
- // because it will be called from a background thread.
- // It's important to create one or app can leak objects.
- @autoreleasepool {
- [self drawView];
- }
- return kCVReturnSuccess;
-}
-
-// This is the renderer output callback function
-static CVReturn MyDisplayLinkCallback(CVDisplayLinkRef displayLink,
- const CVTimeStamp* now,
- const CVTimeStamp* outputTime,
- CVOptionFlags flagsIn,
- CVOptionFlags* flagsOut,
- void* displayLinkContext)
-{
- CVReturn result = [(__bridge GLView*)displayLinkContext getFrameForTime:outputTime];
- return result;
-}
-
-// Prepares the receiver for service after it has been loaded
-// from an Interface Builder archive, or nib file.
-- (void) awakeFromNib
-{
- [super awakeFromNib];
-
- NSOpenGLPixelFormatAttribute attrs[] =
- {
- NSOpenGLPFADoubleBuffer,
- NSOpenGLPFADepthSize, 24,
- NSOpenGLPFAOpenGLProfile,
- NSOpenGLProfileVersion4_1Core,
- 0
- };
-
- NSOpenGLPixelFormat *pf = [[NSOpenGLPixelFormat alloc] initWithAttributes:attrs];
-
- if (!pf)
- {
- NSLog(@"No OpenGL pixel format");
- }
-
- NSOpenGLContext* context = [[NSOpenGLContext alloc] initWithFormat:pf shareContext:nil];
-
-#if defined(DEBUG)
- // When we're using a CoreProfile context, crash if we call a legacy OpenGL function
- // This will make it much more obvious where and when such a function call is made so
- // that we can remove such calls.
- // Without this we'd simply get GL_INVALID_OPERATION error for calling legacy functions
- // but it would be more difficult to see where that function was called.
- CGLEnable([context CGLContextObj], kCGLCECrashOnRemovedFunctions);
-#endif
-
- [self setPixelFormat:pf];
-
- [self setOpenGLContext:context];
-
- // Opt-In to Retina resolution
- [self setWantsBestResolutionOpenGLSurface:YES];
-}
-
-- (void) prepareOpenGL
-{
- [super prepareOpenGL];
-
- // Application must be initialized befor display link is started
- [self initGL];
-
- CVDisplayLinkRef displayLink;
- // Create a display link capable of being used with all active displays
- CVDisplayLinkCreateWithActiveCGDisplays(&displayLink);
- [self setDisplayLink:displayLink];
-
- // Set the renderer output callback function
- CVDisplayLinkSetOutputCallback(displayLink, &MyDisplayLinkCallback, (__bridge void*)self);
-
- // Set the display link for the current renderer
- CGLContextObj cglContext = [[self openGLContext] CGLContextObj];
- CGLPixelFormatObj cglPixelFormat = [[self pixelFormat] CGLPixelFormatObj];
- CVDisplayLinkSetCurrentCGDisplayFromOpenGLContext(displayLink, cglContext, cglPixelFormat);
-
- // Activate the display link
- CVDisplayLinkStart(displayLink);
-}
-
-- (void) initGL
-{
- // The reshape function may have changed the thread to which our OpenGL
- // context is attached before prepareOpenGL and initGL are called. So call
- // makeCurrentContext to ensure that our OpenGL context current to this
- // thread (i.e. makeCurrentContext directs all OpenGL calls on this thread
- // to [self openGLContext])
- [[self openGLContext] makeCurrentContext];
-
- // Synchronize buffer swaps with vertical refresh rate
- GLint swapInt = 1;
- [[self openGLContext] setValues:&swapInt forParameter:NSOpenGLCPSwapInterval];
-
- // Init the application.
- [self initApp:nil];
-}
-
-- (void)reshape
-{
- [super reshape];
-
- // We draw on a secondary thread through the display link. However, when
- // resizing the view, -drawRect is called on the main thread.
- // Add a mutex around to avoid the threads accessing the context
- // simultaneously when resizing.
- CGLLockContext([[self openGLContext] CGLContextObj]);
-
- // Get the view size in Points
- NSRect viewRectPoints = [self bounds];
-
- // Rendering at retina resolutions will reduce aliasing, but at the potential
- // cost of framerate and battery life due to the GPU needing to render more
- // pixels.
-
- // Any calculations the renderer does which use pixel dimentions, must be
- // in "retina" space. [NSView convertRectToBacking] converts point sizes
- // to pixel sizes. Thus the renderer gets the size in pixels, not points,
- // so that it can set it's viewport and perform and other pixel based
- // calculations appropriately.
- // viewRectPixels will be larger than viewRectPoints for retina displays.
- // viewRectPixels will be the same as viewRectPoints for non-retina displays
- _viewRectPixels = [self convertRectToBacking:viewRectPoints];
-
- // Set the new dimensions in our renderer
- auto* theApp = [self lockApp];
- if(theApp)
- {
- theApp->WindowResize(_viewRectPixels.size.width, _viewRectPixels.size.height);
- }
- [self unlockApp];
-
- CGLUnlockContext([[self openGLContext] CGLContextObj]);
-}
-
-
-- (void)renewGState
-{
- // Called whenever graphics state updated (such as window resize)
-
- // OpenGL rendering is not synchronous with other rendering on the OSX.
- // Therefore, call disableScreenUpdatesUntilFlush so the window server
- // doesn't render non-OpenGL content in the window asynchronously from
- // OpenGL content, which could cause flickering. (non-OpenGL content
- // includes the title bar and drawing done by the app with other APIs)
- [[self window] disableScreenUpdatesUntilFlush];
-
- [super renewGState];
-}
-
-- (void) drawRect: (NSRect) theRect
-{
- // Called during resize operations
-
- // Avoid flickering during resize by drawing
- [self drawView];
-}
-
-- (void) drawView
-{
- auto* glContext = [self openGLContext];
-
- [glContext makeCurrentContext];
-
- // We draw on a secondary thread through the display link
- // When resizing the view, -reshape is called automatically on the main
- // thread. Add a mutex around to avoid the threads accessing the context
- // simultaneously when resizing
- CGLLockContext([glContext CGLContextObj]);
-
- auto* theApp = [self lockApp];
- if(theApp)
- {
- theApp->Update();
- theApp->Render();
- }
- [self unlockApp];
-
- CGLFlushDrawable([glContext CGLContextObj]);
- CGLUnlockContext([glContext CGLContextObj]);
-}
-
-@end
diff --git a/Common/NativeApp/Apple/Source/Classes/OSX/MetalView.h b/Common/NativeApp/Apple/Source/Classes/OSX/MetalView.h
deleted file mode 100644
index d9b6a7a..0000000
--- a/Common/NativeApp/Apple/Source/Classes/OSX/MetalView.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Copyright 2015-2019 Egor Yusov
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF ANY PROPRIETARY RIGHTS.
- *
- * In no event and under no legal theory, whether in tort (including negligence),
- * contract, or otherwise, unless required by applicable law (such as deliberate
- * and grossly negligent acts) or agreed to in writing, shall any Contributor be
- * liable for any damages, including any direct, indirect, special, incidental,
- * or consequential damages of any character arising as a result of this License or
- * out of the use or inability to use the software (including but not limited to damages
- * for loss of goodwill, work stoppage, computer failure or malfunction, or any and
- * all other commercial damages or losses), even if such Contributor has been advised
- * of the possibility of such damages.
- */
-
-#import <AppKit/AppKit.h>
-
-#include "ViewBase.h"
-
-@interface MetalView : ViewBase
-
-@end
diff --git a/Common/NativeApp/Apple/Source/Classes/OSX/MetalView.m b/Common/NativeApp/Apple/Source/Classes/OSX/MetalView.m
deleted file mode 100644
index 5d4a7dd..0000000
--- a/Common/NativeApp/Apple/Source/Classes/OSX/MetalView.m
+++ /dev/null
@@ -1,139 +0,0 @@
-/* Copyright 2015-2019 Egor Yusov
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF ANY PROPRIETARY RIGHTS.
- *
- * In no event and under no legal theory, whether in tort (including negligence),
- * contract, or otherwise, unless required by applicable law (such as deliberate
- * and grossly negligent acts) or agreed to in writing, shall any Contributor be
- * liable for any damages, including any direct, indirect, special, incidental,
- * or consequential damages of any character arising as a result of this License or
- * out of the use or inability to use the software (including but not limited to damages
- * for loss of goodwill, work stoppage, computer failure or malfunction, or any and
- * all other commercial damages or losses), even if such Contributor has been advised
- * of the possibility of such damages.
- */
-
-#import <QuartzCore/CAMetalLayer.h>
-#import "MetalView.h"
-
-@implementation MetalView
-{
-}
-
-- (void) awakeFromNib
-{
- [super awakeFromNib];
-
- // Back the view with a layer created by the makeBackingLayer method.
- self.wantsLayer = YES;
-
- [self initApp:self];
-
- CVDisplayLinkRef displayLink;
- CVDisplayLinkCreateWithActiveCGDisplays(&displayLink);
- [self setDisplayLink:displayLink];
- CVDisplayLinkSetOutputCallback(displayLink, &DisplayLinkCallback, (__bridge void*)self);
- CVDisplayLinkStart(displayLink);
-
- [self setPostsBoundsChangedNotifications:YES];
- [self setPostsFrameChangedNotifications:YES];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(boundsDidChange:) name:NSViewBoundsDidChangeNotification object:self];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(boundsDidChange:) name:NSViewFrameDidChangeNotification object:self];
-}
-
-// Indicates that the view wants to draw using the backing
-// layer instead of using drawRect:.
--(BOOL) wantsUpdateLayer
-{
- return YES;
-}
-
-// Returns a Metal-compatible layer.
-+(Class) layerClass
-{
- return [CAMetalLayer class];
-}
-
-// If the wantsLayer property is set to YES, this method will
-// be invoked to return a layer instance.
--(CALayer*) makeBackingLayer
-{
- CALayer* layer = [self.class.layerClass layer];
- CGSize viewScale = [self convertSizeToBacking: CGSizeMake(1.0, 1.0)];
- layer.contentsScale = MIN(viewScale.width, viewScale.height);
- return layer;
-}
-
--(void)render
-{
- auto* theApp = [self lockApp];
- if (theApp)
- {
- theApp->Update();
- theApp->Render();
- theApp->Present();
- }
- [self unlockApp];
-}
-
-
-- (CVReturn) getFrameForTime:(const CVTimeStamp*)outputTime
-{
- // There is no autorelease pool when this method is called
- // because it will be called from a background thread.
- // It's important to create one or app can leak objects.
- @autoreleasepool {
- [self render];
- }
- return kCVReturnSuccess;
-}
-
-// Rendering loop callback function for use with a CVDisplayLink.
-static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink,
- const CVTimeStamp* now,
- const CVTimeStamp* outputTime,
- CVOptionFlags flagsIn,
- CVOptionFlags* flagsOut,
- void* target)
-{
- MetalView* view = (__bridge MetalView*)target;
- CVReturn result = [view getFrameForTime:outputTime];
- return result;
-}
-
--(void)boundsDidChange:(NSNotification *)notification
-{
- // It is not clear what the proper way to handle window resize is.
- // Cube demo from MoltenVK ignores any window resize notifications and
- // recreates the swap chain if Present or AcquireNextImage fails, causing
- // jagged transitions.
-
- // According to this thread, there is no solution for flickering during
- // resize in Metal:
- // https://forums.developer.apple.com/thread/77901
-
- // Calling WindowResize() causes flickering.
- // Even if [self render] is called ater WindowResize()
- // Similar results when using Metal kit view
- // Calling [self render] alone produces jagged transitions but no flickering.
- // Calling nothing causes the app to crash during resize.
-
- NSRect viewRectPoints = [self bounds];
- NSRect viewRectPixels = [self convertRectToBacking:viewRectPoints];
- auto* theApp = [self lockApp];
- if (theApp)
- {
- theApp->WindowResize(viewRectPixels.size.width, viewRectPixels.size.height);
- }
- [self unlockApp];
-}
-
-@end
diff --git a/Common/NativeApp/Apple/Source/Classes/OSX/ModeSelectionViewController.h b/Common/NativeApp/Apple/Source/Classes/OSX/ModeSelectionViewController.h
deleted file mode 100644
index 895123b..0000000
--- a/Common/NativeApp/Apple/Source/Classes/OSX/ModeSelectionViewController.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Copyright 2015-2019 Egor Yusov
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF ANY PROPRIETARY RIGHTS.
- *
- * In no event and under no legal theory, whether in tort (including negligence),
- * contract, or otherwise, unless required by applicable law (such as deliberate
- * and grossly negligent acts) or agreed to in writing, shall any Contributor be
- * liable for any damages, including any direct, indirect, special, incidental,
- * or consequential damages of any character arising as a result of this License or
- * out of the use or inability to use the software (including but not limited to damages
- * for loss of goodwill, work stoppage, computer failure or malfunction, or any and
- * all other commercial damages or losses), even if such Contributor has been advised
- * of the possibility of such damages.
- */
-
-
-#import <AppKit/AppKit.h>
-
-@interface ModeSelectionViewController : NSViewController
-{
-}
-@end
diff --git a/Common/NativeApp/Apple/Source/Classes/OSX/ModeSelectionViewController.mm b/Common/NativeApp/Apple/Source/Classes/OSX/ModeSelectionViewController.mm
deleted file mode 100644
index 3bd4dbe..0000000
--- a/Common/NativeApp/Apple/Source/Classes/OSX/ModeSelectionViewController.mm
+++ /dev/null
@@ -1,83 +0,0 @@
-/* Copyright 2015-2019 Egor Yusov
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF ANY PROPRIETARY RIGHTS.
- *
- * In no event and under no legal theory, whether in tort (including negligence),
- * contract, or otherwise, unless required by applicable law (such as deliberate
- * and grossly negligent acts) or agreed to in writing, shall any Contributor be
- * liable for any damages, including any direct, indirect, special, incidental,
- * or consequential damages of any character arising as a result of this License or
- * out of the use or inability to use the software (including but not limited to damages
- * for loss of goodwill, work stoppage, computer failure or malfunction, or any and
- * all other commercial damages or losses), even if such Contributor has been advised
- * of the possibility of such damages.
- */
-
-#import "ModeSelectionViewController.h"
-#import "GLView.h"
-#import "MetalView.h"
-#import "ViewController.h"
-
-
-@implementation ModeSelectionViewController
-{
-}
-
-- (void) setWindowTitle:(NSString*) title
-{
- NSWindow* mainWindow = [[NSApplication sharedApplication]mainWindow];
- [mainWindow setTitle:title];
-}
-
-- (void) terminateApp:(NSString*) error
-{
- NSAlert *alert = [[NSAlert alloc] init];
- [alert addButtonWithTitle:@"OK"];
- [alert setMessageText:@"Failed to start the application"];
- [alert setInformativeText:error];
- [alert setAlertStyle:NSAlertStyleCritical];
- [alert runModal];
- [NSApp terminate:self];
-}
-
-- (IBAction)goOpenGL:(id)sender
-{
- ViewController* glViewController = [self.storyboard instantiateControllerWithIdentifier:@"GLViewControllerID"];
- self.view.window.contentViewController = glViewController;
-
- GLView* glView = (GLView*)[glViewController view];
- NSString* error = [glView getError];
- if(error != nil)
- {
- [self terminateApp:error];
- }
-
- NSString* name = [glView getAppName];
- [self setWindowTitle:name];
-}
-
-- (IBAction)goVulkan:(id)sender
-{
- ViewController* metalViewController = [self.storyboard instantiateControllerWithIdentifier:@"MetalViewControllerID"];
- self.view.window.contentViewController = metalViewController;
-
- MetalView* mtlView = (MetalView*)[metalViewController view];
- NSString* error = [mtlView getError];
- if(error != nil)
- {
- [self terminateApp:error];
- }
-
- NSString* name = [mtlView getAppName];
- [self setWindowTitle:name];
-}
-
-@end
diff --git a/Common/NativeApp/Apple/Source/Classes/OSX/ViewBase.h b/Common/NativeApp/Apple/Source/Classes/OSX/ViewBase.h
deleted file mode 100644
index d3084dd..0000000
--- a/Common/NativeApp/Apple/Source/Classes/OSX/ViewBase.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Copyright 2015-2019 Egor Yusov
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF ANY PROPRIETARY RIGHTS.
- *
- * In no event and under no legal theory, whether in tort (including negligence),
- * contract, or otherwise, unless required by applicable law (such as deliberate
- * and grossly negligent acts) or agreed to in writing, shall any Contributor be
- * liable for any damages, including any direct, indirect, special, incidental,
- * or consequential damages of any character arising as a result of this License or
- * out of the use or inability to use the software (including but not limited to damages
- * for loss of goodwill, work stoppage, computer failure or malfunction, or any and
- * all other commercial damages or losses), even if such Contributor has been advised
- * of the possibility of such damages.
- */
-
-#include "NativeAppBase.h"
-
-#import <AppKit/AppKit.h>
-#import <QuartzCore/CVDisplayLink.h>
-#import <Cocoa/Cocoa.h>
-
-@interface ViewBase : NSOpenGLView
-
-@property CVDisplayLinkRef displayLink;
-
--(void)initApp:(NSView*) view;
--(void)destroyApp;
--(NSString*)getError;
--(Diligent::NativeAppBase*)lockApp;
--(void)unlockApp;
--(void)stopDisplayLink;
--(void)startDisplayLink;
--(NSString*)getAppName;
-
-@end
diff --git a/Common/NativeApp/Apple/Source/Classes/OSX/ViewBase.m b/Common/NativeApp/Apple/Source/Classes/OSX/ViewBase.m
deleted file mode 100644
index b73a5eb..0000000
--- a/Common/NativeApp/Apple/Source/Classes/OSX/ViewBase.m
+++ /dev/null
@@ -1,147 +0,0 @@
-/* Copyright 2015-2019 Egor Yusov
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF ANY PROPRIETARY RIGHTS.
- *
- * In no event and under no legal theory, whether in tort (including negligence),
- * contract, or otherwise, unless required by applicable law (such as deliberate
- * and grossly negligent acts) or agreed to in writing, shall any Contributor be
- * liable for any damages, including any direct, indirect, special, incidental,
- * or consequential damages of any character arising as a result of this License or
- * out of the use or inability to use the software (including but not limited to damages
- * for loss of goodwill, work stoppage, computer failure or malfunction, or any and
- * all other commercial damages or losses), even if such Contributor has been advised
- * of the possibility of such damages.
- */
-
-#include <memory>
-#include <string>
-
-#import "ViewBase.h"
-
-@implementation ViewBase
-{
- std::unique_ptr<Diligent::NativeAppBase> _theApp;
- std::string _error;
- NSRecursiveLock* appLock;
-}
-
-@synthesize displayLink;
-
-// Prepares the receiver for service after it has been loaded
-// from an Interface Builder archive, or nib file.
-- (void) awakeFromNib
-{
- [super awakeFromNib];
-
- _theApp.reset(Diligent::CreateApplication());
-
- // [self window] is nil here
- auto* mainWindow = [[NSApplication sharedApplication] mainWindow];
- // Register to be notified when the main window closes so we can stop the displaylink
- [[NSNotificationCenter defaultCenter] addObserver:self
- selector:@selector(windowWillClose:)
- name:NSWindowWillCloseNotification
- object:mainWindow];
- mainWindow.minSize = NSSize{320, 240};
-}
-
--(void)initApp:(NSView*) view
-{
- // Init the application.
- try
- {
- _theApp->Initialize(view);
- }
- catch(std::runtime_error &err)
- {
- _error = err.what();
- _theApp.reset();
- }
-}
-
--(Diligent::NativeAppBase*)lockApp
-{
- [appLock lock];
- return _theApp.get();
-}
-
--(void)unlockApp
-{
- [appLock unlock];
-}
-
-- (BOOL)acceptsFirstResponder
-{
- return YES; // To make keyboard events work
-}
-
--(void)destroyApp
-{
- // Stop the display link BEFORE releasing anything in the view
- // otherwise the display link thread may call into the view and crash
- // when it encounters something that has been released
- if (displayLink)
- {
- CVDisplayLinkStop(displayLink);
- }
-
- [appLock lock];
- _theApp.reset();
- [appLock unlock];
-}
-
--(void) dealloc
-{
- [self destroyApp];
-
- CVDisplayLinkRelease(displayLink);
-
- [appLock release];
-
- [super dealloc];
-}
-
--(NSString*)getError
-{
- return _error.empty() ? nil : [NSString stringWithFormat:@"%s", _error.c_str()];
-}
-
-
-- (void)stopDisplayLink
-{
- if (displayLink)
- {
- CVDisplayLinkStop(displayLink);
- }
-}
-
-- (void)startDisplayLink
-{
- if (displayLink)
- {
- CVDisplayLinkStart(displayLink);
- }
-}
-
-- (void) windowWillClose:(NSNotification*)notification
-{
- [self destroyApp];
-}
-
--(NSString*)getAppName
-{
- auto* theApp = [self lockApp];
- auto Title = [NSString stringWithFormat:@"%s", theApp ? theApp->GetAppTitle() : ""];
- [self unlockApp];
- return Title;
-}
-
-@end
diff --git a/Common/NativeApp/Apple/Source/Classes/OSX/ViewController.h b/Common/NativeApp/Apple/Source/Classes/OSX/ViewController.h
deleted file mode 100644
index a8e4685..0000000
--- a/Common/NativeApp/Apple/Source/Classes/OSX/ViewController.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Copyright 2015-2019 Egor Yusov
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF ANY PROPRIETARY RIGHTS.
- *
- * In no event and under no legal theory, whether in tort (including negligence),
- * contract, or otherwise, unless required by applicable law (such as deliberate
- * and grossly negligent acts) or agreed to in writing, shall any Contributor be
- * liable for any damages, including any direct, indirect, special, incidental,
- * or consequential damages of any character arising as a result of this License or
- * out of the use or inability to use the software (including but not limited to damages
- * for loss of goodwill, work stoppage, computer failure or malfunction, or any and
- * all other commercial damages or losses), even if such Contributor has been advised
- * of the possibility of such damages.
- */
-
-
-#import <AppKit/AppKit.h>
-#include "NativeAppBase.h"
-
-@interface ViewController : NSViewController
-
-@end
diff --git a/Common/NativeApp/Apple/Source/Classes/OSX/ViewController.mm b/Common/NativeApp/Apple/Source/Classes/OSX/ViewController.mm
deleted file mode 100644
index 1a6611c..0000000
--- a/Common/NativeApp/Apple/Source/Classes/OSX/ViewController.mm
+++ /dev/null
@@ -1,116 +0,0 @@
-/* Copyright 2015-2019 Egor Yusov
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF ANY PROPRIETARY RIGHTS.
- *
- * In no event and under no legal theory, whether in tort (including negligence),
- * contract, or otherwise, unless required by applicable law (such as deliberate
- * and grossly negligent acts) or agreed to in writing, shall any Contributor be
- * liable for any damages, including any direct, indirect, special, incidental,
- * or consequential damages of any character arising as a result of this License or
- * out of the use or inability to use the software (including but not limited to damages
- * for loss of goodwill, work stoppage, computer failure or malfunction, or any and
- * all other commercial damages or losses), even if such Contributor has been advised
- * of the possibility of such damages.
- */
-
-#import "ViewController.h"
-#import "ViewBase.h"
-
-@implementation ViewController
-
-- (void)viewDidLoad
-{
- [super viewDidLoad];
-
- // Add a tracking area in order to receive mouse events whenever the mouse is within the bounds of our view
- NSTrackingArea *trackingArea = [[NSTrackingArea alloc] initWithRect:NSZeroRect
- options:NSTrackingMouseMoved | NSTrackingInVisibleRect | NSTrackingActiveAlways
- owner:self
- userInfo:nil];
- [self.view addTrackingArea:trackingArea];
-}
-
-- (void)handleEvent : (NSEvent *)theEvent {
- auto* view = (ViewBase*)self.view;
- auto* theApp = [view lockApp];
- if(theApp){
- theApp->HandleOSXEvent(theEvent, view);
- }
- [view unlockApp];
-}
-
-
-- (void)mouseDown:(NSEvent *)theEvent {
- [self handleEvent:theEvent];
-}
-
-- (void)mouseUp:(NSEvent *)theEvent {
- [self handleEvent:theEvent];
-}
-
-- (void)rightMouseDown:(NSEvent *)theEvent {
- [self handleEvent:theEvent];
-}
-
-- (void)rightMouseUp:(NSEvent *)theEvent {
- [self handleEvent:theEvent];
-}
-
-- (void)mouseMoved:(NSEvent *)theEvent {
- [self handleEvent:theEvent];
-}
-
-- (void)mouseDragged:(NSEvent *)theEvent {
- [self handleEvent:theEvent];
-}
-
-- (void)rightMouseDragged:(NSEvent *)theEvent {
- [self handleEvent:theEvent];
-}
-
-- (void)keyEvent:(NSEvent *)theEvent isKeyPressed:(bool)keyPressed
-{
- [self handleEvent:theEvent];
-}
-
-- (void)keyDown:(NSEvent *)theEvent
-{
- [self handleEvent:theEvent];
-
- [super keyDown:theEvent];
-}
-
-- (void)keyUp:(NSEvent *)theEvent
-{
- [self handleEvent:theEvent];
-
- [super keyUp:theEvent];
-}
-
-// Informs the receiver that the user has pressed or released a
-// modifier key (Shift, Control, and so on)
-- (void)flagsChanged:(NSEvent *)event
-{
- [self handleEvent:event];
-
- [super flagsChanged:event];
-}
-
-- (void)scrollWheel:(NSEvent *)event
-{
- [self handleEvent:event];
-}
-
-- (BOOL)acceptsFirstResponder {
- return YES;
-}
-
-@end
diff --git a/Common/NativeApp/Apple/Source/Classes/OSX/WindowController.h b/Common/NativeApp/Apple/Source/Classes/OSX/WindowController.h
deleted file mode 100644
index 1d9203b..0000000
--- a/Common/NativeApp/Apple/Source/Classes/OSX/WindowController.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- Copyright (C) 2015 Apple Inc. All Rights Reserved.
- See LICENSE.txt for this sample’s licensing information
-
- Abstract:
- Window controller subclass.
- */
-
-
-#import <Cocoa/Cocoa.h>
-
-@interface WindowController : NSWindowController
-
-@end
diff --git a/Common/NativeApp/Apple/Source/Classes/OSX/WindowController.m b/Common/NativeApp/Apple/Source/Classes/OSX/WindowController.m
deleted file mode 100644
index e3f7923..0000000
--- a/Common/NativeApp/Apple/Source/Classes/OSX/WindowController.m
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- Copyright (C) 2015 Apple Inc. All Rights Reserved.
- See LICENSE.txt for this sample’s licensing information
-
- Abstract:
- Window controller subclass.
- */
-
-#import "WindowController.h"
-#import "FullscreenWindow.h"
-#import "ViewBase.h"
-
-@interface WindowController ()
-
-// Fullscreen window
-@property(strong) FullscreenWindow *fullscreenWindow;
-
-// Non-Fullscreen window (also the initial window)
-@property(strong) NSWindow* standardWindow;
-
-@end
-
-@implementation WindowController
-{
- bool CommandKeyPressed;
-}
-
-- (instancetype)initWithWindow:(NSWindow *)window
-{
- self = [super initWithWindow:window];
-
- if (self)
- {
- // Initialize to nil since it indicates app is not fullscreen
- _fullscreenWindow = nil;
- }
-
- CommandKeyPressed = false;
-
- return self;
-}
-
-- (void) goFullscreen
-{
- // If app is already fullscreen...
- if([self fullscreenWindow])
- {
- //...don't do anything
- return;
- }
-
- ViewBase* view = (ViewBase*)self.window.contentView;
-
- // We must stop the display link while
- // switching the windows to make sure
- // that render commands are not issued
- // from another thread
- [view stopDisplayLink];
-
- // Allocate a new fullscreen window
- [self setFullscreenWindow: [[FullscreenWindow alloc] init]];
-
- [[self fullscreenWindow] setAcceptsMouseMovedEvents:YES];
-
- // Resize the view to screensize
- NSRect viewRect = [[self fullscreenWindow] frame];
-
- // Set the view to the size of the fullscreen window
- [self.window.contentView setFrameSize: viewRect.size];
-
- // Set the view in the fullscreen window
- [[self fullscreenWindow] setContentView:self.window.contentView];
-
- [self setStandardWindow:[self window]];
-
- // Hide non-fullscreen window so it doesn't show up when switching out
- // of this app (i.e. with CMD-TAB)
- [[self standardWindow] orderOut:self];
-
- // Set controller to the fullscreen window so that all input will go to
- // this controller (self)
- [self setWindow:[self fullscreenWindow]];
-
- // Show the window and make it the key window for input
- [[self fullscreenWindow] makeKeyAndOrderFront:self];
-
- // Restore display link
- [view startDisplayLink];
-}
-
-- (void) goWindow
-{
- // If controller doesn't have a full screen window...
- if([self fullscreenWindow] == nil)
- {
- //...app is already windowed so don't do anything
- return;
- }
-
- ViewBase* view = (ViewBase*)self.window.contentView;
-
- // We must stop the display link while
- // switching the windows to make sure
- // that render commands are not issued
- // from another thread
- [view stopDisplayLink];
-
- // Get the rectangle of the original window
- NSRect viewRect = [[self standardWindow] frame];
-
- // Set the view rect to the new size
- [self.window.contentView setFrame:viewRect];
-
- // Hide fullscreen window
- [[self fullscreenWindow] orderOut:self];
-
- // Set controller to the standard window so that all input will go to
- // this controller (self)
- [self setWindow:[self standardWindow]];
-
- // Set the content of the orginal window to the view
- [[self window] setContentView: [self fullscreenWindow].contentView];
-
- // Show the window and make it the key window for input
- [[self window] makeKeyAndOrderFront:self];
-
- // Ensure we set fullscreen Window to nil so our checks for
- // windowed vs. fullscreen mode elsewhere are correct
- [self setFullscreenWindow: nil];
-
- // Restore display link
- [view startDisplayLink];
-}
-
-
-- (void) keyDown:(NSEvent *)event
-{
- unichar c = [[event charactersIgnoringModifiers] characterAtIndex:0];
-
- switch (c)
- {
- // Handle [ESC] key
- case 27:
- if([self fullscreenWindow] != nil)
- {
- [self goWindow];
- }
- return;
-
- // Have Command+f or Command+Enter toggle fullscreen
- case 13:
- case 'f':
- if (CommandKeyPressed)
- {
- if([self fullscreenWindow] == nil)
- {
- [self goFullscreen];
- }
- else
- {
- [self goWindow];
- }
- }
- return;
- }
-
- // Allow other character to be handled (or not and beep)
- //[super keyDown:event];
-}
-
-// Informs the receiver that the user has pressed or released a
-// modifier key (Shift, Control, and so on)
-- (void)flagsChanged:(NSEvent *)event
-{
- auto modifierFlags = [event modifierFlags];
- CommandKeyPressed = modifierFlags & NSEventModifierFlagCommand;
-
- [super flagsChanged:event];
-}
-
-@end
diff --git a/Common/NativeApp/Apple/Source/Classes/iOS/AppDelegate.h b/Common/NativeApp/Apple/Source/Classes/iOS/AppDelegate.h
deleted file mode 100644
index 3839faa..0000000
--- a/Common/NativeApp/Apple/Source/Classes/iOS/AppDelegate.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- Copyright (C) 2015 Apple Inc. All Rights Reserved.
- See LICENSE.txt for this sample’s licensing information
-
- Abstract:
- The application delegate
- */
-
-
-#import <UIKit/UIKit.h>
-
-@interface AppDelegate : NSObject <UIApplicationDelegate> {
-}
-
-@property (nonatomic, retain) UIWindow *window;
-
-@end
-
diff --git a/Common/NativeApp/Apple/Source/Classes/iOS/AppDelegate.m b/Common/NativeApp/Apple/Source/Classes/iOS/AppDelegate.m
deleted file mode 100644
index 5e1745c..0000000
--- a/Common/NativeApp/Apple/Source/Classes/iOS/AppDelegate.m
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- Copyright (C) 2015 Apple Inc. All Rights Reserved.
- See LICENSE.txt for this sample’s licensing information
-
- Abstract:
- The application delegate
-*/
-
-#import "AppDelegate.h"
-#import "BaseView.h"
-
-@implementation AppDelegate
-
-#pragma mark -
-#pragma mark Application lifecycle
-
-- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
-{
- // Override point for customization after application launch.
-
- [self.window makeKeyAndVisible];
-
- [(BaseView*)self.window.rootViewController.view startAnimation];
-
- return YES;
-}
-
-
-- (void)applicationWillResignActive:(UIApplication *)application
-{
- /*
- Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
- Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
- */
-
- [(BaseView*)self.window.rootViewController.view stopAnimation];
-}
-
-
-- (void)applicationDidEnterBackground:(UIApplication *)application {
- /*
- Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
- If your application supports background execution, called instead of applicationWillTerminate: when the user quits.
- */
-
- [(BaseView*)self.window.rootViewController.view stopAnimation];
-}
-
-
-- (void)applicationWillEnterForeground:(UIApplication *)application {
- /*
- Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background.
- */
-
- [(BaseView*)self.window.rootViewController.view startAnimation];
-}
-
-
-- (void)applicationDidBecomeActive:(UIApplication *)application
-{
- /*
- Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
- */
-
- [(BaseView*)self.window.rootViewController.view startAnimation];
-}
-
-
-- (void)applicationWillTerminate:(UIApplication *)application {
- /*
- Called when the application is about to terminate.
- See also applicationDidEnterBackground:.
- */
-
- [(BaseView*)self.window.rootViewController.view stopAnimation];
- [(BaseView*)self.window.rootViewController.view terminate];
-}
-
-
-#pragma mark -
-#pragma mark Memory management
-
-- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application {
- /*
- Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later.
- */
-}
-
-@end
diff --git a/Common/NativeApp/Apple/Source/Classes/iOS/AppViewBase.h b/Common/NativeApp/Apple/Source/Classes/iOS/AppViewBase.h
deleted file mode 100644
index e6273e9..0000000
--- a/Common/NativeApp/Apple/Source/Classes/iOS/AppViewBase.h
+++ /dev/null
@@ -1,16 +0,0 @@
-
-#import <UIKit/UIKit.h>
-#import "BaseView.h"
-
-@interface AppViewBase : BaseView
-
-@property (nonatomic) NSInteger animationFrameInterval;
-
-- (void) initApp:(int)deviceType;
-- (void) startAnimation;
-- (void) stopAnimation;
-- (void) terminate;
-- (void) render;
-- (NSString*)getError;
-
-@end
diff --git a/Common/NativeApp/Apple/Source/Classes/iOS/AppViewBase.m b/Common/NativeApp/Apple/Source/Classes/iOS/AppViewBase.m
deleted file mode 100644
index e7d4c57..0000000
--- a/Common/NativeApp/Apple/Source/Classes/iOS/AppViewBase.m
+++ /dev/null
@@ -1,166 +0,0 @@
-
-#import "AppViewBase.h"
-
-#include "NativeAppBase.h"
-#include <memory>
-#include <string>
-
-@interface AppViewBase ()
-{
- std::unique_ptr<Diligent::NativeAppBase> _theApp;
- NSInteger _animationFrameInterval;
- CADisplayLink* _displayLink;
- std::string _error;
-}
-@end
-
-@implementation AppViewBase
-
-- (void) initApp:(int)deviceType;
-{
- try
- {
- _theApp.reset(Diligent::CreateApplication());
- // Init our renderer.
- _theApp->Initialize(deviceType, (__bridge void*)self.layer);
- }
- catch(std::runtime_error &err)
- {
- _error = err.what();
- _theApp.reset();
- }
-
- [super stopAnimation];
- _animationFrameInterval = 1;
- _displayLink = nil;
-}
-
-- (void) render
-{
- if(_theApp)
- {
- _theApp->Update();
- _theApp->Render();
- _theApp->Present();
- }
-}
-
-- (void) layoutSubviews
-{
- auto bounds = [self.layer bounds];
- auto scale = [self.layer contentsScale];
-
- if(_theApp)
- {
- _theApp->WindowResize(bounds.size.width * scale, bounds.size.height * scale);
- }
-}
-
-- (NSInteger) animationFrameInterval
-{
- return _animationFrameInterval;
-}
-
-- (void) setAnimationFrameInterval:(NSInteger)frameInterval
-{
- // Frame interval defines how many display frames must pass between each time the
- // display link fires. The display link will only fire 30 times a second when the
- // frame internal is two on a display that refreshes 60 times a second. The default
- // frame interval setting of one will fire 60 times a second when the display refreshes
- // at 60 times a second. A frame interval setting of less than one results in undefined
- // behavior.
- if (frameInterval >= 1)
- {
- _animationFrameInterval = frameInterval;
-
- if (self.animating)
- {
- [self stopAnimation];
- [self startAnimation];
- }
- }
-}
-
-- (void) startAnimation
-{
- if (!self.animating)
- {
- // Create the display link and set the callback to our drawView method
- _displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(drawView:)];
-
- // Set it to our _animationFrameInterval
- [_displayLink setFrameInterval:_animationFrameInterval];
-
- // Have the display link run on the default runn loop (and the main thread)
- [_displayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
-
- [super startAnimation];
- }
-}
-
-- (void)stopAnimation
-{
- if (self.animating)
- {
- [_displayLink invalidate];
- _displayLink = nil;
- [super stopAnimation];
- }
-}
-
-- (void)terminate
-{
- _theApp.reset();
- [super terminate];
-}
-
-- (NSString*)getError
-{
- return _error.empty() ? nil : [NSString stringWithFormat:@"%s", _error.c_str()];
-}
-
-- (void)touchesBegan:(NSSet<UITouch *> *)touches
- withEvent:(UIEvent *)event;
-{
- UITouch *firstTouch = touches.allObjects[0];
- CGPoint location = [firstTouch locationInView:self];
- if(_theApp)
- {
- _theApp->OnTouchBegan(location.x, location.y);
- }
-}
-
-- (void)touchesMoved:(NSSet<UITouch *> *)touches
- withEvent:(UIEvent *)event;
-{
- UITouch *firstTouch = touches.allObjects[0];
- CGPoint location = [firstTouch locationInView:self];
- if(_theApp)
- {
- _theApp->OnTouchMoved(location.x, location.y);
- }
-}
-
-- (void)touchesEnded:(NSSet<UITouch *> *)touches
- withEvent:(UIEvent *)event;
-{
- UITouch *firstTouch = touches.allObjects[0];
- CGPoint location = [firstTouch locationInView:self];
- if(_theApp)
- {
- _theApp->OnTouchEnded(location.x, location.y);
- }
-}
-
-- (void)touchesCancelled:(NSSet<UITouch *> *)touches
- withEvent:(UIEvent *)event;
-{
- UITouch *firstTouch = touches.allObjects[0];
- CGPoint location = [firstTouch locationInView:self];
- if(_theApp)
- {
- _theApp->OnTouchEnded(location.x, location.y);
- }
-}
-
-@end
diff --git a/Common/NativeApp/Apple/Source/Classes/iOS/BaseView.h b/Common/NativeApp/Apple/Source/Classes/iOS/BaseView.h
deleted file mode 100644
index 9e8b99e..0000000
--- a/Common/NativeApp/Apple/Source/Classes/iOS/BaseView.h
+++ /dev/null
@@ -1,12 +0,0 @@
-
-#import <UIKit/UIKit.h>
-
-@interface BaseView : UIView
-
-@property (readonly, nonatomic, getter=isAnimating) BOOL animating;
-
-- (void) startAnimation;
-- (void) stopAnimation;
-- (void) terminate;
-
-@end
diff --git a/Common/NativeApp/Apple/Source/Classes/iOS/BaseView.m b/Common/NativeApp/Apple/Source/Classes/iOS/BaseView.m
deleted file mode 100644
index c87e5cd..0000000
--- a/Common/NativeApp/Apple/Source/Classes/iOS/BaseView.m
+++ /dev/null
@@ -1,21 +0,0 @@
-
-#import "BaseView.h"
-
-@implementation BaseView
-
-- (void) startAnimation
-{
- _animating = TRUE;
-}
-
-- (void)stopAnimation
-{
- _animating = FALSE;
-}
-
-- (void) terminate
-{
-
-}
-
-@end
diff --git a/Common/NativeApp/Apple/Source/Classes/iOS/EAGLView.h b/Common/NativeApp/Apple/Source/Classes/iOS/EAGLView.h
deleted file mode 100644
index e5ba68a..0000000
--- a/Common/NativeApp/Apple/Source/Classes/iOS/EAGLView.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- Copyright (C) 2015 Apple Inc. All Rights Reserved.
- See LICENSE.txt for this sample’s licensing information
-
- Abstract:
- The EAGLView class is a UIView subclass that renders OpenGL scene.
-*/
-
-#import "AppViewBase.h"
-
-// This class wraps the CAEAGLLayer from CoreAnimation into a convenient UIView subclass.
-// The view content is basically an EAGL surface you render your OpenGL scene into.
-// Note that setting the view non-opaque will only work if the EAGL surface has an alpha channel.
-@interface EAGLView : AppViewBase
-
-- (void) drawView:(id)sender;
-
-@end
diff --git a/Common/NativeApp/Apple/Source/Classes/iOS/EAGLView.m b/Common/NativeApp/Apple/Source/Classes/iOS/EAGLView.m
deleted file mode 100644
index ff02820..0000000
--- a/Common/NativeApp/Apple/Source/Classes/iOS/EAGLView.m
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- Copyright (C) 2015 Apple Inc. All Rights Reserved.
- See LICENSE.txt for this sample’s licensing information
-
- Abstract:
- The EAGLView class is a UIView subclass that renders OpenGL scene.
-*/
-
-#import "EAGLView.h"
-
-#include "DeviceCaps.h"
-
-@interface EAGLView ()
-{
- EAGLContext* _context;
-}
-@end
-
-@implementation EAGLView
-
-// Must return the CAEAGLLayer class so that CA allocates an EAGLLayer backing for this view
-+ (Class) layerClass
-{
- return [CAEAGLLayer class];
-}
-
-// The GL view is stored in the storyboard file. When it's unarchived it's sent -initWithCoder:
-- (instancetype) initWithCoder:(NSCoder*)coder
-{
- if ((self = [super initWithCoder:coder]))
- {
- // Get the layer
- CAEAGLLayer *eaglLayer = (CAEAGLLayer *)self.layer;
-
- eaglLayer.opaque = TRUE;
- eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys:
- [NSNumber numberWithBool:FALSE], kEAGLDrawablePropertyRetainedBacking, kEAGLColorFormatRGBA8, kEAGLDrawablePropertyColorFormat, nil];
-
- _context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES3];
-
- if (!_context || ![EAGLContext setCurrentContext:_context])
- {
- return nil;
- }
-
- [self initApp:(int)Diligent::DeviceType::OpenGLES];
- }
-
- return self;
-}
-
-- (void) drawView:(id)sender
-{
- [EAGLContext setCurrentContext:_context];
-
- // There is no autorelease pool when this method is called
- // because it will be called from a background thread.
- // It's important to create one or app can leak objects.
- @autoreleasepool
- {
- [self render];
- }
-}
-
-- (void) dealloc
-{
- [self terminate];
-
- // tear down context
- if ([EAGLContext currentContext] == _context)
- [EAGLContext setCurrentContext:nil];
-}
-
-@end
diff --git a/Common/NativeApp/Apple/Source/Classes/iOS/MetalView.h b/Common/NativeApp/Apple/Source/Classes/iOS/MetalView.h
deleted file mode 100644
index a485b27..0000000
--- a/Common/NativeApp/Apple/Source/Classes/iOS/MetalView.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#import "AppViewBase.h"
-
-@interface MetalView : AppViewBase
-
-- (void) drawView:(id)sender;
-
-@end
diff --git a/Common/NativeApp/Apple/Source/Classes/iOS/MetalView.m b/Common/NativeApp/Apple/Source/Classes/iOS/MetalView.m
deleted file mode 100644
index 67c2a27..0000000
--- a/Common/NativeApp/Apple/Source/Classes/iOS/MetalView.m
+++ /dev/null
@@ -1,44 +0,0 @@
-#import "MetalView.h"
-
-#if VULKAN_SUPPORTED
-#import <QuartzCore/CAMetalLayer.h>
-#endif
-
-#include "DeviceCaps.h"
-
-@implementation MetalView
-
-#if VULKAN_SUPPORTED
-+ (Class) layerClass
-{
- return [CAMetalLayer class];
-}
-#endif
-
-- (instancetype) initWithCoder:(NSCoder*)coder
-{
- if ((self = [super initWithCoder:coder]))
- {
- [self initApp:(int)Diligent::DeviceType::Vulkan];
- }
-
- return self;
-}
-
-- (void) drawView:(id)sender
-{
- // There is no autorelease pool when this method is called
- // because it will be called from a background thread.
- // It's important to create one or app can leak objects.
- @autoreleasepool
- {
- [self render];
- }
-}
-
-- (void) dealloc
-{
- [self terminate];
-}
-
-@end
diff --git a/Common/NativeApp/Apple/Source/Classes/iOS/ModeSelectionViewController.h b/Common/NativeApp/Apple/Source/Classes/iOS/ModeSelectionViewController.h
deleted file mode 100644
index 4a08d7d..0000000
--- a/Common/NativeApp/Apple/Source/Classes/iOS/ModeSelectionViewController.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Copyright 2015-2019 Egor Yusov
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF ANY PROPRIETARY RIGHTS.
- *
- * In no event and under no legal theory, whether in tort (including negligence),
- * contract, or otherwise, unless required by applicable law (such as deliberate
- * and grossly negligent acts) or agreed to in writing, shall any Contributor be
- * liable for any damages, including any direct, indirect, special, incidental,
- * or consequential damages of any character arising as a result of this License or
- * out of the use or inability to use the software (including but not limited to damages
- * for loss of goodwill, work stoppage, computer failure or malfunction, or any and
- * all other commercial damages or losses), even if such Contributor has been advised
- * of the possibility of such damages.
- */
-
-#import <UIKit/UIKit.h>
-
-@interface ModeSelectionViewController : UIViewController
-{
-}
-@end
diff --git a/Common/NativeApp/Apple/Source/Classes/iOS/ModeSelectionViewController.mm b/Common/NativeApp/Apple/Source/Classes/iOS/ModeSelectionViewController.mm
deleted file mode 100644
index 8958c10..0000000
--- a/Common/NativeApp/Apple/Source/Classes/iOS/ModeSelectionViewController.mm
+++ /dev/null
@@ -1,64 +0,0 @@
-/* Copyright 2015-2019 Egor Yusov
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF ANY PROPRIETARY RIGHTS.
- *
- * In no event and under no legal theory, whether in tort (including negligence),
- * contract, or otherwise, unless required by applicable law (such as deliberate
- * and grossly negligent acts) or agreed to in writing, shall any Contributor be
- * liable for any damages, including any direct, indirect, special, incidental,
- * or consequential damages of any character arising as a result of this License or
- * out of the use or inability to use the software (including but not limited to damages
- * for loss of goodwill, work stoppage, computer failure or malfunction, or any and
- * all other commercial damages or losses), even if such Contributor has been advised
- * of the possibility of such damages.
- */
-
-#import "ModeSelectionViewController.h"
-#import "BaseView.h"
-#import "AppViewBase.h"
-
-@implementation ModeSelectionViewController
-{
-}
-
--(void)selectViewController:(NSString*)controllerID
-{
- auto animating = ((BaseView*)self.view).animating;
-
- UIViewController* viewController = [self.storyboard instantiateViewControllerWithIdentifier:controllerID];
- self.view.window.rootViewController = viewController;
-
- NSString *error = [(AppViewBase*)viewController.view getError];
- if(error != nil)
- {
- UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Failed to start the application" message:error delegate:self cancelButtonTitle:@"OK" otherButtonTitles:@"Whatever", nil];
- [alert show];
- }
-
- if(animating)
- {
- [(BaseView*)viewController.view startAnimation];
- }
-}
-
-- (IBAction)goOpenGLES:(id)sender
-{
- [self selectViewController:@"EAGLViewControllerID"];
-}
-
-- (IBAction)goVulkan:(id)sender
-{
-#if VULKAN_SUPPORTED
- [self selectViewController:@"MetalViewControllerID"];
-#endif
-}
-
-@end
diff --git a/Common/NativeApp/Apple/Source/main.m b/Common/NativeApp/Apple/Source/main.m
deleted file mode 100644
index 7134864..0000000
--- a/Common/NativeApp/Apple/Source/main.m
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- Copyright (C) 2015 Apple Inc. All Rights Reserved.
- See LICENSE.txt for this sample’s licensing information
-
- Abstract:
- Standard AppKit entry point.
- */
-
-#if PLATFORM_IOS
-#import <UIKit/UIKit.h>
-#import "AppDelegate.h"
-#else // OS X
-#import <Cocoa/Cocoa.h>
-#endif
-
-int main(int argc, char * argv[]) {
-
-#if PLATFORM_IOS
- @autoreleasepool {
- return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
- }
-#else
- return NSApplicationMain(argc, (const char**)argv);
-#endif
-}