fullscreen display surrounding flickering

Discuss OpenGL® programming with the GL Galore plugin here
Post Reply
User avatar
lazi
Posts: 625
Joined: Thu Feb 24, 2011 11:08 pm

fullscreen display surrounding flickering

Post by lazi »

OS4.1
Radeon (not hd) driver.
Hollywood 7.0
GL Galore 1.1

Trying it tells more then thousand words, so change SmoothScroll.hws GL Galore example scripts line 45 to this:

@DISPLAY {width=600,mode="fullscreen",Color = #WHITE, Title = "Smooth scroll"}

I have changed it to fullscreen, and made the display smaller than the screen width. Here the displays right side (a 40x480 block) flickering black and white on every display refresh/flip.

Is there a solution for this?
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: fullscreen display surrounding flickering

Post by airsoftsoftwair »

Yes, this should be fixable. Thanks for reporting!
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: fullscreen display surrounding flickering

Post by airsoftsoftwair »

Ok, so this turned out to be a bug in the script. The problem is this line:

Code: Select all

Cls(#WHITE)
This will just draw a filled white rectangle but this is not a proper GL buffer clearing which should be done whenever flipping buffers. Thus, the following code should be used instead:

Code: Select all

Cls                 ; first clear buffers
Cls(#WHITE)   ; now draw
When Cls() is used with #BLACK (or no argument) it will properly clear the GL buffers which is needed when flipping buffers.
User avatar
lazi
Posts: 625
Joined: Thu Feb 24, 2011 11:08 pm

Re: fullscreen display surrounding flickering

Post by lazi »

Yeah, that fixes the SmoothScroll example, but I just realized that GL Galore works on the full screen even if @DISPLAY width and height parameters define smaller area.

It can affect speed too. Working on a small display can be much slower on fullscreen than in window if the corresponding fullscreen screen is much larger than @DISPLAY defines.

Is it some miniGL or GPU limitation that only standard resolutions can be used effectively?
User avatar
lazi
Posts: 625
Joined: Thu Feb 24, 2011 11:08 pm

Re: fullscreen display surrounding flickering

Post by lazi »

Here is a better fix.
Instead of the two cls inside the loop:

Code: Select all

BeginDoubleBuffer(True)
Cls
Flip
Cls       
Clear both buffers after BeginDoubleBuffer.
This will not affect speed.
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: fullscreen display surrounding flickering

Post by airsoftsoftwair »

lazi wrote:Is it some miniGL or GPU limitation that only standard resolutions can be used effectively?
I honestly don't know. Ask Hans de Ruiter... he should be able to tell :)
Post Reply