SelectBrush turns doublebuffering off?

Discuss any general programming issues here
Post Reply
Bugala
Posts: 1178
Joined: Sun Feb 14, 2010 7:11 pm

SelectBrush turns doublebuffering off?

Post by Bugala »

I might be encontering a bug here actually, but I cant isolate it to show it as example.

But thing is, at beginning of program, I use Begindoublebuffer(true). Soon after this comes first SelectBrush(1), and after SelectDisplay(1).

All this works fine.


But now at later point when certain thing happens and I try to do selectbrush(1) and then later SelectDisplay(1), it fails when next Flip() command comes saying doublebuffering is off.

I have hunted it down to selectbrush(1) being the problem. If I just use SelectDisplay(1), it continues working, but if I use that SelectBrush(1), then next flip fails.

I also tried using BeginDoubleBuffering(true) again, but then it complains "This command cannot be used when SelectBrush() is active!" which would indicate that maybe selectdisplay-command is not working, as code is this:

Code: Select all

SelectBrush(1)
SelectDisplay(1)
BeginDoubleBuffer(True)
Is this expected behavior or a bug?
Bugala
Posts: 1178
Joined: Sun Feb 14, 2010 7:11 pm

Re: SelectBrush turns doublebuffering off?

Post by Bugala »

Ah, found the answer right after having posted. It seems the unexpected behavior was actually that the first time worked, but this is probably because display gets selected for the first time in that program after having dealt with that brush.

Seems I should have used EndSelect() instead of just SelectDisplay
Post Reply