View Full Version : How initialize an open gl window in visual c++6
I 'd like to know how can I initialize my open gl windows in a visual c++ program ?
01-24-2001, 06:15 AM
Win 32 API or MFC?
i wanna know it too.
how can i do it in win32
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.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.