GL commands with no RC

I thought that GL commands were suppose to not function as expected (read, do nothing) when no RC was created or made current.

Im using glGetString and I think the other is gluGetString and both are for getting version numbers and they work.

glu I can understand, but why is the case for gl working?

PS: from time to time things screwed up (by itself, not my app!) and SetPixelFormat was causing my app to abort and return -1 to the OS. I think this was the problem but I cant be sure.

V-man

Well those functions dont draw anything so they can work just fine without a valid Rendering Context. Now glVertex and stuff would not work of course with out a RC.

-SirKnight

I don’t think you should be able to call even glGetString() without a valid RC, at least there’s no garantuee it will work afaik.

It can get confusing at times. I’ve recently discovered a minor issue with RC’s and WGL_ARB_pixel_format :

With NVIDIA’s drivers using WGL_ARB_pixel_format without a valid RC does not produce an error ( as I think it should ). On ATI drivers, a valid RC is required. NVIDIA’s multisample application does not seem to have a valid RC when the pixelformat is selected ( it creates a context only to bind the functions ).

Originally posted by V-man:
PS: from time to time things screwed up (by itself, not my app!) and SetPixelFormat was causing my app to abort and return -1 to the OS. I think this was the problem but I cant be sure.

I have had the same problem with my app. It may only happen when I use the multisample extension to enable FSAA. The call to SetPixelFormat just exits the app with an exit code of -1; no errors listed; no crash; no nothing. I have to reboot in order to run any OpenGL apps after that.

So you are saying that this is caused by calls to functions with no RC active? I’ll have to look into that; when I use the pixel format extension to get a multisample pixel format, there is presumably no current RC.

Has anyone else run into this problem?

[This message has been edited by tcobbs (edited 05-10-2002).]

>>>It can get confusing at times. I’ve recently discovered a minor issue with RC’s and WGL_ARB_pixel_format :<<<

It can definitly get confusing at times.

It would seem as if the reason why SetPixelFormat failed is not related. It happened today, and again quake 3 locks up.

Sometimes, it says there is an invalid op in kernel.dll Sometimes, I get GDI generic.

I really cant say what the cause is, but I am on win98, and that OS is crap. I will update the drivers to the latest and see (im on 23.11 now). Not using FSAA in any way

V-man