return texture;
}
-int create_gl_resources(Compositor *compositor, CompositedScreen *screen)
+int create_gl_resources(CompositedScreen *screen)
{
unsigned stride;
int loc;
- use_gl(compositor, screen);
-
screen->shaders[0] = compile_shader(GL_VERTEX_SHADER, vshader_src);
screen->shaders[1] = compile_shader(GL_FRAGMENT_SHADER, fshader_src);
screen->shaders[2] = compile_shader(GL_FRAGMENT_SHADER, masked_fshader_src);
if(!initialize_gl(compositor, screen))
return 0;
- if(!create_gl_resources(compositor, screen))
+ use_gl(compositor, screen);
+
+ if(!create_gl_resources(screen))
return 0;
xrr_res = XRRGetScreenResources(compositor->display, screen->root);
if((screen = find_screen_by_root(compositor, event->event)))
if((window = find_window(screen, event->window)))
+ {
+ use_gl(compositor, screen);
remove_window(compositor, screen, window, 1);
+ }
}
void process_map_event(Compositor *compositor, XMapEvent *event)