[QT] double-buffering - Linux
This is a discussion on [QT] double-buffering - Linux ; Hello,
I'm trying to do double-buffering on a custom widget. This is what I do:
- create a QBitmap as large as the widget;
- BitBlt the widget in that bitmap;
- design everything on that bitmap;
- BitBlt the ...
-
[QT] double-buffering
Hello,
I'm trying to do double-buffering on a custom widget. This is what I do:
- create a QBitmap as large as the widget;
- BitBlt the widget in that bitmap;
- design everything on that bitmap;
- BitBlt the bitmap back to the widget;
it works, but I continue to see some flickering. I'm looking at the
tcannon10.cpp example on the Trolltech site and it seems they're doing just
like me. Does somebody has to share some comment about it? any real-world example?
thanks in advance.
--
SF
-
Re: double-buffering
On 9 Okt., 20:49, Dildo Bogumil di Boscopelo
wrote:
> - create a QBitmap as large as the widget;
> - BitBlt the widget in that bitmap;
> - design everything on that bitmap;
> - BitBlt the bitmap back to the widget;
>
> it works, but I continue to see some flickering. I'm looking at the
> tcannon10.cpp example on the Trolltech site and it seems they're doing just
> like me. Does somebody has to share some comment about it? any real-world example?
Only BitBlt the dirty rectangle not the whole widget.
In my application i don't keep the bitmap instead i allocate it each
time when i get a paint event
(i'm using FOX not QT but this shouldn't matter). TK is doing the same
and it seems to work fine.
The big performance problem with this is that most device drivers like
NVidias are very broken and
you can't be sure that a pixmap is really allocated in video ram and
so all drawing operations might
be terrible slow.
-
Re: double-buffering
llothar wrote:
> Only BitBlt the dirty rectangle not the whole widget.
Ok, I'll give it a try.
> In my application i don't keep the bitmap instead i allocate it each
> time when i get a paint event
> (i'm using FOX not QT but this shouldn't matter). TK is doing the same
> and it seems to work fine.
I do the same too.
>
> The big performance problem with this is that most device drivers like
> NVidias are very broken and
> you can't be sure that a pixmap is really allocated in video ram and
> so all drawing operations might
> be terrible slow.
>
I see. How did you solve it? If there's a way, of course..
--
SF
Dildo, contro il logorio della vita moderna.
-
Re: double-buffering
On 9 Okt., 21:43, Dildo Bogumil di Boscopelo
wrote:
> > The big performance problem with this is that most device drivers like
> > NVidias are very broken and
> > you can't be sure that a pixmap is really allocated in video ram and
> > so all drawing operations might
> > be terrible slow.
>
> I see. How did you solve it? If there's a way, of course..
Recommending Matrox Card to my customers.
And when i find some time i have to optimize the redraw operations
that
even the CPU can do it fast enough.
Oh yeah, complaining on some mailing lists that are read by the X11
team
might help for the future. I whish there would be a more useable X11
builtin
extension for it (i know there is some double buffering extension but
it is
unuseable for my purpose, keeping a complete pixmap all the time for
every
window even if not visisble - that sucks the memory out of your
system).