Click to See Complete Forum and Search --> : Please help : trouble with device contexts for openGL in win 2000


qavorqa
July 7th, 2002, 09:32 PM
I am working in open gl, in windows, using XVT for GUIs. I am, and can not, due to constraints, use MFC. I am using the command GetWindowsDC () to get the HDC in order to render openGL onto that window. It works fine in Windows ME, 98 and its brethren, but in case of Win 2000 and XP what happens is the entire rendered image is shifted onto the window title bar. I have tried using GetDC () to get the device context, which supposedly should get me the device context for the client area of the window, but then the function wglCreateContext () does not work for some reason. Please advise.

Akash

Bob Davis
July 8th, 2002, 08:22 AM
Check out NeHe Productions' base code. It is good to start with on OpenGL development. It shows the initialization clearly, and I've used it on Win2000 with no problems.

http://nehe.gamedev.net

qavorqa
July 13th, 2002, 10:01 AM
Nice site .. I found some code there that might help me .. Will notify if it works for me .. Thanks again