Re: subwindow-less Gtk+ and offscreen windows



Well, that copying is completely done inside that widget's code, not
the code that uses the widget. There it doesn't matter if we have to
do some fancy stuff to take clipping into account. The thing is that
we don't want to bother the user of te widget with things like
clipping.

On Tue, Aug 5, 2008 at 2:50 AM, Cody Russell <bratsche gnome org> wrote:
> Yeah, you can render your scene to an FBO.. but then you're back to the
> original problem, aren't you?  You have to display it to your window at
> the widget's position and clipped by the widget's dimensions.  Or am I
> missing something obvious?
>
> On Tue, 2008-08-05 at 02:17 +0200, Lieven van der Heide wrote:
>> For OpenGL, something we could do is let the OpenGL widget's user
>> render to an offscreen buffer, and when he's done, blit the whole
>> result to the target window. This way, all the stuff like overlapping
>> windows will still work with opengl widgets, like with any other
>> widget. It may have a slight performance impact, but I think it will
>> be really minimal if the blitting is done by the hardware (so no cpu
>> reading back from video mem). Of course we'll have to do a performance
>> test before we implement something like this, but I think it might
>> work.
>>
>> On Mon, Aug 4, 2008 at 11:57 PM, Lieven van der Heide
>> <lievenvanderheide gmail com> wrote:
>> > I don't think that will work, since the user of the gl widget may want
>> > to change the viewport as well, and the coordinates in glViewport are
>> > always absolute, not relative to the current one.
>> >
>> > But anyway, would it really be a problem to just have an X window,
>> > only for widgets that really need it, and let normal GTK widgets,
>> > like text fields and event boxes do their own clipping?
>> >
>> > I do agree with Alexander that it would make things a lot more
>> > flexible. I only wouldn't know if it's possible without braking
>> > API/ABI
>> >
>> > On Mon, Aug 4, 2008 at 11:33 PM, Cody Russell <bratsche gnome org> wrote:
>> >> On Sat, 2008-08-02 at 21:35 +0200, Alexander Larsson wrote:
>> >>> * Some operations require an X window id, for example:
>> >>>    + glXMakeCurrent()
>> >>>       so that you can draw into a window with opengl.
>> >>>       You can still draw to the toplevel window, but you can't
>> >>>       have GdkOffscreenWindow automatically clip the opengl drawing
>> >>>       calls (i think).
>> >>
>> >> Would it work if there were a new GL widget that took care of
>> >> glXMakeCurrent() using the toplevel X window and did glViewport()
>> >> internally using the widget's coordinates or something?
>> >>
>> >> _______________________________________________
>> >> gtk-devel-list mailing list
>> >> gtk-devel-list gnome org
>> >> http://mail.gnome.org/mailman/listinfo/gtk-devel-list
>> >>
>> >
>
>


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