Ok.. Al im trying to do is in the lua editor outside of the editor, load a scene and place a model inside it?
The code..
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)
scene=LoadScene("abstract::scene.sbx")
model1=LoadMesh("abstract::simple_1.gmf")
PositionEntity(model1,Vec3(-1,2,0))
camera=CreateCamera()
camera:SetPosition(Vec3(0,20,0))
camera:Turnf(0.0,42,0.0)
Collisions(1,1,1)
while AppTerminate()==0 do
UpdateAppTime()
world:Update(AppSpeed())
SetBuffer(gbuffer)
world:Render()
SetBuffer(BackBuffer())
world:RenderLights(gbuffer)
DrawText(UPS(),0,0)
Flip(0)
end
Ok the above just crashes when you try to run it, remove the line PositionEntity(model1,Vec3(-1,2,0)) and it loads, but cannot see the model?
am i doing it wrong?
Andy