mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
parent
168f0955ab
commit
b18209c904
14 changed files with 97 additions and 111 deletions
|
|
@ -3,7 +3,7 @@
|
|||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <stdbool.h>
|
||||
#include <GLES3/gl3.h>
|
||||
#include <GLES2/gl2.h>
|
||||
#include <wlr/render.h>
|
||||
|
||||
struct wlr_surface_state {
|
||||
|
|
@ -11,7 +11,7 @@ struct wlr_surface_state {
|
|||
GLuint tex_id;
|
||||
};
|
||||
|
||||
struct wlr_surface *gles3_surface_init();
|
||||
struct wlr_surface *gles2_surface_init();
|
||||
|
||||
extern const GLchar quad_vertex_src[];
|
||||
extern const GLchar quad_fragment_src[];
|
||||
|
|
@ -20,10 +20,10 @@ extern const GLchar vertex_src[];
|
|||
extern const GLchar fragment_src_RGB[];
|
||||
extern const GLchar fragment_src_RGBA[];
|
||||
|
||||
bool _gles3_flush_errors(const char *file, int line);
|
||||
#define gles3_flush_errors(...) \
|
||||
_gles3_flush_errors(__FILE__ + strlen(WLR_SRC_DIR) + 1, __LINE__)
|
||||
bool _gles2_flush_errors(const char *file, int line);
|
||||
#define gles2_flush_errors(...) \
|
||||
_gles2_flush_errors(__FILE__ + strlen(WLR_SRC_DIR) + 1, __LINE__)
|
||||
|
||||
#define GL_CALL(func) func; gles3_flush_errors()
|
||||
#define GL_CALL(func) func; gles2_flush_errors()
|
||||
|
||||
#endif
|
||||
7
include/wlr/render/gles2.h
Normal file
7
include/wlr/render/gles2.h
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
#ifndef _WLR_GLES2_RENDERER_H
|
||||
#define _WLR_GLES2_RENDERER_H
|
||||
#include <wlr/render.h>
|
||||
|
||||
struct wlr_renderer *wlr_gles2_renderer_init();
|
||||
|
||||
#endif
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
#ifndef _WLR_GLES3_RENDERER_H
|
||||
#define _WLR_GLES3_RENDERER_H
|
||||
#include <wlr/render.h>
|
||||
|
||||
struct wlr_renderer *wlr_gles3_renderer_init();
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue