   Clipping in ortho mode
  I have an OpenGL app that changes to Ortho mode to put text and buttons over the rendered scene. I would like to write a common class that lets me specify the top,left,bottom,right rectangle to do my drawing, whether that is a button, bitmap, text, etc. When writing an Win32 app, the window is automatically clipped. I would like to have OpenGL do the same thing. Any ideas? Or should I just make sure I don''t write outside the box?Keith 
  glViewport? glScissor?Enigma ;  set the GL clipping rectangle using:glEnable(GL_SCISSOR_TEST);glScissor(x1,y1,x2,y2); ;  Enigma - glViewport doesn''t actually do any clipping.Number 10 --------------------------{ Arena: Resurrection, my text-based RPG/Mortal Kombat-like game }{ A Look Into The World Of Arena II, a collection of short stories about characters in Arena II } ;  No, but the frustrum does, so as long as you constrain yourself to a subset of operations (i.e. no changes in line width, no raster pos commands and a few others) glViewport will work.  It becomes useful if you wish to specify a new coordinate system for the component.Enigma ;quote:Original post by Enigma  No, but the frustrum does, so as long as you constrain yourself to a subset of operations (i.e. no changes in line width, no raster pos commands and a few others) glViewport will work.*confused* when did glViewport start to touch the frustum? ;quote:Original post by Trienco  *confused* when did glViewport start to touch the frustum?   It don''t touch the frustum. It defines the transformation from normalized device coordinates to window coordinates. So if you make the viewport smaller, you will only squeez the frustum into a smaller part of the window, but the frustum itself is not affected.