diff options
Diffstat (limited to 'src/net/java/joglutils/msg/nodes/ShaderNode.java')
-rw-r--r-- | src/net/java/joglutils/msg/nodes/ShaderNode.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/net/java/joglutils/msg/nodes/ShaderNode.java b/src/net/java/joglutils/msg/nodes/ShaderNode.java index 73154ee..ab9ea60 100644 --- a/src/net/java/joglutils/msg/nodes/ShaderNode.java +++ b/src/net/java/joglutils/msg/nodes/ShaderNode.java @@ -45,6 +45,7 @@ import javax.media.opengl.*; import net.java.joglutils.msg.actions.*; import net.java.joglutils.msg.elements.*; +import net.java.joglutils.msg.math.*; import net.java.joglutils.msg.misc.*; /** Represents a vertex/fragment shader. */ @@ -78,6 +79,14 @@ public class ShaderNode extends Node { this.fragmentShaderCode = fragmentShaderCode; } + private Map<String, Vec4f> fMap = new HashMap<String, Vec4f>(); + public void setUniform(String name, float val) { + fMap.put(name, new Vec4f(val, val, val, val)); + } + public Map<String, Vec4f> getUniformfMap() { + return fMap; + } + /** Fetches the Shader object associated with this ShaderNode. It is required to call this each frame during rendering. An OpenGL context must be current at the time this method is |