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



I've read a bit more on the Next Step windowing system (a bit more). AAAhhhh if I only had the time.

You may be on the right track, which still points to the fact that you are deriving the object from NSView instead of NSOpenGLView. NSOpenGLView implements a lot mechanism that are required for Composer (part of the windowing system) to set it up correctly. It may be that in your imp the required initialization procedures are not being done, or the methods necessary to control the actual GL window itself are not there. 

NSOpenGLView IS a NSView with addition initialization and implementation routines necessary for the GL window.


i'm EMAILING FOR THE GREATER GOOD
Join me


> From: jacob juvul com
> Date: Wed, 25 Nov 2009 21:01:06 +0100
> To: gtkglext-list gnome org
> CC: shashaness hotmail com
> Subject: Re: [GtkGLExt] OpenGL widget fills entire window on OS X [was: OS X Quartz developers...]
>
> On Nov 23, 2009, at 8:21 AM, Andrey Gruzdev wrote:
>
> > Hello.
> > The problem with non-OpenGL widgets takes place only with new GTK versions.
> > Then I wrote this patch and test it with gtk 2.14 beta framework build and some later builds (built with jhbuild script) this problem does not appear.
> > Unfortunately I have not free time now but I hope to get it soon and spend some for this project.
> > There are no Low Level API used in my patch. Only NSOpenglView, NSOpenglContext and some related functions.
>
> Could it be that NSOpenGL - View/Context, gets the wrong coordinates?
> I don't know windowing in Cocoa but I guess there is a hierarchy of NSView and that Context needs a NSRect from
> the gldrawable gtk widget?
>
> /Jacob
>
> > Andrey.
> >
> > On 22.11.2009, at 20:27, Jack Skellington wrote:
> >
> >> 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
> >>>
> >>>
> >> _______________________________________________
> >> gtkglext-list mailing list
> >> gtkglext-list gnome org
> >> http://mail.gnome.org/mailman/listinfo/gtkglext-list
> >
> > _______________________________________________
> > gtkglext-list mailing list
> > gtkglext-list gnome org
> > http://mail.gnome.org/mailman/listinfo/gtkglext-list
>


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