[GtkGLExt] OpenGL widget fills entire window on OS X [was: OS X Quartz developers...]



The problem seems to be that when rendering to the OpenGL capable
widget it expands to fill the entire window.
If I resize the window the gtk widgets are visible for a split second
before they are covered with white background.
But the OpenGL rendering works fine otherwise.

This is my main rendering loop:

gboolean G_MODULE_EXPORT render(gpointer data){
	
	GtkWidget *widget = GTK_WIDGET(data);
	
	GdkGLContext *glcontext = gtk_widget_get_gl_context (widget);
	GdkGLDrawable *gldrawable = gtk_widget_get_gl_drawable (widget);
	
	if (!gdk_gl_drawable_gl_begin (gldrawable, glcontext))
		return FALSE;
	
	
	glClearColor (1.0, 1.0, 1.0, 1.0);
	glClearDepth (1.0);
	glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
	
	engineIteration();
	
	gdk_gl_drawable_swap_buffers (gldrawable);
	
	gdk_gl_drawable_gl_end (gldrawable);

	return TRUE;
}

Regards
Jacob K

On Sun, Nov 22, 2009 at 11:49 AM, Jacob Juul Kolding <jacob juvul com> wrote:
> On Nov 21, 2009, at 6:30 AM, Braden McDaniel wrote:
>
> On Sat, 2009-11-21 at 02:33 +0100, Jack Skellington wrote:
>
> Hi all!
>
> I'm currently working on porting a commercial Gtk+ OpenGL App to Snow
>
> Leopard using the actively developed and maintained Gtk+ OS X Quartz
>
> backend. My last problem now is that GtkGlExt only works with X11. I'm
>
> not familiar with the Low Level OS X API's, so I'd properly wouldn't
>
> be able to write the backend myself but I think it would be awesome if
>
> someone here could help with the native OS X backend, getting closer
>
> to a fully supported native Gtk+ :)
>
> This patch is probably a good starting point:
>
>        https://sourceforge.net/tracker/?func=detail&aid=2750584&group_id=54333&atid=473436
>
> I'll try to get back to reviewing this soon; though it might have to
> wait until I get my KVM back from RMA.
>
> Do let me know how it goes for you.
>
> I managed to apply the patch and compile both GtkGLExt and my app, but when
> I start my app
> the main windows is complete empty of any gtk widgets (white background
> everywhere), the only thing thats visible is the borders I draw in the
> opengl area, but
> when I move the mouse up the the invisible file menu I'm able to open other
> (non opengl) windows which works as expected??
> Regards
> Jacob Kolding
> dacobi juvul com
>
> --
> Braden McDaniel <braden endoframe com>
>
> _______________________________________________
> gtkglext-list mailing list
> gtkglext-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkglext-list
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Gtk-osx-users mailing list
> Gtk-osx-users lists sourceforge net
> https://lists.sourceforge.net/lists/listinfo/gtk-osx-users
>
>


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