Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » flicker
flicker [message #4913] Fri, 25 August 2006 00:07 Go to next message
jadeite is currently offline  jadeite
Messages: 42
Registered: January 2006
Member
Hello,

Upp 608-dev
iMac Intel core-duo, 2GB ram, 150 GB hard drive for WinXP


In the Drawing package example app, I get alot of flickering of the text "Drawing" and the grey lines when resizing the app. Do others see flickering in this example?

Most apps on this machine scream, so I'm surprised to see the flickering.

Thanks

[Updated on: Fri, 25 August 2006 00:07]

Report message to a moderator

Re: flicker [message #4914 is a reply to message #4913] Fri, 25 August 2006 00:19 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
jadeite wrote on Thu, 24 August 2006 18:07

Hello,

Upp 608-dev
iMac Intel core-duo, 2GB ram, 150 GB hard drive for WinXP


In the Drawing package example app, I get alot of flickering of the text "Drawing" and the grey lines when resizing the app. Do others see flickering in this example?

Most apps on this machine scream, so I'm surprised to see the flickering.

Thanks



Actually, see discussion in development threads - this is a long debate. I could avoid flickering forever adding single line to Ctrl constructor, but that would result in lower performance on older machines (including my 6 month old Sempron notebook).

So we are still trying to find the right balance...

Mirek
Re: flicker [message #4939 is a reply to message #4914] Sun, 27 August 2006 15:07 Go to previous messageGo to next message
jadeite is currently offline  jadeite
Messages: 42
Registered: January 2006
Member
luzr wrote on Thu, 24 August 2006 18:19

jadeite wrote on Thu, 24 August 2006 18:07

Hello,

Upp 608-dev
iMac Intel core-duo, 2GB ram, 150 GB hard drive for WinXP


In the Drawing package example app, I get alot of flickering of the text "Drawing" and the grey lines when resizing the app. Do others see flickering in this example?

Most apps on this machine scream, so I'm surprised to see the flickering.

Thanks



Actually, see discussion in development threads - this is a long debate. I could avoid flickering forever adding single line to Ctrl constructor, but that would result in lower performance on older machines (including my 6 month old Sempron notebook).

So we are still trying to find the right balance...

Mirek

Interesting, you are not double buffering. Now I know why U++ apps feel so responsive and 'light' when resizing. Well, I have to admit that I am surprised that more of your controls, text, etc. do not flicker more than they do. But, basic stuff in that example flickers, so I'm guessing that in most complicated/phat apps, double buffering will be preferred. How do I easily turn on double buffering for the complete app at once? Is it a big performance killer in U++?

[Updated on: Sun, 27 August 2006 15:08]

Report message to a moderator

Re: flicker [message #4940 is a reply to message #4939] Sun, 27 August 2006 17:38 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

jadeite wrote on Sun, 27 August 2006 09:07


Interesting, you are not double buffering. Now I know why U++ apps feel so responsive and 'light' when resizing. Well, I have to admit that I am surprised that more of your controls, text, etc. do not flicker more than they do. But, basic stuff in that example flickers, so I'm guessing that in most complicated/phat apps, double buffering will be preferred. How do I easily turn on double buffering for the complete app at once? Is it a big performance killer in U++?


Just put BackPaint() in your app constructor. There can be some slowdown but it is only visible if your hardware is old.
Re: flicker [message #4941 is a reply to message #4940] Sun, 27 August 2006 19:01 Go to previous messageGo to next message
jadeite is currently offline  jadeite
Messages: 42
Registered: January 2006
Member
unodgs wrote on Sun, 27 August 2006 11:38

jadeite wrote on Sun, 27 August 2006 09:07


Interesting, you are not double buffering. Now I know why U++ apps feel so responsive and 'light' when resizing. Well, I have to admit that I am surprised that more of your controls, text, etc. do not flicker more than they do. But, basic stuff in that example flickers, so I'm guessing that in most complicated/phat apps, double buffering will be preferred. How do I easily turn on double buffering for the complete app at once? Is it a big performance killer in U++?


Just put BackPaint() in your app constructor. There can be some slowdown but it is only visible if your hardware is old.

That's better, much less flicker. There is no noticeable performance difference at all on my hardware.
Thanks.
Re: flicker [message #4943 is a reply to message #4940] Sun, 27 August 2006 19:41 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
unodgs wrote on Sun, 27 August 2006 11:38

jadeite wrote on Sun, 27 August 2006 09:07


Interesting, you are not double buffering. Now I know why U++ apps feel so responsive and 'light' when resizing. Well, I have to admit that I am surprised that more of your controls, text, etc. do not flicker more than they do. But, basic stuff in that example flickers, so I'm guessing that in most complicated/phat apps, double buffering will be preferred. How do I easily turn on double buffering for the complete app at once? Is it a big performance killer in U++?


Just put BackPaint() in your app constructor. There can be some slowdown but it is only visible if your hardware is old.


Well, to be more correct, call it for all of your main windows...

In fact, I think that we should backpaint much more than we do now, virtually all of "small" Ctrls. Maybe the BackPaint (or better Transparent, which implies BackPaint) could be default...

Mirek
Re: flicker [message #4944 is a reply to message #4939] Sun, 27 August 2006 19:45 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Quote:

Interesting, you are not double buffering. Now I know why U++ apps feel so responsive and 'light' when resizing. Well, I have to admit that I am surprised that more of your controls, text, etc.



Well, because in fact, I play very complex battle with the problem... Some areas are backpainted, some are not. U++ Paint routine is one of the most complicated stuff I have ever done (and still working on it).

Mirek
Re: flicker [message #12710 is a reply to message #4913] Tue, 13 November 2007 17:52 Go to previous messageGo to next message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
Hi there,

I get a lot of flicker and I find that BackPaint() doesnt appear to make any difference.

I do all my drawing to an ImageBuffer which is the same size as my main window. I then use DrawImage to put this on the screen. I also have a DrawGrid function which draws directly to the screen but even with this turned off, I get a lot of flicker. With it switched on I get noticeable tearing as I drag the window contents with the mouse.

I have BackPaint() in my TopWindow constructor.

EDIT: I have also tried adding BackPaint from my InsetFrame and from my SplitterFrame although that is not allowed. Nothing works.

Any ideas please?

Nick

[Updated on: Tue, 13 November 2007 22:16]

Report message to a moderator

Re: flicker [message #12814 is a reply to message #12710] Sun, 18 November 2007 22:27 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
nixnixnix wrote on Tue, 13 November 2007 11:52

Hi there,

I get a lot of flicker and I find that BackPaint() doesnt appear to make any difference.

I have BackPaint() in my TopWindow constructor.

EDIT: I have also tried adding BackPaint from my InsetFrame and from my SplitterFrame although that is not allowed. Nothing works.

Any ideas please?

Nick


Hard to say. Basically, if you have BackPaint there, BackPaint is what you get...

Testcase needed to provide more info.

Mirek
Re: flicker [message #12927 is a reply to message #12814] Wed, 28 November 2007 23:57 Go to previous messageGo to next message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
Hi Mirek,

Sorry it took so long to take you up on your kind offer. My app is kind of big and cconvoluted but here is my attempt to cut it down to size. You will see I am just drawing an uninitialised image to the screen but its the same behaviour that I see with my app and a subset of the code I use.

To explain: its a GIS style app which normally draws all sorts of interesting info to the Image m_view. If you put the mouse on the main window and drag, the map moves - and flickers Sad

I realise I have not put BackPaint() in there but thats because it doesnt appear to make a difference.

Cheers,

Nick
  • Attachment: TreeTest.7z
    (Size: 2.70KB, Downloaded 393 times)

[Updated on: Wed, 28 November 2007 23:59]

Report message to a moderator

Re: flicker [message #12995 is a reply to message #12927] Tue, 04 December 2007 11:24 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
I made two fixes:


TreeTest::TreeTest()
{
......	
	BackPaint();
}

void TreeTest::DrawView(Draw& w)
{
.....	
	ImageBuffer ibBk(m_rcClient.Size()); // background drawing buffer
	
	memset(~ibBk, 255, 4 * ibBk.GetLength());
	


...and everything seems quite OK here...

Mirek
Re: flicker [message #13035 is a reply to message #12995] Thu, 06 December 2007 17:25 Go to previous message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
Thanks Mirek,

I feel a little stupid - the problem was that I was painting the screen white in MouseMove(). Now its fine with or without BackPaint() - doh!



Previous Topic: Why BMPEncoder::NewBmp() doesn´t exists anymoe?
Next Topic: Antialiasing for lines
Goto Forum:
  


Current Time: Thu Mar 28 13:09:23 CET 2024

Total time taken to generate the page: 0.03087 seconds