docs(sdl2): Documentar VSync en renderer

Clarificar el uso de SDL_RENDERER_PRESENTVSYNC:
- Sincroniza con refresco del monitor (60Hz)
- Elimina screen tearing
- Reduce consumo CPU/GPU

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
R.Eugenio 2026-01-01 20:54:03 +01:00
parent 105ff0063d
commit 15b9cf47a7

View file

@ -48,10 +48,9 @@ pub const Sdl2Backend = struct {
errdefer c.SDL_DestroyWindow(window); errdefer c.SDL_DestroyWindow(window);
// Create renderer with hardware acceleration and VSync // Create renderer with hardware acceleration and VSync
// VSync syncs with monitor refresh rate (typically 60Hz) which: // VSync syncs with monitor refresh rate (typically 60Hz):
// - Eliminates screen tearing // - Eliminates screen tearing
// - Reduces CPU usage (no busy-wait needed) // - Reduces CPU/GPU usage
// - Provides consistent frame timing
// Falls back to software renderer if GPU not available // Falls back to software renderer if GPU not available
const renderer = c.SDL_CreateRenderer( const renderer = c.SDL_CreateRenderer(
window, window,