diff --git a/core/Screen.cpp b/core/Screen.cpp index 71154bd..8ba1ee4 100644 --- a/core/Screen.cpp +++ b/core/Screen.cpp @@ -64,7 +64,7 @@ Screen::Screen() { void Screen::Enable() { glBindFramebuffer(GL_FRAMEBUFFER, framebuffer); - glClearColor(0.5f, 0.5f, 0.5f, 1.0f); + glClearColor(0.0f, 0.0f, 0.0f, 1.0f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glEnable(GL_DEPTH_TEST); } diff --git a/demo/main.lua b/demo/main.lua index efdb7ba..fbe7960 100644 --- a/demo/main.lua +++ b/demo/main.lua @@ -32,20 +32,21 @@ function init() light.color = couch.Vector3(1.0, 1.0, 1.0) light.ambient = 0.2 light.diffuse = 1.0 - light.specular = 0.01 + light.specular = 0.1 couch.Node.GetRoot().children:Append(light) ball = couch.Mesh.FromFile("cube.obj") material = ball:GetMaterial(0) - material.ambient = WHITE + material.ambient = RED + material.diffuse = RED + material.usesTex = true + material.tex = couch.Texture.FromFile("railing.png") ball:SetMaterial(0, material) couch.Node.GetRoot().children:Append(ball) ball1 = couch.Mesh.FromFile("ball.obj") print(material.diffuse.b) material = ball1:GetMaterial(0) - material.tex = couch.Texture.FromFile("container.png") - material.usesTex = true ball1:SetMaterial(0, material) couch.Node.GetRoot().children:Append(ball1)