forked from yshui/picom
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request yshui#1189 from yshui/libepoxy
Use libepoxy + fix OpenBSD build
- Loading branch information
Showing
16 changed files
with
68 additions
and
270 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ packages: | |
- uthash | ||
- libconfig | ||
- libglvnd | ||
- libepoxy | ||
- dbus | ||
- pcre | ||
sources: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,6 @@ root = true | |
indent_style = tab | ||
indent_size = 8 | ||
max_line_length = 90 | ||
[*.nix] | ||
indent_style = space | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
// SPDX-License-Identifier: MPL-2.0 | ||
// Copyright (c) Yuxuan Shui <[email protected]> | ||
#pragma once | ||
#include <EGL/egl.h> | ||
#include <EGL/eglext.h> | ||
#include <GL/gl.h> | ||
#include <GL/glext.h> | ||
#include <epoxy/egl.h> | ||
#include <epoxy/gl.h> | ||
#include <stdbool.h> | ||
#include <xcb/render.h> | ||
#include <xcb/xcb.h> | ||
|
@@ -24,8 +22,4 @@ struct eglext_info { | |
|
||
extern struct eglext_info eglext; | ||
|
||
#ifdef EGL_MESA_query_driver | ||
extern PFNEGLGETDISPLAYDRIVERNAMEPROC eglGetDisplayDriverName; | ||
#endif | ||
|
||
void eglext_init(EGLDisplay); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
// SPDX-License-Identifier: MPL-2.0 | ||
// Copyright (c) Yuxuan Shui <[email protected]> | ||
#include <GL/gl.h> | ||
#include <GL/glext.h> | ||
#include <epoxy/gl.h> | ||
#include <stdbool.h> | ||
#include <stdio.h> | ||
#include <string.h> | ||
|
@@ -972,8 +971,8 @@ bool gl_init(struct gl_data *gd, session_t *ps) { | |
} else { | ||
gd->is_nvidia = false; | ||
} | ||
gd->has_robustness = gl_has_extension("GL_ARB_robustness"); | ||
gd->has_egl_image_storage = gl_has_extension("GL_EXT_EGL_image_storage"); | ||
gd->has_robustness = epoxy_has_gl_extension("GL_ARB_robustness"); | ||
gd->has_egl_image_storage = epoxy_has_gl_extension("GL_EXT_EGL_image_storage"); | ||
gl_check_err(); | ||
|
||
return true; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
// SPDX-License-Identifier: MPL-2.0 | ||
// Copyright (c) Yuxuan Shui <[email protected]> | ||
#pragma once | ||
#include <GL/gl.h> | ||
#include <GL/glext.h> | ||
#include <epoxy/gl.h> | ||
#include <stdbool.h> | ||
#include <string.h> | ||
|
||
|
@@ -264,26 +263,6 @@ static inline bool gl_check_fb_complete_(const char *func, int line, GLenum fb) | |
|
||
#define gl_check_fb_complete(fb) gl_check_fb_complete_(__func__, __LINE__, (fb)) | ||
|
||
/** | ||
* Check if a GL extension exists. | ||
*/ | ||
static inline bool gl_has_extension(const char *ext) { | ||
int nexts = 0; | ||
glGetIntegerv(GL_NUM_EXTENSIONS, &nexts); | ||
for (int i = 0; i < nexts || !nexts; i++) { | ||
const char *exti = (const char *)glGetStringi(GL_EXTENSIONS, (GLuint)i); | ||
if (exti == NULL) { | ||
break; | ||
} | ||
if (strcmp(ext, exti) == 0) { | ||
return true; | ||
} | ||
} | ||
gl_clear_err(); | ||
log_info("Missing GL extension %s.", ext); | ||
return false; | ||
} | ||
|
||
static const GLuint vert_coord_loc = 0; | ||
static const GLuint vert_in_texcoord_loc = 1; | ||
|
||
|
Oops, something went wrong.