diff --git a/docs/html/guide/topics/renderscript/graphics.jd b/docs/html/guide/topics/renderscript/graphics.jd index 3ea3f85841ddd..2fefecc172ecf 100644 --- a/docs/html/guide/topics/renderscript/graphics.jd +++ b/docs/html/guide/topics/renderscript/graphics.jd @@ -9,10 +9,26 @@ parent.link=index.html
Because of the various layers of code when writing a RenderScript application, it is useful to create the following files for a scene that you want to render:
@@ -73,7 +89,7 @@ href="{@docRoot}resources/samples/RenderScript/MiscSamples/index.html">Misc Samp RenderScript sample that is provided in the SDK as a guide (some code has been modified from its original form for simplicity). -Your native RenderScript code resides in a .rs file in the
<project_root>/src/ directory. You can also define .rsh header
@@ -102,8 +118,8 @@ href="{@docRoot}resources/samples/RenderScript/MiscSamples/index.html">Misc Samp
enough or more resources to do so, and renders as fast as it can if it does not.
For more - information on using the RenderScript graphics functions, see Using the Graphics APIs.
+ information on using the RenderScript graphics functions, see the Drawing section.init() function. This allows you to do any initialization of your
@@ -153,7 +169,7 @@ int root(int launchID) {
}
- When you create a RenderScript (.rs) file, it is helpful to create a
corresponding Android framework class that is an entry point into the .rs file. In
@@ -218,7 +234,7 @@ public class HelloWorldRS {
-
To create a surface view to render graphics on, create a class that extends {@link android.renderscript.RSSurfaceView}. This class also creates a RenderScript context object @@ -293,7 +309,7 @@ public class HelloWorldView extends RSSurfaceView { -
Applications that use RenderScript still adhere to activity lifecyle, and are part of the same view hierarchy as traditional Android applications, which is handled by the Android VM. This @@ -329,9 +345,9 @@ public class HelloWorldActivity extends Activity { } -
The following sections describe how to use the graphics functions to draw with Renderscript.
+The native RenderScript APIs provide a few convenient functions to easily draw a polygon to
the screen. You call these in your root() function to have them render to the
@@ -348,7 +364,7 @@ public class HelloWorldActivity extends Activity {
the screen.
When you want to draw complex shapes and textures to the screen, instantiate a {@link
android.renderscript.Mesh} and draw it to the screen with rsgDrawMesh(). A {@link
@@ -559,7 +575,7 @@ return 0; //specify a non zero, positive integer to specify the frame refresh.
"{@docRoot}resources/samples/RenderScript/MiscSamples/src/com/example/android/rs/miscsamples/RsRenderStatesRS.html">
RsRenderStatesRS sample has many examples on how to create a shader without writing GLSL.
You can also set four pragmas that control the shaders' default bindings to the {@link android.renderscript.RenderScriptGL} context when the script is executing:
@@ -599,7 +615,7 @@ return 0; //specify a non zero, positive integer to specify the frame refresh. #pragma stateStore(parent) -A {@link android.renderscript.Sampler} object defines how data is extracted from textures. Samplers are bound to Program objects (currently only a Fragment Program) alongside the texture