A Comprehensive Guide to Cross-Platform Game Development with Simple DirectMedia Layer 3
Introduction: Why SDL3?
- The Legacy of Simple DirectMedia Layer
- What Changed in SDL3
- Who Should Read This Book
- SDL3 Architecture at a Glance
- How to Use This Book
Chapter 1: Getting Started with SDL3
- Installing SDL3 on Windows
- Installing SDL3 on macOS
- Installing SDL3 on Linux
- Building SDL3 from Source
- Your First SDL3 Program
- Error Handling and Logging
- CMake Project Setup
- PixelQuest Integration: Chapter 1
Chapter 2: Windows, Events and the Main Loop
- Creating Windows
- Window Flags and Properties
- The Event System
- Keyboard Input
- Mouse Input
- Text Input and Clipboard
- Application Structure: Main Loop vs Callbacks
- PixelQuest Integration: Chapter 2
Chapter 3: 2D Rendering with SDL_Renderer
- The Renderer Architecture
- Drawing Primitives
- Working with Textures
- Rendering to Textures
- Image Loading with SDL_image
- Frame Rate and VSync
- Performance Considerations
- PixelQuest Integration: Chapter 3
Chapter 4: Surfaces and Pixel Manipulation
- Understanding Surfaces
- Pixel Formats
- Blitting Operations
- Color Keying and Alpha
- Surface Creation and Conversion
- From Surface to Texture
- PixelQuest Integration: Chapter 4
Chapter 5: Audio in SDL3
- The New Audio Architecture
- Playing Audio with Streams
- Opening and Managing Devices
- Audio Mixing
- Recording Audio
- PixelQuest Integration: Chapter 5
Chapter 6: Fonts and Text Rendering with SDL_ttf
- Loading Fonts
- Rendering Text to Surfaces
- Measuring and Fitting Text
- Creating Text Textures
- Dynamic Text and Caching
- PixelQuest Integration: Chapter 6
- Unicode and Internationalization
Chapter 7: Input Devices, Gamepads, Joysticks and Haptics
- The Gamepad API
- Opening and Managing Gamepads
- Raw Joystick Access
- Rumble and Haptic Feedback
- Sensors: Accelerometer and Gyroscope
- Input Mapping and Configuration
- PixelQuest Integration: Chapter 7
- Building an Input Manager
Chapter 8: Timing, Threading and Synchronization
- High-Resolution Timers
- Frame Timing and Delta Time
- Creating and Managing Threads
- Mutexes and Critical Sections
- Semaphores and Condition Variables
- Atomics and Lock-Free Patterns
- PixelQuest Integration: Chapter 8
- Thread-Safe Game Loop Architecture
Chapter 9: File I/O, Filesystem and Configuration
- The IOStream System
- Memory Streams
- Filesystem Operations
- Configuration Management
- PixelQuest Integration: Chapter 9
- Asset Loading Architecture
Chapter 10: Graphics Context Integration
- Choosing Your Rendering Path
- OpenGL Context Management
- A Complete OpenGL Program
- Context Attributes: What to Set and When
- Loading OpenGL Functions
- VSync, Adaptive VSync and Frame Pacing
- Multiple Contexts, Sharing and Threads
- HiDPI and the Drawing Buffer
- When the Screen Is Black
- Vulkan Integration
- Part 1: Window, Extensions, Instance, Surface
- Part 2: Device, Queues, Swapchain
- Part 3: Render Pass, Pipeline, Buffers
- Part 4: Offscreen Render and Readback
- Part 5: Frame Loop, Resize, Teardown
- Three Bugs the Validation Layer Caught
- Vulkan and the SDL GPU API on One Window
- Metal Layer Integration
- The SDL3 GPU API
- Coordinate System, Correctly
- A Complete GPU API Program
- Shader Resources: Sets, Not Bindings
- Uniforms: Pushed, Not Bound
- Textures, Samplers and MSAA
- Acquiring a Swapchain Texture
- Shader Formats and Cross-Compilation
- Integrating a UI with a 3D Application
- First Rule: One Backend Per Window, In Practice
- Where the UI Lives
- Dear ImGui + SDL3 + OpenGL
- Dear ImGui + SDL3 + the GPU API
- Dear ImGui + SDL3 + Vulkan
- Input Routing, Distilled
- Drawing a UI Without an Immediate-Mode Library
- A UI-Over-3D Checklist
- Swapchain and Presentation
- GPU API Swapchain Matrix
- Pacing Patterns
- HDR and Colour Space
- PixelQuest Integration: Chapter 10
- Where to Go Next
Chapter 11: Advanced Topics and Platform Features
- The Properties System
- Hints and Runtime Configuration
- Dialog and Filesystem APIs
- Camera Access
- Clipboard and Drag-and-Drop
- Fullscreen, HiDPI and Multi-Monitor
- Platform-Specific Considerations
Chapter 12: Migration from SDL2 to SDL3
- Major Breaking Changes
- API Renames and Reorganizations
- Audio Migration: Callbacks to Streams
- Rendering Changes
- Gamepad and Joystick Changes
- Automated Migration Tools
- Common Pitfalls and Gotchas
Conclusion: Building Real Applications
- A Complete Game Architecture
- Debugging SDL3 Applications
- Performance Profiling
- Best Practices Summary
- Resources and Community
References
- Official SDL Documentation
- News and Release Announcements
- Historical and Reference Sources
- Third-Party Tutorials and Learning Resources
- Codebase Analysis and Deep Dives
- Community Discussions
- Graphics Context Integration Sources