Disney web site - OpenGL Super Bible! Page 59 Figure 3-8 Viewport-to-window
OpenGL Super Bible! Page 59 Figure 3-8 Viewport-to-window mapping Defining the Clipping Volume The last requirement of our ChangeSize() function is to redefine the clipping volume so that the aspect ratio remains square. The aspect ratio is the ratio of the number of pixels along a unit of length in the vertical direction to the number of pixels along the same unit of length in the horizontal direction. An aspect ratio of 1.0 would define a square aspect ratio. An aspect ratio of 0.5 would specify that for every two pixels in the horizontal direction for a unit of length, there is one pixel in the vertical direction for the same unit of length. If a viewport is specified that is not square and it is mapped to a square clipping volume, that will cause images to be distorted. For example, a viewport matching the window size and dimensions but mapped to a square clipping volume would cause images to appear tall and thin in tall and thin windows, and wide and short in wide and short windows. In this case, our square would only appear square when the window was sized to be a square. In our example, an orthographic projection is used for the clipping volume (see Chapter 2). The OpenGL command to create this projection is glOrtho(): void glOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near, GLdouble far ); In 3D Cartesian space, the left and right values specify the minimum and maximum coordinate value displayed along the x-axis; bottom and top are for the y-axis. The near and far parameters are for the z-axis, generally with negative values extending away from the viewer (see Figure 3-9).
Note: If you are looking for high quality webhost to host and run your jsp application check Vision christian web host services