Bläddra i källkod

libobs-opengl: Enable imported dmabufs for rendering

For now just tag all imported images with GS_RENDER, this may not work
for some images that were produced by some hardware other than the GPU
render engines. But since we don't import VA-API decoded frames we
probably won't run into this. And we need this to render into VA-API
frames destined for encoding.
Kurt Kartaltepe 2 år sedan
förälder
incheckning
34950f7fb2
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      libobs-opengl/gl-egl-common.c

+ 1 - 1
libobs-opengl/gl-egl-common.c

@@ -186,7 +186,7 @@ struct gs_texture *gl_egl_create_texture_from_eglimage(
 
 	struct gs_texture *texture = NULL;
 	texture = gs_texture_create(width, height, color_format, 1, NULL,
-				    GS_GL_DUMMYTEX);
+				    GS_GL_DUMMYTEX | GS_RENDER_TARGET);
 	const GLuint gltex = *(GLuint *)gs_texture_get_obj(texture);
 
 	gl_bind_texture(GL_TEXTURE_2D, gltex);