[edit] This has been fixed now, no more tsting reqired. Thanks.
This test is for PCs.
When I run the code below, I see the scan line move down the rectangle resulting in a moving tear, and making the rectangle movement look jerky.
If I uncomment the EndGraphics() line and second Graphics() line, the rectangle with have a single stationary tear on it (at a random height).
Using OpenGL or not makes no difference.
Why is the first one unsynced and the second one synced? What possible difference is there in calling the same graphics command twice? This does my head in! Either some variables inside BlitzMax change or my video card has to be bullied into properly syncing by calling graphics twice, which is crazy.
It does *not* do this in BlitzMax 1.18, I have and old .exe I ran that's fine. Has someone altered the graphics modules recently? I noticed this because my Game Framework UFO demo, which used to work fine, has now started jerking when starting in windowed mode. But if I make it go full-screen, then back to windowed mode, it's fine!
Please report your findings. Thanks in advance.
Btw, I'm not expecting everyone to get the same findings due to the different ways video cards/drivers work.
P.S. just found out the EndGraphics line is superflous because Graphics() calls it anyway for safety.
This test is for PCs.
When I run the code below, I see the scan line move down the rectangle resulting in a moving tear, and making the rectangle movement look jerky.
If I uncomment the EndGraphics() line and second Graphics() line, the rectangle with have a single stationary tear on it (at a random height).
Using OpenGL or not makes no difference.
Why is the first one unsynced and the second one synced? What possible difference is there in calling the same graphics command twice? This does my head in! Either some variables inside BlitzMax change or my video card has to be bullied into properly syncing by calling graphics twice, which is crazy.
It does *not* do this in BlitzMax 1.18, I have and old .exe I ran that's fine. Has someone altered the graphics modules recently? I noticed this because my Game Framework UFO demo, which used to work fine, has now started jerking when starting in windowed mode. But if I make it go full-screen, then back to windowed mode, it's fine!
Please report your findings. Thanks in advance.
Btw, I'm not expecting everyone to get the same findings due to the different ways video cards/drivers work.
Strict 'SetGraphicsDriver GLMax2DDriver() Local DesktopRefreshRate = GetDeviceCaps(GetDC(0),VREFRESH) Local w = 1024, h = 768 Graphics (w,h,0,DesktopRefreshRate) 'Uncomment these two lines in to see the difference 'EndGraphics() 'Graphics (w,h,0,DesktopRefreshRate) Local x = 0, y=0 While Not KeyDown(KEY_ESCAPE) Cls DrawRect (x,y,200,h) Flip x = x + 10 If x > w Then x = 0 Wend
P.S. just found out the EndGraphics line is superflous because Graphics() calls it anyway for safety.