Graphics 版 (精华区)
发信人: killest (victor), 信区: Graphics
标 题: [转载] VC 4.0中使用OpenGL(17)
发信站: 紫 丁 香 (Wed Apr 22 10:30:15 1998), 站内信件
【 以下文字转载自 Programming 讨论区 】
【 原文由 xiaojun 所发表 】
while (GetMessage(&msg, NULL, 0, 0))
DispatchMessage(&msg);
wglMakeCurrent(NULL, NULL);
wglDeleteContext(hglrc);
return msg.wParam;
}
The following sections explain this application's method of operation.
Note that for the sake of simplicity, I did not include any palette
initialization in this application. For this reason, the application may
not behave properly on systems configured for 16 or 256 colors.
OpenGL Initialization
The first series of OpenGL calls in this application begins in WinMain,
immediately after the application's window has been created. After
obtaining a device-context handle for the client area of this window, the
device context's pixel format is set to a pixel format obtained through
ChoosePixelFormat. The ChoosePixelFormat function can be used to identify
pixel formats for a specific device that best match a set of required
characteristics.
--
※ 来源:.紫 丁 香 bbs.hit.edu.cn.[FROM: hs6.hit.edu.cn]
--
※ 转载:.紫 丁 香 bbs.hit.edu.cn.[FROM: victor.hit.edu.c]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:2.833毫秒