/** * Render the capture data */ static void xshm_video_render(void *vptr, gs_effect_t *effect) { XSHM_DATA(vptr); if (!data->texture) return; gs_eparam_t *image = gs_effect_get_param_by_name(effect, "image"); gs_effect_set_texture(image, data->texture); gs_enable_blending(false); gs_draw_sprite(data->texture, 0, 0, 0); if (data->show_cursor) xcb_xcursor_render(data->cursor); gs_reset_blend_state(); }
/** * Render the capture data */ static void xshm_video_render(void *vptr, gs_effect_t *effect) { XSHM_DATA(vptr); effect = obs_get_opaque_effect(); if (!data->texture) return; gs_eparam_t *image = gs_effect_get_param_by_name(effect, "image"); gs_effect_set_texture(image, data->texture); while (gs_effect_loop(effect, "Draw")) { gs_draw_sprite(data->texture, 0, 0, 0); } if (data->show_cursor) { effect = obs_get_default_effect(); while (gs_effect_loop(effect, "Draw")) { xcb_xcursor_render(data->cursor); } } }