Explorar el Código

libobs: Clear image on color convert

Avoid redrawing potentially stale image from previous frame.
jpark37 hace 3 años
padre
commit
d72d2552ee
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      libobs/obs-source.c

+ 3 - 0
libobs/obs-source.c

@@ -2563,6 +2563,9 @@ static void source_render(obs_source_t *source, gs_effect_t *effect)
 			    source_space)) {
 			gs_enable_blending(false);
 
+			struct vec4 clear_color;
+			vec4_zero(&clear_color);
+			gs_clear(GS_CLEAR_COLOR, &clear_color, 0.0f, 0);
 			gs_ortho(0.0f, (float)cx, 0.0f, (float)cy, -100.0f,
 				 100.0f);