Continuing with Square.cpp
- A note on some OpenGL commands
- glfoocount[v][u][bsifd]
- man glColor
- The redisplay function is drawScene
- This gets called
- When there is an expose event
- When the window is created
- When the window is resized
- When glutPostRedisplay is called.
- In our case, this just draws the square.
- glBegin() .. glEnd()
- These begin and end the definition of an object.
- glBegin takes a single argument.
- GL_POLYGON : a polygon
- GL_POINTS : draw individual points
- GL_LINES: Draw a series of lines
- GL_LINE_STRIP:
- GL_LINE_LOOP:
- GL_TRIANGLES:
- GL_TRIANGLE_STRIP
- GL_TRIANGLE_FAN
- GL_QUADS
- GL_QUAD_STRIP
- Let's look at myCircle.C
- p will decrease the number of points
- P will increase the number of points
- s will change the mode in glBegin()
- r will reset
- x,X will change the x coordinate by -/+ 10
- y,Y will change the y coordinate by -/+ 10
- l/L will change the lower coordinates of the window
- u/U will change the upper coordinates of the window.
- Play with x/X, y/Y a bit
- How does the coordinate system seem to work in OpenGL?
- Is this different from mouse coordinates?