You are not allowed to do AttachFile on this page. Login and try again.

    YoungMinKim/assignment 1 - generative art

YoungMinKim/assignment 1 - generative art에 대해 써주세요.

1.

2. glutIntDisplayMode(unsigned int mode) specifies whether to use an RGBA or color-index color model. You can also specify whether you want a single- or double- buffered window. Finally, you can use this routine to indicate that you want the window to have an associated depth, stencil, and/or accumulation buffer.

GLUT_DOUBLE means that you are using a window with double buffering. GLUT_RGB specifies that you want RGBA color model for the window.

3. ===glOrtho( 0., 1., 0., 1., -1., 1. );=== glOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near, GLdouble far) creates a matrix for an orthographic parallel viewing volume and multiplies the current matrix by it. The given parameters specifies that the space has coordinates from left to right to be 0 to 1, and from bottome to top to be 0 to 1 and from near to far to be -1 to 1.

===glViewport( 0, 0, w, h );=== The arguments for glViewport() describe the origin of the available screen space within the window-(0,0) in this example-and the width and height of the available screen area, all measured in pixels on the screen. This is shy this commnad needs to be called within reshape(): if the window changes size, the viewport needs to change accordingly. Therefore we can use the full screen as a canvas.

Recent