allocation of wayland state memory in main
This commit is contained in:
parent
92ce71b5f1
commit
09ac1a0559
3 changed files with 19 additions and 20 deletions
|
|
@ -5,7 +5,6 @@
|
|||
#include <stdint.h>
|
||||
#include <wayland-client.h>
|
||||
#include <wayland-util.h>
|
||||
#include <SDL3/SDL.h>
|
||||
#include <pthread.h>
|
||||
#include <sys/mman.h>
|
||||
#include "renderer.h"
|
||||
|
|
@ -36,13 +35,14 @@ int main(int argc, char *argv[]) {
|
|||
exit(1);
|
||||
}
|
||||
|
||||
struct client_state state = wayland_init();
|
||||
struct client_state state;
|
||||
wayland_init(&state);
|
||||
|
||||
Renderer renderer = new_renderer();
|
||||
|
||||
while (running) {
|
||||
double time = time_since_start();
|
||||
render(&renderer, state.width, state.height, time, shader_path, false);
|
||||
render(&renderer, state.width, state.height, time, shader_path, 0);
|
||||
commit(&state);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue