wglMakeCurrent + PIXELFORMAT

Hello…ive made about 2 opengl engines in the past few months…and now started a new one from scratch. This time I have a TNT2 to work with, (i used a voodoo2 for the previous engines)…

The problem i have is that i cannot get ChoosePixelFormat() to work…
the HDC is correct and everything…i’ve basically copied the code from my old programs and it still didnt work…

I tried something new and threw in wglMakeCurrent(NULL,NULL); before choosing the pixel format and now it works!!!

But why is that? I want to be able to choose my pixelformat without having anything to do with opengl at the start…

I mean I want to be able to set the pixel format, then decide whether i want to use OpenGL or D3D (for example)…

Any ideas? I need to get this resolved URGENTLY!!
Thanks

Strange, I have a TNT2 and I’ve not needed to issue a call to wglMakeCurrent before choosing the pixel format. Maybe its driver related. I know it works fine with reference drivers 3.68 and 5.22 at least. Or perhaps, some OpenGL app you’ve been running isn’t shutting down OpenGL nicely and is causing the problems (just a guess).

[This message has been edited by DFrey (edited 06-22-2000).]

For some strange reason it is working now…it’s behaviour yesterday was random, one minute it would work, the next it wouldn’t…i think i better up to 5.30 now

Thanks anyway