View Full Version : How initialize an open gl window in visual c++6

01-24-2001, 06:13 AM

I 'd like to know how can I initialize my open gl windows in a visual c++ program ?


Michael Steinberg
01-24-2001, 06:15 AM
Win 32 API or MFC?

01-24-2001, 10:02 AM
i wanna know it too.
how can i do it in win32

Michael Steinberg
01-24-2001, 10:08 AM
0. register a window class ( RegisterClass )
1. Create a window with CreateWindow
2. Get its device context( GetDC )
3. Set up a proper pixelformat that supports OpenGL (Look into SetPixelFormat, ChoosePixelFormat ).
4. create an opengl context ( wglCreateContext I think that is )
5. make opengl context current for rendering ( wglMakeCurrent ).

The online help is quite good in vc6, so look into it to get further information on the mentioned api calls. There are quite good tutorials on the web to.
For example: