[Cogl] [PATCH 3/7] CoglTexturePixmapX11: add support for stereo content
Owen Taylor
otaylor at fishsoup.net
Sat Jul 5 07:37:21 PDT 2014
On Thu, Jul 3, 2014 at 9:54 PM, Robert Bragg <robert at sixbynine.org> wrote:
> A nice idea that Neil had that avoids the need for the ref-counted
> pixmap registry could be to have a cogl_texture_pixmap_x11_new_right()
> that takes a CoglTexturePixmapX11 *left argument whereby you can keep
> a reference to the left eye and share as much or as little state from
> the left eye tfp as you need.
>
> As a way to make the apis pair up a bit more clearly, I was also
> thinking it could make sense to rename
> cogl_texture_pixmap_x11_new_stereo() to
> cogl_texture_pixmap_x11_new_left().
>
> It looks like this lets us avoid having a new texture object, lets us
> share resources and should be fairly straight forward too I think.
>
Hmm, so the idea is that cogl_texture_pixmap_x11_new_right() returns a
CoglTexturePixmapX11? It's a bit ugly in terms of internal detail,
since a lot of the internals would be along the lines of:
if (tfp->is_right)
{
/* forward to tfp->left */
}
else
{
/* do the normal stuff */
}
but as long as you are OK with that sort of constrained ugliness in
cogl-texture-pixmap-x11.c, it's certainly workable and probably ends up as
less lines of code than the current patch because there's no need for the
boilerplate for a new texture type.
do you imagine:
cogl_texture_pixmap_x11_update_area()
cogl_texture_pixmap_x11_set_damage_object()
as disallowed on the right texture, or would calling them be equivalent to
calling them on the left texture?
- Owen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/cogl/attachments/20140705/7fd0cbd8/attachment.html>
More information about the Cogl
mailing list