Войти
  • 110Просмотров
  • 2 недели назадОпубликованоChristopher Medina

SDL3 Window & Callback System

In this video, we discuss the main game loop and how we organize the project (Initialization, Event Handling, Rendering, & Exiting). The project is initially written in the more "traditional" game loop using nothing more than the SDL.h header. After, we rewrite the same program using the new Callback system newly provided by SDL3 using SDL_main.h. This a long one so use the time stamps if you're looking for a specific topic. **Traditional Game Loop** 0:00 Introduction 2:08 High level look at traditional game loop and setting up main() 4:24 Initializing SDL3 (subsystem, window, & renderer) 12:54 Main loop & event handling (close window) 15:43 Quitting SDL3 and cleaning up 17:01 Rendering (SetRenderDrawColor, RenderClear, RenderPresent) 19:28 Compiling and running program **Callback System** 22:07 Setting up file to use SDL3 Callbacks 23:19 "main" difference between traditional and callback system (pun intended) 24:25 Writing the various functions for callback system (AppInit, AppEvent, AppIterate, & AppQuit) 30:16 Quick side-by-side comparison of file structure 31:52 AppInit 43:11 AppEvent 44:36 AppIterate 47:40 AppQuit 49:40 Compiling and running program