pouët.net

Strange opengl problems : Any help ?

category: general [glöplog]
Lately, I am having the following very weird problem :

In the initialization step, SOME times (it is completely random), I get a 15-20 seconds of IDLING (- there is nothing happening, no window, nothing; just waiting), as it goes through the lines :


hDC=GetDC(hWnd)
PixelFormat=ChoosePixelFormat(hDC,&pfd)
SetPixelFormat(hDC,PixelFormat,&pfd)


I have a 5600 geforce. It used to be fine, but after I installed briefly a 6600 (hence new drivers) it is doing this. I have changed back to old drivers, still nothing.


Using a 9600XT on the same machine, gives me no problem. So it is down to the card I guess.

Any ideas ? It is very frustrating.





added on the 2005-10-31 15:49:22 by Navis Navis
I would email nvidia about this..

also sometimes windows has problems with refresh rate, in some cases i get strange errors, then I change the refresh rate from my default to 85, then back to 75Hz (the one of my TFT monitor)..

also verifying the AGP speed is a good thing i guess..
added on the 2005-10-31 16:09:00 by jaw jaw
Myself, it is when closing my demo, when it is fullscreen only that it stays up for 20sec without doing anything. I wonder why!
added on the 2005-10-31 18:40:33 by _-_-__ _-_-__
10 print "Amiga Rulez"
20 goto 10

run


:-)
added on the 2005-10-31 18:57:53 by magic magic
navis, does you windowproc handle the WM_PAINT message correctly (i.e. either does a BeginPaint or ValidateRect)?

if the update region doesn't get cleared in WM_PAINT, windows usually tries to send another WM_PAINT immediately again, for quite some time. this does not necessarily prevent other kind of paint operations, but depending on the driver, it might.
added on the 2005-10-31 20:37:36 by ryg ryg
@Magic:

fix the code of ya Speed Pack, please.
There are strange bugs occuring while running it on a _real_ 68060 and Mediator/Voodoo3000 ! (switch to PAL fucks up :P, mouse sprite freezes a.s.o.)

-> amiga coding has difficulties,too fellow!
added on the 2005-10-31 22:37:03 by d0DgE d0DgE
true!! o_o
added on the 2005-11-01 03:36:52 by bdk bdk
Navis: copy and paste your pixel format description I'll see then what might be wrong. I asume that this code is for dummy window initialization? I think I know what's the problem (I had sth like this some time ago). But I also need to see the code where You use CreateWindow.
added on the 2005-11-01 09:57:17 by bonzaj bonzaj
the code is token nehe tutorial part 02 (yes yes I admit it). So :

static PIXELFORMATDESCRIPTOR pfd=
{
sizeof(PIXELFORMATDESCRIPTOR),
1,
PFD_DRAW_TO_WINDOW |
PFD_SUPPORT_OPENGL |
PFD_DOUBLEBUFFER,
PFD_TYPE_RGBA,
bits,
0, 0, 0, 0, 0, 0,
0,
0,
0,
0, 0, 0, 0,
24,
8,
0,
PFD_MAIN_PLANE,
0,
0, 0, 0
};

if (!(hDC=GetDC(hWnd)))
{
KillGLWindow();
MessageBox(NULL,"Can't Create A GL Device Context.","ERROR",MB_OK|MB_ICONEXCLAMATION);
return FALSE;
}

if (!(PixelFormat=ChoosePixelFormat(hDC,&pfd)))
{
KillGLWindow();
MessageBox(NULL,"Can't Find A Suitable PixelFormat.","ERROR",MB_OK|MB_ICONEXCLAMATION);
return FALSE;
}

if(!SetPixelFormat(hDC,PixelFormat,&pfd))
{
KillGLWindow();
MessageBox(NULL,"Can't Set The PixelFormat.","ERROR",MB_OK|MB_ICONEXCLAMATION);
return FALSE;
}

if (!(hRC=wglCreateContext(hDC)))
{
KillGLWindow();
MessageBox(NULL,"Can't Create A GL Rendering Context.","ERROR",MB_OK|MB_ICONEXCLAMATION);
return FALSE;
}

if(!wglMakeCurrent(hDC,hRC))
{
KillGLWindow();
MessageBox(NULL,"Can't Activate The GL Rendering Context.","ERROR",MB_OK|MB_ICONEXCLAMATION);
return FALSE;
}

sorry for the spam.

added on the 2005-11-01 10:08:58 by Navis Navis
ok I'll mail You to prevent other big code parts insertion - the pfd seems to be ok - but I wanted another part of the code.
added on the 2005-11-01 10:20:29 by bonzaj bonzaj
ok I'll mail You to prevent other big code parts insertion - the pfd seems to be ok - but I wanted another part of the code.
added on the 2005-11-01 10:20:47 by bonzaj bonzaj
I've mailed using your yahoo mail. If it is too old mail me:

