2D VIEWING IN OPEN GL
• The basic library does everything in 3D.
– The 3D routines can be adapted to 2D
– A viewport function is provided.
• To define clipping windows and viewports, first go to projection mode.
glMatrixMode( GL_PROJECTION);
If necessary, use glLoadIdentity to initialize the matrix.
• A 2D clipping window can be defined with
gluOtrho2D( xwmin,xwmax, ywmin,ywmax)
• Normalized coordinates are from −1 to 1 in OpenGL. This is the default
clipping window.
0 comments:
Post a Comment