Commit 4e8a8f7
committed
feat(ffi): add processing_poll_events for external event loop integration
Exposes a C FFI function that ticks Bevy's app one frame, allowing
embedders that manage their own window and event loop (e.g. a native
C++ host using GLFW) to advance libprocessing's internal state each
frame without using the built-in GLFW runner.
The pattern is:
processing_init();
processing_surface_create(...);
processing_graphics_create(...);
while (running) {
running = processing_poll_events();
processing_begin_draw(gfx);
// draw calls
processing_end_draw(gfx);
}
Adds processing_core as a direct dependency of processing_ffi since
app_mut is not re-exported through processing::prelude.1 parent b398b97 commit 4e8a8f7
2 files changed
Lines changed: 11 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4437 | 4437 | | |
4438 | 4438 | | |
4439 | 4439 | | |
4440 | | - | |
| 4440 | + | |
4441 | 4441 | | |
4442 | 4442 | | |
4443 | 4443 | | |
| 4444 | + | |
| 4445 | + | |
| 4446 | + | |
| 4447 | + | |
4444 | 4448 | | |
4445 | | - | |
4446 | | - | |
| 4449 | + | |
| 4450 | + | |
| 4451 | + | |
4447 | 4452 | | |
4448 | 4453 | | |
4449 | 4454 | | |
4450 | | - | |
| 4455 | + | |
4451 | 4456 | | |
4452 | 4457 | | |
4453 | | - | |
4454 | | - | |
| 4458 | + | |
4455 | 4459 | | |
4456 | 4460 | | |
4457 | 4461 | | |
| |||
0 commit comments