glOrtho - part-cw/lambdanative GitHub Wiki

(glOrtho left right bottom top near far)

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
  )))