Skip to content
Chris Petersen edited this page Oct 16, 2014 · 1 revision

glOrtho describes a transformation that produces a parallel projection.

Note: glOrtho is different in OpenGL and GLES. Why???

Parameter Description
left Left clipping plane
right Right clipping plane
bottom Bottom clipping plane
top Top clipping plane
near Nearer clipping plane
far Farther clipping plane

Example

Example 1: From modules/ln_glcore/glcore.scm:

(define (glCoreInit)
  (if glCore:needsinit (begin
    (glCoreTextureReset)
    (glClearColor 0. 0. 0. 0.)
    (glMatrixMode GL_PROJECTION)
    (glLoadIdentity)
    (glOrtho 0. (flo app:width) 0. (flo app:height) -1. 1.)
    ;; Many more here
  )))
Clone this wiki locally