2010/08/28 C-01.Hello, world!!
2010/12/16 C-02.二進位
2011/08/01 其他-OpenGL在visual studio 2010底下的配置
更新紀錄2011/08/01|
肯德基今年限量推出聖誕節限定餐點,現食專送直達派對現場! |
glClear: clear buffers to preset values.
C Specification | Parameters | Description | Notes | Errors | Associated Gets | See Also
C Specification
void glClear(
GLbitfield mask)
Parameters
DescriptionglClear sets the bitplane area of the window to values previously selected by glClearColor, glClearIndex, glClearDepth, glClearStencil, and glClearAccum. Multiple color buffers can be cleared simultaneously by selecting more than one buffer at a time using glDrawBuffer.
The pixel ownership test, the scissor test, dithering, and the buffer writemasks affect the operation of glClear. The scissor box bounds the cleared region. Alpha function, blend function, logical operation, stenciling, texture mapping, and depth-buffering are ignored by glClear.
glClear takes a single argument that is the bitwise or of several values indicating which buffer is to be cleared.
The values are as follows:
The value to which each buffer is cleared depends on the setting of the clear value for that buffer.
NotesIf a buffer is not present, then a glClear directed at that buffer has no effect.
Errors
![[Next]](http://www.talisman.org/opengl-1.1/buttons/ArrowRightOff.gif)
glClearColor: specify clear values for the color buffers.
C Specification | Parameters | Description | Errors | Associated Gets | See Also
C Specification
void glClearColor(
GLclampf red,
GLclampf green,
GLclampf blue,
GLclampf alpha)
Parameters
DescriptionglClearColor specifies the red, green, blue, and alpha values used by glClear to clear the color buffers. Values specified by glClearColor are clamped to the range [0, 1].
Errors
剛試了好久,現在整理出一些些心得首先你需要三個檔案:
glut.h
glut32.lib
glut32.dll
一般程式基本都要秀出訊息給使用者看,也因此,許多程式語言的第一堂課就是秀出一段訊息,「Hello, world!!」