An Interactive Introduction to OpenGL Programming
An Interactive Introduction to OpenGL Programming
An Interactive Introduction to OpenGL Programming
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Example 2: Ortho<br />
void resize( int width, int height )<br />
{<br />
GLdouble aspect = (GLdouble) width /<br />
height;<br />
GLdouble left = -2.5, right = 2.5;<br />
GLdouble bot<strong>to</strong>m = -2.5, <strong>to</strong>p = 2.5;<br />
glViewport( 0, 0, width, height );<br />
glMatrixMode( GL_PROJECTION );<br />
glLoadIdentity();<br />
… continued …