1786016474
This commit is contained in:
@@ -73,27 +73,13 @@ impl Platform for Trekstor {
|
|||||||
dbg!("Rendering");
|
dbg!("Rendering");
|
||||||
renderer.render(&mut buffer1, window_width as usize);
|
renderer.render(&mut buffer1, window_width as usize);
|
||||||
for (i, px) in buffer1.into_iter().enumerate() {
|
for (i, px) in buffer1.into_iter().enumerate() {
|
||||||
// if i > (window_width as usize - 1) {
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
|
|
||||||
let x = (i % window_width as usize) as u32;
|
let x = (i % window_width as usize) as u32;
|
||||||
let y = (i / window_width as usize) as u32;
|
let y = (i / window_width as usize) as u32;
|
||||||
|
|
||||||
// // if x >= window_width || y >= window_height {
|
|
||||||
// // println!("Out of bounds {} {}", x, y);
|
|
||||||
// // continue;
|
|
||||||
// // }
|
|
||||||
|
|
||||||
let pixel = Rgb8Pixel::from(px);
|
let pixel = Rgb8Pixel::from(px);
|
||||||
|
let c = Color::from((pixel.r, pixel.g, pixel.b, 255));
|
||||||
|
|
||||||
dbg!(x, y, Color::from((pixel.r, pixel.g, pixel.b, 255)));
|
ctx.screen.framebuffer.set_pixel(x, y, c);
|
||||||
|
|
||||||
// // ctx.screen.framebuffer.set_pixel(
|
|
||||||
// // x,
|
|
||||||
// // y,
|
|
||||||
// // Color::from((px.r(), px.b(), px.b(), px.a())),
|
|
||||||
// // );
|
|
||||||
}
|
}
|
||||||
ctx.screen.flush();
|
ctx.screen.flush();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user