moved things around

This commit is contained in:
Rakarake 2025-12-25 19:37:53 +01:00
parent 7e2171681d
commit 35d8ca7358
3 changed files with 45 additions and 10 deletions

View file

@ -9,6 +9,7 @@
#include <sys/mman.h>
#include "renderer.h"
#include "wayland.h"
#include <string.h>
struct timespec program_start;
@ -26,15 +27,24 @@ double time_since_start() {
int main(int argc, char *argv[]) {
char *shader_path = NULL;
int output_type = OUTPUT_WINDOW;
if (argc >= 2) {
shader_path = argv[1];
} else {
printf("need to supply path to shader\n");
exit(1);
}
if (argc >= 3) {
// xdg toplevel window (window) or wlr_layer_shell window (layer)
if (strcmp(argv[2], "window")) {
output_type = OUTPUT_WINDOW;
} else if (strcmp(argv[2], "layer")) {
output_type = OUTPUT_LAYER;
}
}
struct client_state state;
wayland_init(&state);
wayland_init(&state, output_type);
Renderer renderer = new_renderer();