本节详细剖析了一个基本的OpenGL程序框架,要点如下:
1.注册窗口类,创建窗口
RegisterClass
ChangeDisplaySettings
AdjustWindowRectEx
ShowWindow
SetForegroundWindow
SetFocus
1.注册窗口类,创建窗口
RegisterClass
ChangeDisplaySettings
AdjustWindowRectEx
ShowWindow
SetForegroundWindow
SetFocus
2.创建渲染环境
GetDC
ChoosePixelFormat
SetPixelFormat
wglCreateContext
wglMakeCurrent
3.设置三维系统
glViewport
glMatrixMode
glLoadIdentity
gluPerspective
glShadeMode
glClearColor
glClearDepth
glEnable
glDepthFunc
4.三维绘图基础
glClear
SwapBuffers
5.消息循环与渲染循环
PeekMessage
TranslateMessage
DispatchMessage
WndProc
6.释放窗口及渲染环境
wglMakeCurrent
wglDeleteContext
ReleaseDC
DestroyWindow
UnregisterClass