sdl.h (544B)
1 #ifndef PH_ENGINE_SDL_H 2 #define PH_ENGINE_SDL_H 3 4 #include "engine/render.h" 5 #include "engine/audio.h" 6 7 #if PH_USE_SDL 8 #include <SDL3/SDL.h> 9 10 /* The host initializes SDL. This context owns its textures but borrows target: 11 * destroy it before destroying target. Creation failure releases partial loads. */ 12 PhRenderer *ph_render_sdl_create(SDL_Renderer *target, 13 const PhAssetDef *defs, int count); 14 /* Owns clips, streams and the device; destroy before SDL_Quit. */ 15 PhAudio *ph_audio_sdl_create(const PhAudioDef *defs, int count); 16 #endif 17 18 #endif