OpenGL WinNT problem

My app runs on Win95, NT, 2000. I support different Win desktops here in our office for engineering simulations. The app opens multiple windows, each with its own OpenGL context. I know this is not the ‘normal’ OpenGL application.

On WinNT only, there is a problem when I close the first window (GDI context and OpenGL context) and then open another window. As long as the first window stays open, I can open and close as many windows as I want with no errors. But once I close the first window, the next window to open will fail when I try to set the pixel format.

I’ve discovered that I can avoid the failure by not asking for double buffering. But that’s not very useful.

Question: does this sound familiar to anyone? I don’t expect a solution from my description, I just want to know if anyone has seen anything like this before? Dont’ beat me up about WinNT… it’s not my first choice for a system either.

Thanks

I just feel some pity that noone has yet replied to your post.

Unfortunately I can’t help you. I have used NT but never actually tried using opengl on it. I currently run 2000.

If I had to make a suggestion try upgrading your drivers. As corny as that sounds i believe there are separate drivers for NT (as opposed to 2k) on nVidia’s website. Worth a try I guess.

I assume you have this exact problem on all computers running NT. Which may mean it is actually an NT problem.

I am not surprised that selecting Single Buffer instead of Double seems to fix the problem. Single vs. Double always seems to be a bit weird sometimes. Especially with multiple contexts.

Although this doesn’t help maybe somebody will come along and post something now that I have gotten this post going.

Hi,

I experienced something like that in my medical application I’m working on. It occured under Win98 and WinNT. I was wondering what this is too, but I couldn’t figure it out. Under Win2k it works. We even tried different 3D-Accelerators, but it was all the same. I believe this is some kind of context stuff, this is failing on.
The other suspicion I have is it is about some DLL. I couldn’t find a machine with IE < 5.0 to test on. Maybe it has something to do with IE, I’m not sure though. But the app was running before IE was installed, after that it caused trouble.
If you get to know something about this, please let me know.

Cheers,

Martin

Originally posted by gstrickler:
[b]On WinNT only, there is a problem when I close the first window (GDI context and OpenGL context) and then open another window. As long as the first window stays open, I can open and close as many windows as I want with no errors. But once I close the first window, the next window to open will fail when I try to set the pixel format.

I’ve discovered that I can avoid the failure by not asking for double buffering. But that’s not very useful.
[/b]

Something similar happens to me on Win98SE with a TNT2 card and some nvidia drivers: I can only run one OpenGL app per reboot, the second an successive OpenGL apps will fail to create the OpenGL context, normally with a GPF in DDHELP.DLL.

I think this problem comes from incorrect deinitialisation of directdraw when directdraw is started by an OpenGL app (by the ICD on behalf of the ogl app). In 2K and XP directdraw is started at boot time, but under Win9x it’s started when the first DX/OGL app starts (I think this is the case on NT as well), so looks like the ogl app has to deinitialise ddraw when it’s closed, it doesn’t do it properly and the next time an ogl app tries to initialise ddraw again, it fails.

My workaround was to start any DirectDraw app before running any ogl app (MediaPlayer will do). That allows me to run several ogl apps per boot, as the ogl app already finds ddraw initialised and it doesn’t deinitialised it when closed.

Hope that helps.

EDIT: Password verification failed the first time and I had to rewrite the message

EDIT2: Nvidia driver 23.11 doesn’t seem to have this problem.

[This message has been edited by evanGLizr (edited 04-09-2002).]

I may be way off, but in your cleanup() call, I wonder if everything is being freed OK or not or maybe you tried to do something strange (heh)?

Like I said, this is a long shot…

Oh, and no, I never seen that when I was working on NT4 +SP6 with a GF2.

Thanks for the replies. Here is some more info.

I started movie player before running the app, and that made no difference.

The target machines, WinNT 4.0 - sp6, only use DirectX v3. That is for WinNT. Graphics acceleration is from the Intel 815 chipset, not from a graphics card. We have tried different drivers (from Intel’s site) with no effect.

The failure comes from wglCreateContext. It returns a NULL handle. The call to GetLastError() returns 0xE03D3D00. The third bit in ‘E’ means an application error (not Windows) and ‘3D3D’ is self evident, but not very helpful.

In my multi-window app, I can open and close windows, making new contexts, as often as I like. The failure occurs only when I try to make a new context after closing the very first one. I can restart the app and repeat the process, without rebooting. And this is only on WinNT.

Any other ideas?

Do the other windows function properly after closing the first one?

Does the problem still occur if you only create the first context, delete it, and recreate?

Did you specify CS_OWNDC in your window class?

When you ask for a single-buffered application, does OpenGL report a different vendor string than when you ask for a double-buffered context?

Good luck,
– Jeff

Thaellin (Jeff), to answer your questions:

Yes, CS_OWNDC is included.
Vendor is always ‘Intel’, renderer is ‘Intel Solano’.
All windows work once opened.
If I open the first window, then close it, I can’t open another window.

Weird experiment: I start the app, open a window and close it. start a second instance of the app, open a window ok, close it.
start a third instance of the app, open a window ok… I just can’t open a new window in any instance of the app once the first window is closed

It may just be a bug in the intel drivers. Do you have any other card you can slap into the NT4 machine and try?

You may also wish to “disable” hardware acceleration in NT4, and see if the app runs OK with software emulation. (thereby bypassing the intel drivers).
You may also want to try copying over the clent driver .dll that controls opengl from win2k to NT4, it may work, depends how they did it. (for example, I had to do this on a ATI rage 128 system, and it did work when I copied the drivers.) But again, this assume you are running the same chipset on both platforms…

No I havent had this problem on my system. WinNT 4 with SP6 (and perhaps SP5 at the time)

I have made a couple of apps that are MDI and each window makes its own context. No failures have occured even if I open over 50 windows.

Try GetLastError()

V-man

This is a question about your code or the video card. I do multi-doc in NT, it can work well. But in a special NT, ATI 8M video card, only the last doc can work in my app, the pre-opened doc’s windows are blank.