[my nick] {you know what} kolos.math.uni.lodz.pl
added on the 2005-11-01 10:29:19 by bonzaj bonzaj
what's the problem with posting some blocks of code ? others might appreciate to see how you tackle that weird bug.

And btw the [ code ] UBB tag is here for a reason ;)
added on the 2005-11-01 10:30:42 by p01 p01
and now pasting code into a thread called 'Strange opengl problems : Any help ?' is considered spam??? oh i guess the bbs is reserved for BASS and KOOLDEMOSCHOCK purposes :P
added on the 2005-11-01 16:07:09 by winden winden
Code: I agree with winden.
added on the 2005-11-02 01:54:44 by bdk bdk
Navis : have same problems here, had them with my ti4200, now having with 6600gt. the funny thing is that it was ok with drivers <= 45.xx or something. with newer ones i have this ~20-40 seconds delay every time, but when the application is started each second time after it had been just closed.
Obviously i couldnt try older drivers with 6600gt, so every new ones i tried here, bug all the same.

If you trace your code with the debugger ( what i did ), you'll most likely see that it's SetPixelFormat(hDC,PixelFormat,&pfd) what executes for many seconds, and if you trace it inside of it, the delay happens when it calls some external func ( dont remember which one ).

i was almost about to write to nvidia guys cause it came FUCKING DISTURBING to wait every time, but i never did. if someone could share the right email ( they have plenty of on nvidia website, with very indistinct descriptions of purpose ), i'll most likely write sooner or later :D
also, it's more likely to be fixed if you mention your nick and group, as they probably heard of asd.
added on the 2005-11-02 10:29:26 by apricot apricot
Drop cass .at. nvidia.com an email. He's a fairly knowledgable chap and handles most of the OpenGL-related problems in their drivers.
added on the 2005-11-02 10:59:52 by inSpirAcy inSpirAcy
Thanks guys ! Fadeout : Yes, we have the same problem.

I used to exchange emails with a very nice chap at nvidia about radeon problems (can you believe it) and Cg.

I will send this email, or get back to <45.xx as it is REALLY pissing me off. You are right in saying that it is after the second or third time you run the program. Weird. ! Thanks again.
added on the 2005-11-02 12:57:18 by Navis Navis
Quote:
You are right in saying that it is after the second or third time you run the program.

not really, it's vice versa. maybe i shouldn't have put a comma there. i mean it runs much faster ( either without a delay or with up to 5-10 seconds delay ) if you run it again right after closing the first instance. first start is the slowest one. also, launching d3d app inbetween two successive runs of GL app, makes the second try as slow as the first one.
anyway it's very weird, i couldn't figure out any regularity in gl behaviour.
the latest drivers which worked fine for me were 43.45, the non-working are 61.77+, tho i think remember trying 55.xx or 57.xx, but it seems i have deleted them, probably because of being faulty too.
added on the 2005-11-02 13:15:36 by apricot apricot
well, I'll try to go back to 43.45.. after all, I was happy with that for about 2 years..

Now, nvidia should solve this. I really don't want to go to Radeon terratory in the future.. :-(
added on the 2005-11-02 13:31:59 by Navis Navis
Weird, I experience fancy stuff with my 6600 GT and OpenGL as well (and I'm pretty sure I did not change much things in my inits those last months).

After launching my app a few times, the screen eventually goes black when launching it for the Nth time.
If i quit and relaunch it again, it's not black anymore but then it runs much slower (90 fps whereas it ran at 200 the previous times), as if it were in some high FSAA mode or something.

Only a reboot seems to fix the problem.
added on the 2005-11-02 14:19:58 by keops keops
You guys must be really new to all this nVidia stuff.
added on the 2005-11-03 02:06:35 by Hatikvah Hatikvah
It's really interesting - I've no problems with my NV6200. But I must say that I was not switching from NV5 to NV6, and I have PCIe (but I don't think that it causes this bug).

!fadeout: Have You tried going through all pdf's? Maybe this bug happens on a subset of all pdf's (ie only in 32 bits or with 24 bit zbuffer). Maybe this will help to trace up the bug.
added on the 2005-11-03 16:12:42 by bonzaj bonzaj
Quote:
I have a 5600 geforce. It used to be fine, but after I installed briefly a 6600 (hence new drivers) it is doing this. I have changed back to old drivers, still nothing.


Did you unistall the old drivers first? When I upgraded to a Gforce 4 from a Gforce 2 it locked up on me all the time.

added on the 2005-11-04 06:09:44 by Mike 3D Mike 3D
Don't be gay and use D3D.
added on the 2005-11-04 17:13:47 by EvilOne EvilOne

login