Delay setting up GL screen

BlitzMax Forums/BlitzMax Beginners Area/Delay setting up GL screen

Tom(Posted 2005) [#1]
***EDIT***: Source of problem found!

I have refresh rate overides set (NOT VSync!) in my NVidia control panel, I've always had this option set because some games boot and use 60hz and there's no way to change.

Turning that off, max seems to boot instantly every time now (well, 20 successive compiles I just done worked instantly)

Tom


---old post----
Hi,

When I compile, debug or release, there's about an 80% chance that I get a random delay just after the gl window is created, it goes all white and pauses for about 3-4 seconds.

It's starting to get annoying, anyone else have this problem?

Tom


ImaginaryHuman(Posted 2005) [#2]
Not here, maybe it's the driver?


dmoc(Posted 2005) [#3]
Moving an app from w98 to w2k I noticed delays, a significant drop in performance and glitches. Updated driver and removal of some bg tasks improved things a bit but still not as good as on w98.


xlsior(Posted 2005) [#4]
Moving an app from w98 to w2k I noticed delays, a significant drop in performance and glitches


Are you talking otherwise identical hardware (especially video adapter make/model) as well?

If not it's really comparing apples and oranges.
OpenGL appears to be more hardware dependend than DirectX was, unfortunately... Since the majority of games uses DirectX, OpenGL hardware support seems to be more of an afterthought to some manufacturers. :-/


xlsior(Posted 2005) [#5]
also, as far as a delay setting up the screen is concerned: what kind of refresh rates are you specifying?

In general, things are very fast on my 2800+ / Radeon 9600Pro. If I specify a unreasonably high refreshrate in the Graphics command though, I do see an extensive delay before anything start appearing on the screen.

e.g. Hertz=500 gives me a 20 second delay before anything appears. when things finally appear the stepsizes of sprites it does appear that the internal logics of a game operate at that speed. (Sprites can move 5 times as far in the same interval as when specifying 100Hz)


dmoc(Posted 2005) [#6]
exact same hw, upgraded os


xlsior(Posted 2005) [#7]
exact same hw, upgraded os


Well... Win2000 does have higher system requirements than Win98. It needs more resources for itself, leaving less for your applications.

You didn't specify your system specs, Unless you have a relatively new system (likely not since you were running Win98) you very well could see a slowdown simply because of that.


skidracer(Posted 2005) [#8]
It's more likely there is a problem with the refresh rate analysis BlitzMax does.

Tom, check your bios to make sure your video card IRQ is enabled and check your OpenGL driver config to make sure there is no override on the vertical blank. I'll do some testing this week to see if I can emulate the problem here.


fredborg(Posted 2005) [#9]
I have the same thing, almost every time I compile something that uses the Graphics command. The window opens immediately (no content just the titlebar and borders with the underlying windows stuff still visible inside), but then it hangs for 1-2 seconds before the window is filled.

Windows 2000, with a GeForce4-Ti4200


Tom(Posted 2005) [#10]
IRQ is enabled in Bios
VSync is set to 'Application Controlled'

A friend's using the same NVidia drivers, but a different card, he hasn't noticed max displaying this anomaly.


Tom(Posted 2005) [#11]
John Devoys just run my code over & over, he gets no delays like I do.

His card is an FX5900, running 66.93 on XP
Mine's an FX5600, running 66.93 on Win2k SP4


teamonkey(Posted 2005) [#12]
Tom, what's the exact code that you're running?

xlsior wrote:
e.g. Hertz=500 gives me a 20 second delay before anything appears.

That sounds a bit like the test that Graphics does to make sure the screen actually is running at the correct refresh rate.

From mod/brl.mod/glmax2d.mod/glmax2d.bmx in function DetectSync() (a function called by Graphics)
For k=1 To graphics_hertz	'whatever!
		Local t=MilliSecs()
		bglSwapBuffers


Basically, if you set hertz to 500, then this function is going to try and swap the buffers 500 times. If the monitor can handle 500Hz (few, if any, can) then this routine will take 1 second. If the monitor refuses to leave 60Hz mode, the routine will take about 8.3 seconds. Not 20 seconds though.


Tom(Posted 2005) [#13]
The delays were'nt that bad, more like 4-5 seconds, but the delay was definately at the gl window creation. The window would pop up then go white and everything stalled.


teamonkey(Posted 2005) [#14]
Does the same thing happen if you call bglCreateContext instead of Graphics?