Re: [GtkGLExt] GtkGlExt and OSMesa
- From: Alif Wahid <alif wahid gmail com>
- To: Stephane Popinet <s popinet niwa co nz>
- Cc: gtkglext-list gnome org
- Subject: Re: [GtkGLExt] GtkGlExt and OSMesa
- Date: Tue, 18 Jan 2005 19:47:38 +1300
Hi Stephane,
> I am trying to use OSMesa to do offscreen rendering within a GtkGlExt
> program.
What about using the offscreen rendering facility provided by
GtkGLExt? Have you looked at the "pixmap" example that comes with
GtkGLExt?
> The problem I have is that after I set the current openGL context to
> OSMesa using sthg like:
>
> OSMesaContext ctx = OSMesaCreateContextExt (OSMESA_RGBA, 16, 0, 0, NULL);
> OSMesaMakeCurrent (ctx, image, GL_UNSIGNED_BYTE, width, height);
> render_image();
> save_image();
> OSMesaDestroyContext (ctx);
>
> and try to rerender the image in a GtkGlExt window, nothing is rendered.
>
> I suppose it is not very surprising as I expect I have to restore the
> GtkGlExt context in some way. How would you do this?
>
> I have tried calling gdk_gl_drawable_make_current() after
> OSMesaDestroyContext (ctx), using the saved GdkGlContext and
> GdkGlDrawable but this does not seem to work.
GtkGLExt and OSMesa are using different contexts as far as I can see.
I doubt whether it's as simple as just restoring the GtkGLExt context
once you're finished rendering a frame using the OSMesa context. You
might have to go one level down and use platform specific context,
which both of these libraries are relying on.
> Any help would be much appreciated. A complete example on how to use
> OSMesa within GtkGlExt would be ideal but any other suggestion or option
> for offscreen rendering would be welcome.
I would suggest that you try out offscreen rendering using GtkGLExt.
Hope this helps.
Cheers.
Alif.
--
"Heaven is the peaceful place on earth...New Zealand."
-- Alif Wahid.
P.S. Is February going to be as bad as January on the weather front in Auckland?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]