Jump to content

Tutorial Lua problem


limdorn
 Share

Recommended Posts

Hi I tried to use the tutorial meshes to lua and I have a problem.

 

The code is


--registering the abstract path

RegisterAbstractPath("")

 

--Set a graphics mode

Graphics(800,600)

 

--Framework object

fw = CreateFramework()

 

--set camera

camera = fw.main.camera

camera:SetPosition(Vec3(0,1,-5))

 

--create cube

cube = CreateCube()

 

--create sphere

sphere = CreateSphere(28)

sphere:SetPosition(Vec3(3,0,0))

 

--create light

light = CreateDirectionalLight()

 

--load mesh

torus = LoadMesh("abstract::torus.gmf")

if torus == nil then

Notify("Failes to load torus.gmf")

else

Notify("Loaded the torus.gmf")

end

 

--main loop

while AppTerminate()==0 do

 

fw: Update()

fw: Render()

 

Flip(0)

end

[code]

 

I have the all files in the same place but the torus don´t appeared. Could somebody help me? thanks

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...