wip video device

This commit is contained in:
2025-09-21 17:46:19 +02:00
parent 724eec9241
commit 2be15dc7c9
12 changed files with 3319 additions and 28 deletions
+17
View File
@@ -1,7 +1,9 @@
#include <GLFW/glfw3.h>
#include <glad/egl.h>
#include <glad/gl.h>
#include <hashmap.h>
#include <linmath.h>
#include <linux/videodev2.h>
#include <stdbool.h>
#include <sys/time.h>
#include <time.h>
@@ -72,8 +74,23 @@ typedef struct ShaderProgram {
unsigned int sub_type_count;
unsigned int sub_variant_count;
GLuint *sub_locations;
EGLDisplay egl_display;
} ShaderProgram;
typedef struct VideoDevice {
char *name;
bool error;
int fd;
int exp_fd;
unsigned int width;
unsigned int height;
unsigned int pixelformat;
unsigned int bytesperline;
struct v4l2_buffer buf;
EGLImageKHR dma_image;
} VideoDevice;
typedef GLFWwindow Window;
typedef struct Context {