gnu3dkit-dev
[Top][All Lists]
Advanced

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

Re: [Gnu3dkit-dev] GSXView


From: Alexander Malmberg
Subject: Re: [Gnu3dkit-dev] GSXView
Date: Mon, 28 Oct 2002 22:07:35 +0100

Lyndon Tremblay wrote:
> 
> On 2002-10-28 14:23:37 -0500 Frederic De Jaeger <address@hidden> wrote:
[snip]
> > In fact, it may be quite simple to attach a GL context to any view that
> > is not rotated:  Just create a sub xwindow located exactly at the
> > position of the given view in it enclosing NSWindow (and update it
> > when the context receives the -update message)
> > We don't  need the GSXView for that anymore...

But it would still need some sort of backend code, and a generic way of
creating X Window:s and attaching them to views might be useful
(although it's probably better to start small just to make sure that
it'll actually work).

> > what is the semantic with respects to subviews, in this case ?
> > Because in this implementation, no subviews will be visible anymore.
> > Nor any overlapping view (because the drawing of such views will be
> > clipped by the glx window.)

And that's the semantics! :)

As someone who would want to use an OpenGL in GNUstep apps (and who has
used OpenGL/glX before), I think this is completely reasonable.

[snip]
> If the subviews are inside of the NSOpenGLView (or NSView with
> NSOpenGLContext), if these views are draws in some top-down
> order (parent to children). I believe you can use regular Xlib
> commands on an OpenGL context.

I'm fairly certain that this isn't possible, at least not in general.

> The only thing is these subviews
> would need to have a new X context to draw to.

Actually handling this would be messy. Considering that we probably
won't be able to support OpenGL views completely anyway (rotated?
sheared? what if the view is asked to draw on a different
NSGraphicsContext, eg. while printing?), I think that trying to handle
it would just introduce a bunch of unnecessary messy code and problems.

Portability is also an issue. Unless all backends (that support OpenGL)
can handle all this, it's of no use when writing portable apps that use
OpenGL.

Anyway, 'OpenGL views are special, don't {rotate,shear,put stuff on top
of,print} it' seems perfectly ok to me. :)

- Alexander Malmberg




reply via email to

[Prev in Thread] Current Thread [Next in Thread]