SetSkybox

This function can be used to set add a skybox to a camera. The sky will be drawn everywhere and appear behind all rendered objects.

Syntax

Parameters

Returns

The second function overload will return true if the asset is loaded, otherwise false is returned.

Example

window = Window:Create()
context = Context:Create(window)
world = World:Create()
local camera = Camera:Create()

--Set skybox
skybox = Texture:Load("Materials/Sky/skybox_texture.tex")
camera:SetSkybox(skybox)

while true do
if window:Closed() or window:KeyHit(Key.Escape) then return false end

Time:Update()
world:Update()
world:Render()
context:Sync()
end