Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
e76d820
macOS Cocoa: fix reshape, resize, and fullscreen handling
mateusbentes Mar 6, 2026
b2582ec
macOS: add OSXToggleFullscreen() and fullscreen state delegates
mateusbentes Mar 6, 2026
a7c57b8
macOS: clean up MainController.h - remove unused fullscreen/resize de…
mateusbentes Mar 6, 2026
dcaae6d
macOS: force prepareOpenGL before timer start in awakeFromNib
mateusbentes Mar 6, 2026
09c3d50
macOS: fix game never starting - init on first drawRect with valid bo…
mateusbentes Mar 6, 2026
a3b9af8
macOS: fix pixel format (remove deprecated NSOpenGLPFAWindow), add st…
mateusbentes Mar 6, 2026
737937f
macOS: add critical startup diagnostics to find nil outlet / zero bou…
mateusbentes Mar 6, 2026
a05e887
macOS: remove diagnostic NSLog calls, keep all real fixes
mateusbentes Mar 6, 2026
b86f17e
macOS: use [self display] instead of calling drawRect directly
mateusbentes Mar 6, 2026
d820130
macOS: force window visible in applicationDidFinishLaunching
mateusbentes Mar 6, 2026
28fba9e
macOS: fix window close/terminate lifecycle - setReleasedWhenClosed:N…
mateusbentes Mar 6, 2026
76fc6cb
macOS: create NSWindow and MyOpenGLView programmatically - no window …
mateusbentes Mar 6, 2026
11f3055
macOS: fix MESSAGE_SET_VIDEO_MODE to use [self window] instead of [NS…
mateusbentes Mar 6, 2026
e5ef7e2
macOS: use w/h variables for initial window size, ready for future sa…
mateusbentes Mar 6, 2026
2269aed
macOS: drain OSMessage queue each frame in drawRect - fixes SetVideoM…
mateusbentes Mar 6, 2026
4ba6751
fix: handle SDL_JOYDEVICEADDED for generic/unmapped HID gamepads (e.g…
mateusbentes Mar 7, 2026
b5368c2
Fix typo in comment for gamepad handling
mateusbentes Mar 7, 2026
27432af
macOS: update RTBareBones Xcode project - deployment target 11.0, add…
mateusbentes Mar 8, 2026
8c900db
macOS: RTSimpleApp + RTLooneyLadders SDL audio + RTLooneyLadders OSX …
mateusbentes Mar 8, 2026
8eda51d
macOS: fix OSX app file paths and asset paths in all 3 proton demo Xc…
mateusbentes Mar 8, 2026
c21614d
macOS: fix MyOpenGLView.mm nil cast - replace (NSOpenGLPixelFormatAtt…
mateusbentes Mar 9, 2026
29a0f04
macOS: fully remove FMOD from RTSimpleApp Xcode project
mateusbentes Mar 9, 2026
7457d91
macOS: remove gamepad/SDL_Init from RTSimpleApp - app has no GamepadM…
mateusbentes Mar 9, 2026
d91d0b5
macOS: add libpng sources to all 3 proton demo Xcode projects
mateusbentes Mar 9, 2026
2703e6f
macOS: fix indentation in all 3 demo app Xcode project files
mateusbentes Mar 9, 2026
b38d62f
macOS: add libpng ARM NEON sources to all 3 demo Xcode projects
mateusbentes Mar 9, 2026
b56c110
macOS: fix LogMsg and g_bIsFullScreen undefined symbols in all 3 demo…
mateusbentes Mar 9, 2026
2aa706b
Fix indentation in macOS SDL audio blocks in App.cpp for RTSimpleApp …
mateusbentes Mar 9, 2026
8f0879b
Add macOS build instructions for RTBareBones, RTSimpleApp, RTLooneyLa…
mateusbentes Mar 9, 2026
e549741
Add Embed Frameworks build phase for SDL2/SDL2_mixer in RTSimpleApp a…
mateusbentes Mar 9, 2026
341160e
Fix window title: read CFBundleName from Info.plist instead of hardco…
mateusbentes Mar 9, 2026
e498cbf
Fix RTSimpleApp: don't fail on missing fonts, fix duplicate if check;…
mateusbentes Mar 9, 2026
be1f7d9
RTSimpleApp macOS: call SDL_Init(0) before BaseApp::Init and SDL_Pump…
mateusbentes Mar 9, 2026
0ef41e5
RTLooneyLadders OSX: add Gamepad source files (GamepadManager, Gamepa…
mateusbentes Mar 9, 2026
6584b38
Fix indentation in RTLooneyLadders pbxproj Sources phase
mateusbentes Mar 9, 2026
8771ebf
RTLooneyLadders OSX: add missing Entity component sources to fix link…
mateusbentes Mar 9, 2026
17c913b
RTLooneyLadders OSX: add LogDisplayComponent to fix SetConsole linker…
mateusbentes Mar 9, 2026
1ca256c
RTLooneyLadders OSX: add TouchDragComponent to fix linker error
mateusbentes Mar 9, 2026
d8081df
RTSimpleApp/RTLooneyLadders OSX: remove XIB window to fix double wind…
mateusbentes Mar 9, 2026
176c0bc
RTBareBones OSX: remove XIB window to fix double window bug
mateusbentes Mar 9, 2026
a3c2be7
RTBareBones OSX: fix missing closing brace in project.pbxproj
mateusbentes Mar 9, 2026
cdaca05
shared OSX: use GetBaseApp() instead of GetApp() for fullscreen var
mateusbentes Mar 9, 2026
5378b41
shared OSX: remove GetVar fullscreen calls, use g_bIsFullScreen only
mateusbentes Mar 9, 2026
0d94a7d
RTBareBones OSX: add JPGSurfaceLoader, RTGLESExt and libjpeg sources
mateusbentes Mar 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 83 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,89 @@ Credits and links
- Fatalfeel's [Proton SDK forks](https://github.com/fatalfeel) for GLES 2 support and Cocos2D integration
- Vita platform support by @NabsiYa

# Building the Demo Apps on macOS

The following demo apps have Xcode projects under their `OSX/` folder:

| App | Xcode Project | Audio | Notes |
|-----|--------------|-------|-------|
| **RTBareBones** | `RTBareBones/OSX/RTBareBones.xcodeproj` | Dummy (no audio) | Simplest starting point |
| **RTSimpleApp** | `RTSimpleApp/OSX/RTSimpleApp.xcodeproj` | SDL2_mixer | Basic app with SDL audio |
| **RTLooneyLadders** | `RTLooneyLadders/OSX/RTLooneyLadders.xcodeproj` | SDL2_mixer | Full game with gamepad support |

All projects target **macOS 11.0+** and build as **universal binaries** (arm64 + x86_64).

## Prerequisites

### 1. Install SDL2 frameworks

RTSimpleApp and RTLooneyLadders require SDL2 and SDL2_mixer. RTBareBones only requires SDL2 headers (no audio).

The Xcode projects look for both frameworks in `~/Library/Frameworks/` automatically.

**Option A — Universal DMG** (arm64 + x86_64, recommended):

```bash
# SDL2
curl -L -o /tmp/SDL2.dmg https://github.com/libsdl-org/SDL/releases/download/release-2.30.9/SDL2-2.30.9.dmg
hdiutil attach /tmp/SDL2.dmg
cp -r "/Volumes/SDL2/SDL2.framework" ~/Library/Frameworks/
hdiutil detach "/Volumes/SDL2"

# SDL2_mixer (needed by RTSimpleApp and RTLooneyLadders)
curl -L -o /tmp/SDL2_mixer.dmg https://github.com/libsdl-org/SDL_mixer/releases/download/release-2.8.0/SDL2_mixer-2.8.0.dmg
hdiutil attach /tmp/SDL2_mixer.dmg
cp -r "/Volumes/SDL2_mixer/SDL2_mixer.framework" ~/Library/Frameworks/
hdiutil detach "/Volumes/SDL2_mixer"
```

> These are universal frameworks (arm64 + x86_64) so the resulting `.app` runs on both Intel and Apple Silicon Macs.

**Option B — Homebrew** (native arch only, not suitable for universal binary):

```bash
brew install sdl2 sdl2_mixer
```

> **Note:** Homebrew on Apple Silicon only provides arm64 libraries. Use Option A if you need a universal binary.

### 2. Generate fonts and textures

RTSimpleApp and RTLooneyLadders require `.rtfont` files generated from source assets. Run `update_media.sh` from each app's `media/` folder (requires RTPack — build it first from `RTPack/linux/` on Linux or use the Windows version):

```bash
cd RTSimpleApp/media && sh update_media.sh
cd RTLooneyLadders/media && sh update_media.sh
```

> **Note:** Without this step the apps will still open but text/fonts will not render.

### 3. Generate the required libpng config header

```bash
LIBPNG=shared/Irrlicht/source/Irrlicht/libpng
cp "$LIBPNG/pnglibconf.h.prebuilt" "$LIBPNG/pnglibconf.h"
```

## Build

Open the desired Xcode project and build (`⌘B`):

```bash
# RTBareBones
open RTBareBones/OSX/RTBareBones.xcodeproj

# RTSimpleApp
open RTSimpleApp/OSX/RTSimpleApp.xcodeproj

# RTLooneyLadders
open RTLooneyLadders/OSX/RTLooneyLadders.xcodeproj
```

> **Note:** The SDL2 frameworks are automatically embedded into the `.app` bundle at build time via `@executable_path/../Frameworks`, so the final app is self-contained and does not require SDL2 to be installed on the target machine.

---

# Want to contribute?

Feel free to submit a pull request! At this point the goal is that all changes be *non-breaking* to existing projects.
35 changes: 1 addition & 34 deletions RTBareBones/OSX/English.lproj/MainMenu.xib
Original file line number Diff line number Diff line change
Expand Up @@ -648,40 +648,7 @@
</items>
<point key="canvasLocation" x="123" y="114"/>
</menu>
<window title="RTBareBones" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="371">
<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="499" y="410" width="1024" height="768"/>
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1055"/>
<view key="contentView" id="372">
<rect key="frame" x="0.0" y="0.0" width="1024" height="768"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="533" customClass="MyOpenGLView">
<rect key="frame" x="0.0" y="0.0" width="1024" height="768"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES"/>
</customView>
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="558">
<rect key="frame" x="53" y="-172" width="585" height="136"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" id="559">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
</view>
<connections>
<outlet property="delegate" destination="550" id="561"/>
</connections>
<point key="canvasLocation" x="123" y="-367"/>
</window>
<customObject id="420" customClass="NSFontManager"/>
<customObject id="550" userLabel="Main Controller" customClass="MainController">
<connections>
<outlet property="openGLView" destination="533" id="551"/>
</connections>
</customObject>
<customObject id="550" userLabel="Main Controller" customClass="MainController"/>
</objects>
</document>
Loading