It would seem that when using code that materials are not being loaded for cylinders and cones:
function App:Start()
--Create a window
self.window = Window:Create()
self.context = Context:Create(self.window)
self.world = World:Create()
self.camera = Camera:Create()
self.camera:SetRotation(35,0,0)
self.camera:Move(0,0,-1.2)
local light = DirectionalLight:Create()
light:SetRotation(35,35,0)
material = Material:Load("Materials/Developer/bluegrid.mat")
box = Model:Box()
box:SetMaterial(material)
box:SetScale(0.1,0.1,0.1)
box:SetPosition(0,0.55,-0.8)
sphere = Model:Sphere()
sphere:SetMaterial(material)
sphere:SetScale(0.1,0.1,0.1)
sphere:SetPosition(0.15,0.55,-0.8)
--materials not loading for Cylinder or Cone
cylinder = Model:Cylinder()
cylinder:SetMaterial(material)
cylinder:SetScale(0.15,0.65,0.15)
cylinder:SetPosition(-0.6,0,0)
cone = Model:Cone()
cone:SetMaterial(material)
cone:SetScale(0.15,0.65,0.15)
cone:SetPosition(-1,0,0)
return true
end
function App:Loop()
if self.window:Closed() or self.window:KeyHit(Key.Escape) then return false end
Time:Update()
self.world:Update()
self.world:Render()
self.context:Sync()
return true
end