Re: [GtkGLExt] Working on GTK 3 support; feedback requested



Hi

> > Can I find your patches somewhere?
> 
> Not yet; all I've really done so far is bump the version number to 2.0
> (actually 1.99) and make GdkGLWindow and GdkGLPixmap derive from GObject
> instead of GdkDrawable.  Beyond that it's just exploratory, nothing
> ready for use yet.

Ok, thanks for the info. I'm looking forward to here from you as soon as
you have something. :) BTW, it might be a good idea to increment the
major version to 3, to reflect the dependency on GDK 3.

> > Regarding the issues with GdkGLPixmap, why not simply let it maintain
> > its own internal X Pixmap? A GdkGLPixmap would be created with a call
> > like
> > 
> >   GdkGLPixmap* gdk_gl_pixmap_new(gint width,
> >                                  gint height,
> >                                  const int *attrib_list)
> > 
> > The X Pixmap would be queried via
> > 
> >   Pixmap gdk_x11_gl_pixmap_get_pixmap(GdkGLPixmap *gdkpixmap)
> > 
> > Supplying the returned X Pixmap to cairo_xlib_surface_create_for_bitmap
> > would give the user a cairo context to draw to.
> 
> The problem with that approach is that it sacrifices the
> platform-independence that GDK provides; applications would have to
> directly call Xlib or Win32 functions and link against the
> platform-specific libraries that provide them.  I think it'd be good for
> GtkGLExt to provide an "escape hatch" for working with platform-specific
> stuff if *necessary*, but it shouldn't be *required*.

Good point. So wrapping this by some function would make sense.
Providing something like

  cairo_surface_t* gdk_gl_pixmap_get_surface(GdkGLPixmap *gdkpixmap)

would probably do the job.

Best regards
Thomas

-- 
GnuPG:          http://tdz.users.sourceforge.net/tdz.asc
Fingerprint:    16FF F599 82F8 E5AA 18C6 5220 D9DA D7D4 4EF1 DF08

jsapigen - A free glue-code generator for Mozilla SpiderMonkey. See
http://jsapigen.sourceforge.net for more information.

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]