Re: unmap event not emitted?



On Mon, 2010-05-24 at 10:17 +0200, Oscar Lazzarino wrote:
> On Fri, May 21, 2010 at 9:16 PM, Emmanuele Bassi <ebassi gmail com> wrote:
> > On Thu, 2010-05-20 at 12:41 +0200, Oscar Lazzarino wrote:
> >> Hi, I'm trying to catch the unmap or unmap-event signals, but it looks
> >> to me like they are not emitted.
> >
> > don't.
> >
> > https://bugzilla.gnome.org/show_bug.cgi?id=613302
> >
> >   * For performance reasons GTK+ may not emit ::unmap-event, so one
> >   * should always also implement ::unrealize in order to release
> >   * resources and disconnect signal handlers.
> 
> But you CAN'T release your textures and other GL resource in the
> unrealize method, because the gdk window will be already unmapped
> then, and gl_begin (either as glwindow->gl_begin(get_gl_context()) in
> C++ or gdk_gl_drawable_gl_begin (gldrawable, glcontext in plain C)
> will fail :-/

I suggest you look at the APPLE_purgeable_object extension if you want
to forcibly evict resources from the GPU memory - but mind you: it
should not be strictly necessary. resources are usually garbage
collected by the drivers.

ciao,
 Emmanuele.

-- 
W: http://www.emmanuelebassi.name
B: http://blogs.gnome.org/ebassi



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