[Libva] Render to texture

Bian, Jonathan jonathan.bian at intel.com
Wed Mar 17 07:28:57 PDT 2010


Hi Nanhai,

Gwenole has proposed a few new APIs to support rendering a decoded surface into a GL texture. See the attached header file as well as the following sample code from Gwenole, and your comments are welcome.

Regards,
Jonathan 

---
va_dpy = vaGetDisplayGLX();

glGenTextures(1, &gl_texture);
<setup a BGRA texture for example>

vaCreateSurfaceGLX(va_dpy, GL_TEXTURE_2D, gl_texture, &gl_surface);

vaCreateSurface(va_dpy, 1, &va_surface);
vaBeginPicture(va_dpy, va_context, va_surface);
 ...
vaEndPicture(va_dpy, va_surface);

vaCopySurfaceGLX(va_dpy, gl_surface, va_surface, flags);
---

-----Original Message-----
From: Zou, Nanhai 
Sent: Wednesday, March 17, 2010 1:34 AM
To: Bian, Jonathan
Cc: libva at lists.freedesktop.org
Subject: Render to texture

Hi Jonathan,
	As we have discussed, people are interested to let libva be able to render to texture object.
	Form our driver level, it is pretty easy for our driver to render to a pixmap.
	However pixmap is X related concept. From the libva level, it is better to have an ID to represent some kind of texture object. How would you propose the "render to texture" API?

Thanks
Zou Nanhai

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: va_glx.h
URL: <http://lists.freedesktop.org/archives/libva/attachments/20100317/fa72349e/attachment.asc>


More information about the Libva mailing list