Re: subwindow-less Gtk+ and offscreen windows

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

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
> 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

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