Skip to content
Snippets Groups Projects
Commit c7f7b284 authored by Simon Barner's avatar Simon Barner
Browse files

RED

refs 2490
parent 0da4fd4c
No related branches found
No related tags found
No related merge requests found
......@@ -97,11 +97,13 @@ public class Light {
/** Sets the light position. */
public void setPosition(float x, float y, float z) {
// TODO (SB, 14)
lightPosition = toFloatBuffer(new float[] {x, y, z, lightPosition.get(3)});
}
/** Switches between directional and point light source. */
public void setDirectional(boolean directional) {
// TODO (SB, 14)
lightPosition =
toFloatBuffer(new float[] {lightPosition.get(0), lightPosition.get(1),
lightPosition.get(2), directional ? 0.0f : 1.0f});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment