--Register abstract path
RegisterAbstractPath("")
--Set graphics mode
if Graphics(1024,768)==0 then
Notify("Failed to set graphics mode.",1)
return
end
world=CreateWorld()
if world==nil then
Notify("Failed to initialize engine.",1)
return
end
gbuffer=CreateBuffer(GraphicsWidth(),GraphicsHeight(),1+2+4+8)
camera=CreateCamera()
camera:SetPosition(Vec3(0,0,-2))
light=CreateSpotLight(10)
light:SetRotation(Vec3(45,55,0))
light:SetPosition(Vec3(5,5,-5))
scene=LoadScene("abstract::tunnels.sbx")
light=CreateDirectionalLight()
light:SetRotation(Vec3(45,45,45))
while AppTerminate()==0 do
UpdateAppTime()
world:Update(AppSpeed())
SetBuffer(gbuffer)
world:Render()
SetBuffer(BackBuffer())
world:RenderLights(gbuffer)
DrawText(UPS(),0,0)
Flip(0)
end
I'm trying to load a scene in Lua outside of the Editor with the Lua Engine. With this code, no errors occur but I'm unable to see the scene. Any suggestions why?