X-Git-Url: https://git.lukelau.me/?p=opengl.git;a=blobdiff_plain;f=main.cpp;h=c65e8d249e74f101f31f3ee3b2db817fb609304f;hp=a579adfc63ffdb71e910f63840b1a4b625bd9711;hb=17dcc398b9a5d1a6a287c01dff7fc7cf2b792372;hpb=d26c67a51e58c3f70d1689e265e9bebe578b50ad diff --git a/main.cpp b/main.cpp index a579adf..c65e8d2 100644 --- a/main.cpp +++ b/main.cpp @@ -168,7 +168,9 @@ void display() { glUniform3fv(glGetUniformLocation(pbrProg->progId, "lightPositions"), numLights, glm::value_ptr(lightPositions[0])); glUniform3fv(glGetUniformLocation(pbrProg->progId, "lightColors"), numLights, glm::value_ptr(lightColors[0])); - glm::vec3 targetPos(sin(d * 1.f), 0, cos(d * 1.f)); + glm::vec3 targetPos(sin(d) * 2 - 2, 2, 0); + Light targetLight = { glm::translate(glm::mat4(1), targetPos), {0.5, 1, 1} }; + drawLight(targetLight); inverseKinematic(*sceneModel->find("Bottom Bone"), *sceneModel->find("Toppest Bone"), targetPos); /* std::array jointPositions; std::array jointDistances; */