Module OpenGL

Lua OpenGL API


See also:

Text

gl.Text

Draw Basics

gl.Color

Text


gl.Text(text, x, y, size[, options])

Parameters:

  1. text string
  2. x number
  3. y number
  4. size number
  5. options string

    concatenated string of option characters.

    • horizontal alignment:
      • 'c' = center
      • 'r' = right
    • vertical alignment:
      • 'a' = ascender
      • 't' = top
      • 'v' = vertical center
      • 'x' = baseline
      • 'b' = bottom
      • 'd' = descender
    • decorations:
      • 'o' = black outline
      • 'O' = white outline
      • 's' = shadow
    • other:
      • 'n' = don't round vertex coords to nearest integer (font may get blurry)
    (optional)

Returns:

  1. nil

Draw Basics


gl.Color(r[, g[, b[, a]]])

Parameters:

  1. r number or {number,number,number,number} red when number, rgba quadruple or rgb triple otherwise
  2. g number (optional)
  3. b number (optional)
  4. a number (optional)

Returns:

  1. nil