Using the ScanLine() command

Blitz3D Forums/Blitz3D Programming/Using the ScanLine() command

QuickSilva(Posted 2007) [#1]
How does the Scanline() command actually work? If I am running a 640 by 480 window does the scan line go from line 0 to 480 (-1?) or does it still go the full height of my monitor for example my monitor is set to 1440x900 so line 0 to 900 (-1)

If I wanted to use the flip command only when my scan line was at the lowest point of my screen would a simple,

If Scanline()=480 then Flip actually work properly?

Jason.


_33(Posted 2007) [#2]
It works only if it has time to catch the scanline. If you have many things going on in your program, you might catch one scanline = 480 every few frames. It's not really something you can deal with easily if you're using heavy logic. The only reason I once used scanline() was to calculate what is the refresh rate of the screen. But finally it wasn't the best solution anyhow. Usually, it's preferable to test for a region of scanlines, say scanline() < 32, and stuff like that. But it's relatively unpractical.

Cheers.


GfK(Posted 2007) [#3]
If Scanline()=480 then Flip
This is no different to 'Flip True'.

Relying on Scanline() to do the same job is silly. You could end up with skipped frames, tearing, and timing problems.

Why are you considering using this?


Trixx(Posted 2007) [#4]
If I am running a 640 by 480 window does the scan line go from line 0 to 480 (-1?)

It'll go to little more than 480, probably around 510, to cover the space of the monitor that's not actually visible.
On 800x600, it'll go to 620-630, I don't remember exactly...
Also, don't use =480, but use >= 480 , because you can easily miss the exact number.


Matty(Posted 2007) [#5]
For what you want it to do you are better off simply using:

vwait
flip false


(as the documentation/manual says)


QuickSilva(Posted 2007) [#6]
VWait
Flip False

Results in a very jerky update on my DVI connected flatscreen in windowed mode. I`m just trying to find an alternative that does the same thing really.

Any other ideas?

Jason.