You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] WindowBuilder::with_vsync is a no-op; present mode hardcoded to Fifo #101
The WindowBuilder::with_vsync method accepts a boolean parameter but has no effect on the actual present mode. Render surfaces always configure PresentMode::Fifo regardless of the vsync setting, making it impossible for users to disable vsync or control presentation timing.
Expected Behavior
WindowBuilder::with_vsync(true) should enable vsync (use PresentMode::Fifo)
WindowBuilder::with_vsync(false) should disable vsync (use PresentMode::Immediate or similar)
The present mode used by the render surface should respect the user's configuration
Actual Behavior
with_vsync is documented as a no-op in crates/lambda-rs/src/render/window.rs:54
PresentMode::Fifo is hardcoded in crates/lambda-rs/src/render/mod.rs:140
Vsync is always enabled regardless of what value is passed to with_vsync
Reproduction Steps
Create a window with vsync disabled:
let window = WindowBuilder::new().with_title("Test").with_vsync(false).build()?;
Run the application and observe frame timing
Notice that vsync is still enabled (frames are capped to display refresh rate)
Code Sample
``rust
// This should disable vsync but doesn'tlet window = WindowBuilder::new().with_title("No Vsync Test").with_vsync(false)// No-op: vsync remains enabled.build()?;// Expected: uncapped frame rate, possible tearing// Actual: frames capped to 60Hz (or display refresh rate)
Environment
OS: Any (macOS, Windows, Linux)
Rust version: Any supported version
GPU: Any
Graphics backend: Any (Vulkan, Metal, DX12)
lambda-rs version: Current main branch
Affected Crates
lambda-rs
Logs and Output
No error messages; the API silently ignores the vsync setting.
Additional Context
Platform probing fallback exists in configure_with_defaults(...) and could be leveraged for the fix
Fix should either:
Connect with_vsync to actual present mode selection, or
Add RenderContextBuilder::with_present_mode(PresentMode) for explicit control
Activity
fix(lambda-rs): Respect WindowBuilder vsync in render surface configu…