/* * Tuxánci 2 - A first person shooter * Copyright (C) 2025-2026 Connor Thomson * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef TA_SDL_H #define TA_SDL_H #include #include void ta_sdl_init(SDL_InitFlags flags); void ta_sdl_shutdown(void); SDL_Window *ta_sdl_create_window(const char *title, int width, int height); SDL_IOStream *ta_sdl_io_from_file(const char *file, const char *mode); SDL_IOStream *ta_sdl_io_from_mem(void *mem, size_t size); void ta_sdl_get_window_size(SDL_Window *window, int *width, int *height); SDL_GPUDevice *ta_sdl_create_gpu_device(void); void ta_sdl_claim_window_for_gpu_device(SDL_GPUDevice *device, SDL_Window *window); SDL_GPUShader *ta_sdl_create_gpu_shader(SDL_GPUDevice *device, const SDL_GPUShaderCreateInfo *createinfo); SDL_GPUGraphicsPipeline *ta_sdl_create_gpu_graphics_pipeline(SDL_GPUDevice *device, const SDL_GPUGraphicsPipelineCreateInfo *createinfo); SDL_GPUTexture *ta_sdl_create_gpu_texture(SDL_GPUDevice *device, const SDL_GPUTextureCreateInfo *createinfo); SDL_GPUSampler *ta_sdl_create_gpu_sampler(SDL_GPUDevice *device, const SDL_GPUSamplerCreateInfo *createinfo); SDL_GPUTransferBuffer *ta_sdl_create_gpu_transfer_buffer(SDL_GPUDevice *device, const SDL_GPUTransferBufferCreateInfo *createinfo); void *ta_sdl_map_gpu_transfer_buffer(SDL_GPUDevice *device, SDL_GPUTransferBuffer *transfer_buffer, bool cycle); SDL_GPUCommandBuffer *ta_sdl_acquire_gpu_command_buffer(SDL_GPUDevice *device); SDL_GPUCopyPass *ta_sdl_begin_gpu_copy_pass(SDL_GPUCommandBuffer *command_buffer); SDL_GPURenderPass *ta_sdl_begin_gpu_render_pass(SDL_GPUCommandBuffer *command_buffer, const SDL_GPUColorTargetInfo *color_target_infos, Uint32 num_color_targets, const SDL_GPUDepthStencilTargetInfo *depth_stencil_target_info); void ta_sdl_wait_and_acquire_gpu_swapchain_texture(SDL_GPUCommandBuffer *commandbuffer, SDL_Window *window, SDL_GPUTexture **swapchain_texture); void ta_sdl_submit_gpu_command_buffer(SDL_GPUCommandBuffer *command_buffer); SDL_Surface *ta_sdl_convert_surface(SDL_Surface *surface, SDL_PixelFormat format); void ta_sdl_set_window_fullscreen(SDL_Window *window, bool fullscreen); #endif // TA_SDL_H