Graphics 版 (精华区)
发信人: killest (victor), 信区: Graphics
标 题: [转载] VC 4.0中使用OpenGL(8)
发信站: 紫 丁 香 (Wed Apr 22 10:29:09 1998), 站内信件
【 以下文字转载自 Programming 讨论区 】
【 原文由 xiaojun 所发表 】
once when the rendering context is initialized, and subsequently every time
your application receives a WM_SIZE message indicating that its window size
has changed.
Drawing with OpenGL
Most OpenGL drawing consists of a series of vertex operations enclosed
between a pair of glBegin and glEnd calls. The glBegin call identifies the
type of primitive that subsequent vertex operations define; glEnd marks the
end of constructing the primitive. For example, the following series of
calls constructs a pentagon:
glBegin(GL_POLYGON);
glVertex2d(0.0, 1.0);
glVertex2d(-0.951057, 0.309017);
glVertex2d(-0.587785, -0.809017);
glVertex2d(0.587785, -0.809017);
glVertex2d(0.951057, 0.309017);
glEnd();
The glBegin function can be used to define a variety of primitives. Table
41.1 lists the allowable parameters for this function.
--
※ 来源:.紫 丁 香 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)
页面执行时间:3.308毫秒