Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
/sdl3-samplePublic template

Minimal HowTo for building and using SDL3 on a variety of platforms, including mobile and web. Also includes SDL_mixer, SDL_Image, and SDL_ttf!

NotificationsYou must be signed in to change notification settings

Ravbug/sdl3-sample

Repository files navigation

This is a minimal example for building and using SDL3, SDL_Mixer, SDL_Image, and SDL_ttf_ from sourceusing C++ and CMake. It also demonstrates setting up things like macOS/iOSbundles.Seesrc/main.cpp for the code.

Building And Running

Are you a complete beginner? If so, readthis!Otherwise, install CMake and your favorite compiler, and follow the commands below:

# You need to clone with submodules, otherwise SDL will not download.git clone https://github.com/Ravbug/sdl3-sample --depth=1 --recurse-submodulescd sdl3-samplecmake -S. -B build

You can also use an init script insideconfig/. Then open the IDE project insidebuild/(If you had CMake generate one) and run!

Supported Platforms

I have tested the following:

PlatformArchitectureGenerator
macOSx86_64, arm64Xcode
iOSx86_64, arm64Xcode
tvOSx86_64, arm64Xcode
visionOS*arm64Xcode
Windowsx86_64, arm64Visual Studio
Linuxx86_64, arm64Ninja, Make
Web*wasmNinja, Make
Android*x86, x64, arm, arm64Ninja via Android Studio

*See further instructions inconfig/

Note: UWP support wasremoved from SDL3 during its development. For historical reasons, you can get a working UWP sample via this commit:df270da

Updating SDL

Just update the submodule:

cd SDLgit pullcd ..cd SDL_ttfgit pull

You don't need to use a submodule, you can also copy the source in directly. Thisrepository uses a submodule to keep its size to a minimum.

Reporting issues

Is something not working? Create an Issue or send a Pull Request on this repository!

About

Minimal HowTo for building and using SDL3 on a variety of platforms, including mobile and web. Also includes SDL_mixer, SDL_Image, and SDL_ttf!

Topics

Resources

Stars

Watchers

Forks


[8]ページ先頭

©2009-2025 Movatter.jp