moved things around
This commit is contained in:
parent
7e2171681d
commit
35d8ca7358
3 changed files with 45 additions and 10 deletions
12
glonkers.c
12
glonkers.c
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue