0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00

libobs: Use alpha when rendering scenes

This is just in case a filter is applied to a scene, filters will turn
off the blending so it's necessary to set the blending.
This commit is contained in:
jp9000 2015-03-21 10:33:10 -07:00
parent 0a8e3a643c
commit 4abae186ce

View File

@ -306,6 +306,9 @@ static void scene_video_render(void *data, gs_effect_t *effect)
item = scene->first_item;
gs_blend_state_push();
gs_blend_function(GS_BLEND_SRCALPHA, GS_BLEND_INVSRCALPHA);
while (item) {
if (obs_source_removed(item->source)) {
struct obs_scene_item *del_item = item;
@ -326,6 +329,8 @@ static void scene_video_render(void *data, gs_effect_t *effect)
item = item->next;
}
gs_blend_state_pop();
pthread_mutex_unlock(&scene->mutex);
UNUSED_PARAMETER(effect);