summaryrefslogtreecommitdiff
path: root/graphics/java/android/renderscript/ProgramVertex.java
diff options
context:
space:
mode:
authorRobert Ly <robertly@google.com>2011-02-09 13:57:06 -0800
committerRobert Ly <robertly@google.com>2011-02-09 16:24:12 -0800
commit11518acc8c416023d8c2192b441a1767205676d9 (patch)
tree569e1021ca720dc13aaf513013cb1e8c2c002ddd /graphics/java/android/renderscript/ProgramVertex.java
parent3f41d8f5ee1a8d5366d79ee03d97fac8403c676a (diff)
clean up and add javadocs
Change-Id: I7f628106247de887cd91c4a4b4b55d3ebfa700c8
Diffstat (limited to 'graphics/java/android/renderscript/ProgramVertex.java')
-rw-r--r--graphics/java/android/renderscript/ProgramVertex.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/graphics/java/android/renderscript/ProgramVertex.java b/graphics/java/android/renderscript/ProgramVertex.java
index a965b819d8b1..55653f74afcc 100644
--- a/graphics/java/android/renderscript/ProgramVertex.java
+++ b/graphics/java/android/renderscript/ProgramVertex.java
@@ -14,6 +14,27 @@
* limitations under the License.
*/
+ /**
+ * <p>The Renderscript vertex program, also known as a vertex shader, describes a stage in
+ * the graphics pipeline responsible for manipulating geometric data in a user-defined way.
+ * The object is constructed by providing the Renderscript system with the following data:</p>
+ * <ul>
+ * <li>Element describing its varying inputs or attributes</li>
+ * <li>GLSL shader string that defines the body of the program</li>
+ * <li>a Type that describes the layout of an Allocation containing constant or uniform inputs</li>
+ * </ul>
+ *
+ * <p>Once the program is created, you bind it to the graphics context, RenderScriptGL, and it will be used for
+ * all subsequent draw calls until you bind a new program. If the program has constant inputs,
+ * the user needs to bind an allocation containing those inputs. The allocation's type must match
+ * the one provided during creation. The Renderscript library then does all the necessary plumbing
+ * to send those constants to the graphics hardware. Varying inputs to the shader, such as position, normal,
+ * and texture coordinates are matched by name between the input Element and the Mesh object being drawn.
+ * The signatures don't have to be exact or in any strict order. As long as the input name in the shader
+ * matches a channel name and size available on the mesh, the runtime takes care of connecting the
+ * two. Unlike OpenGL, there is no need to link the vertex and fragment programs.</p>
+ *
+ **/
package android.renderscript;