chore: set explicit ARGB8888 pixel format for transparency support, 'web' task with caddy fs

This commit is contained in:
Ryan Walters
2025-09-04 00:13:48 -05:00
parent b8c7c29376
commit 36a2f00d8c
3 changed files with 3 additions and 2 deletions

View File

@@ -41,4 +41,4 @@ samply:
# Build the project for Emscripten
web:
bun run web.build.ts
bun run web.build.ts; caddy file-server --root dist

View File

@@ -159,7 +159,7 @@ impl Game {
// Create debug texture at output resolution for crisp debug rendering
let output_size = canvas.output_size().unwrap();
let mut debug_texture = texture_creator
.create_texture_target(None, output_size.0, output_size.1)
.create_texture_target(Some(sdl2::pixels::PixelFormatEnum::ARGB8888), output_size.0, output_size.1)
.map_err(|e| GameError::Sdl(e.to_string()))?;
// Debug texture is copied over the backbuffer, it requires transparency abilities

View File

@@ -29,6 +29,7 @@ pub fn requires_console() -> bool {
false
}
#[allow(dead_code)]
pub fn get_canvas_size() -> Option<(u32, u32)> {
let mut width = 0.0;
let mut height = 0.0;