lovr.load

This callback is called once when the app starts. It should be used to perform initial setup work, like loading resources and initializing classes and variables.

function lovr.load(args)
  -- your code here
end

Arguments

NameTypeDescription
argstableThe command line arguments provided to the program.

Returns

Nothing

Example

function lovr.load(args)
  model = lovr.graphics.newModel('cena.fbx')
  texture = lovr.graphics.newTexture('cena.png')
  levelGeometry = lovr.graphics.newMesh(1000)
  effects = lovr.graphics.newShader('vert.glsl', 'frag.glsl')
  loadLevel(1)
end

See also