diff options
author | Alex Sakhartchouk <alexst@google.com> | 2011-01-09 11:34:03 -0800 |
---|---|---|
committer | Alex Sakhartchouk <alexst@google.com> | 2011-01-09 11:34:03 -0800 |
commit | df27202debdc2573b7882405010fba31ee4d46e6 (patch) | |
tree | 9022187d129d9a7b13d27c629800ac10bf7402a9 /graphics/java/android/renderscript/ProgramVertex.java | |
parent | 660733d3e457482104d8a6e5b0a1fe2182de5150 (diff) |
Adding comments to the renderscript program classes.
Change-Id: I989575951df1218c1e753dfa12193d560266bf11
Diffstat (limited to 'graphics/java/android/renderscript/ProgramVertex.java')
-rw-r--r-- | graphics/java/android/renderscript/ProgramVertex.java | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/graphics/java/android/renderscript/ProgramVertex.java b/graphics/java/android/renderscript/ProgramVertex.java index 13800ff7b594..7ba8b8202c4e 100644 --- a/graphics/java/android/renderscript/ProgramVertex.java +++ b/graphics/java/android/renderscript/ProgramVertex.java @@ -23,6 +23,9 @@ import android.util.Log; /** + * ProgramVertex, also know as a vertex shader, describes a + * stage in the graphics pipeline responsible for manipulating + * geometric data in a user-defined way. * **/ public class ProgramVertex extends Program { @@ -31,11 +34,31 @@ public class ProgramVertex extends Program { super(id, rs); } + /** + * Builder class for creating ProgramVertex objects. + * The builder starts empty and the user must minimally provide + * the GLSL shader code, and the varying inputs. Constant, or + * uniform parameters to the shader may optionally be provided as + * well. + * + **/ public static class Builder extends BaseProgramBuilder { + /** + * Create a builder object. + * + * @param rs + */ public Builder(RenderScript rs) { super(rs); } + /** + * Add varying inputs to the program + * + * @param e element describing the layout of the varying input + * structure + * @return self + */ public Builder addInput(Element e) throws IllegalStateException { // Should check for consistant and non-conflicting names... if(mInputCount >= MAX_INPUT) { @@ -48,6 +71,11 @@ public class ProgramVertex extends Program { return this; } + /** + * Creates ProgramVertex from the current state of the builder + * + * @return ProgramVertex + */ public ProgramVertex create() { mRS.validate(); int[] tmp = new int[(mInputCount + mOutputCount + mConstantCount + mTextureCount) * 2]; |