Create

This function creates and returns a new blank material.

Syntax

Returns

Returns the loaded Font. If the Font cannot be loaded, NULL is returned.

Example

window=Window:Create()
context=Context:Create(window)
world=World:Create()
camera = Camera:Create()
local directionallight = DirectionalLight:Create()
directionallight:SetRotation(45,35,0)

--Create a material
local material = Material:Create()
material:SetColor(1,0,0)

--Create a model and apply the material to it
local model = Model:Sphere()
model:SetPosition(0,0,2)
model:SetMaterial(material)

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

Time:Update()
world:Update()
world:Render()

context:Sync()
end