mirror of
https://github.com/swaywm/sway.git
synced 2026-04-22 06:46:27 -04:00
initial renderer work
This commit is contained in:
parent
06f19c81a4
commit
4891c1661c
4 changed files with 341 additions and 0 deletions
35
include/sway/desktop/renderer/opengl.h
Normal file
35
include/sway/desktop/renderer/opengl.h
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
#ifndef _SWAY_OPENGL_H
|
||||
#define _SWAY_OPENGL_H
|
||||
|
||||
#include <GLES2/gl2.h>
|
||||
|
||||
struct gles2_tex_shader {
|
||||
GLuint program;
|
||||
GLint proj;
|
||||
GLint tex;
|
||||
GLint alpha;
|
||||
GLint pos_attrib;
|
||||
GLint tex_attrib;
|
||||
};
|
||||
|
||||
struct gles2_renderer {
|
||||
struct wlr_egl *egl;
|
||||
float projection[9];
|
||||
uint32_t viewport_width;
|
||||
uint32_t viewport_height;
|
||||
|
||||
// Shaders
|
||||
struct {
|
||||
struct {
|
||||
GLuint program;
|
||||
GLint proj;
|
||||
GLint color;
|
||||
GLint pos_attrib;
|
||||
} quad;
|
||||
struct gles2_tex_shader tex_rgba;
|
||||
struct gles2_tex_shader tex_rgbx;
|
||||
struct gles2_tex_shader tex_ext;
|
||||
} shaders;
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue