I am trying to use egui with a custom renderer I made. I am rendering to the screen, but it looks like this:
i.e. the widget occupies the entire screen. When I inspect the data I get from egui
let output = self.ctx.run(raw_input, |ctx|
{
egui::CentralPanel::default().show(&ctx, |ui| {
ui.label("Hello world!");
if ui.button("Click me").clicked() {
// take some action here
}
});
});
let clipped_primitives = self.ctx.tessellate(output.shapes);
for primitive in clipped_primitives
{
println!("{:?}", primitive.clip_rect);
/* render */
}
I get:
[[0.0 0.0] - [800.0 800.0]]
[[0.0 0.0] - [800.0 800.0]]
[[0.0 0.0] - [800.0 800.0]]
[[0.0 0.0] - [800.0 800.0]]
[[0.0 0.0] - [800.0 800.0]]
[[0.0 0.0] - [800.0 800.0]]
[[0.0 0.0] - [800.0 800.0]]
Why arent the primitives clipped?