wayvnc/include/render.h

24 lines
521 B
C
Raw Normal View History

2019-10-06 17:14:53 +00:00
#pragma once
#include <GLES2/gl2.h>
#include <EGL/egl.h>
2019-10-06 17:14:53 +00:00
struct dmabuf_frame;
struct renderer {
EGLDisplay display;
EGLSurface surface;
EGLContext context;
GLuint shader_program;
uint32_t width;
uint32_t height;
GLint read_format;
GLint read_type;
};
2019-10-06 17:14:53 +00:00
int render_dmabuf_frame(struct renderer* self, struct dmabuf_frame* frame);
/* Copy a horizontal stripe from the GL frame into a pixel buffer */
void render_copy_pixels(struct renderer* self, void* dst, uint32_t y,
uint32_t height);