use anyhow::Context as _;
use glutin::{
event::{Event, WindowEvent},
event_loop::ControlFlow,
};
use luminance_front::context::GraphicsContext;
use luminance_glutin::GlutinSurface;
What I expected to happen: A window, completely filled with black, even after resizing.
What happened instead: A transparent window with a 400x400 black square in its center.
surface.back_buffer()?.size() returns the correct dimensions of the window, but it's not actually rendering onto the entire window, only the 400x400 area in the middle. It looks really wonky when I make the window smaller than that, too, with the square sticking out from the window borders.
On X11 the same code works as expected.
fn main() -> anyhow::Result<()> { let (mut surface, event_loop) = GlutinSurface::new_gl33_frombuilders( |, window_builder| { window_builder .with_resizable(true) .with_inner_size(glutin::dpi::LogicalSize::new(400, 400u16)) }, |, context_builder| context_builder, )?;
}
fn draw(surface: &mut GlutinSurface) -> anyhow::Result<()> { let back_buffer = surface.back_buffer()?; let mut pipeline_gate = surface.new_pipeline_gate();
}
surface.back_buffer()?.size()
returns the correct dimensions of the window, but it's not actually rendering onto the entire window, only the 400x400 area in the middle. It looks really wonky when I make the window smaller than that, too, with the square sticking out from the window borders. On X11 the same code works as expected.