WIP: improve flush

This commit is contained in:
Alejandro Alonso
2024-10-03 11:45:29 +02:00
parent 1f8fe2dc4c
commit 0f0b23e38b
3 changed files with 18 additions and 10 deletions

View File

@@ -125,6 +125,11 @@ pub unsafe extern "C" fn draw_rect(
let color = Color::from_rgb(r, g, b);
render_rect(&mut state.surface, rect, color);
}
#[no_mangle]
pub unsafe extern "C" fn flush(state: *mut State) {
let state = unsafe { state.as_mut() }.expect("got an invalid state pointer");
state
.gpu_state
.context