Condense GLX extension lookup
Put them all into one function, and move the function pointers out of glx_session_t, making them global variables (because them don't change after initialized). Remove the function pointer typedefs and replace them with the ones in glxext.h We also only lookup the functions once per a lifetime of compton. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
@ -1121,6 +1121,9 @@ static bool init_alpha_picts(session_t *ps) {
|
||||
|
||||
bool init_render(session_t *ps) {
|
||||
// Initialize OpenGL as early as possible
|
||||
#ifdef CONFIG_OPENGL
|
||||
glxext_init(ps->dpy, ps->scr);
|
||||
#endif
|
||||
if (bkend_use_glx(ps)) {
|
||||
#ifdef CONFIG_OPENGL
|
||||
if (!glx_init(ps, true))
|
||||
|
Reference in New Issue
Block a user