加载中...
The Wayback Machine - https://sup1a9wrlpyh5li9ro.vcoronado.top/web/20110513090244/http://developer.android.com:80/reference/android/renderscript/ProgramStore.html
public class

ProgramStore

extends Object
java.lang.Object
   ↳ android.renderscript.ProgramStore

Class Overview

ProgramStore contains a set of parameters that control how the graphics hardware handles writes to the framebuffer. It could be used to:

  • enable/disable depth testing
  • specify wheather depth writes are performed
  • setup various blending modes for use in effects like transparency
  • define write masks for color components written into the framebuffer

Summary

Nested Classes
enum ProgramStore.BlendDstFunc Specifies the functions used to combine incoming pixels with those already in the frame buffer. 
enum ProgramStore.BlendSrcFunc Specifies the functions used to combine incoming pixels with those already in the frame buffer. 
class ProgramStore.Builder Builder class for ProgramStore object. 
enum ProgramStore.DepthFunc Specifies the function used to determine whether a fragment will be drawn during the depth testing stage in the rendering pipeline by comparing its value with that already in the depth buffer. 
Public Methods
static ProgramStore BLEND_ALPHA_DEPTH_NONE(RenderScript rs)
Returns a pre-defined program store object with the following characteristics: - incoming pixels always pass the depth test and their value is not stored in the depth buffer - incoming pixel's value is combined with the stored color (Dest) using the following formula Final.RGB = Source.RGB * Source.A + Dest.RGB * (1 - Source.A)
static ProgramStore BLEND_ALPHA_DEPTH_TEST(RenderScript rs)
Returns a pre-defined program store object with the following characteristics: - incoming pixels are drawn if their depth value is less than the stored value in the depth buffer.
static ProgramStore BLEND_NONE_DEPTH_NONE(RenderScript rs)
Returns a pre-defined program store object with the following characteristics: - incoming pixels always pass the depth test and their value is not stored in the depth buffer - incoming pixels override the value stored in the color buffer
static ProgramStore BLEND_NONE_DEPTH_TEST(RenderScript rs)
Returns a pre-defined program store object with the following characteristics: - incoming pixels are drawn if their depth value is less than the stored value in the depth buffer.
synchronized void destroy()
destroy disconnects the object from the native object effectively rendering this java object dead.
void setName(String name)
setName assigns a name to an object.
Protected Methods
void finalize()
Called before the object's memory is reclaimed by the VM.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static ProgramStore BLEND_ALPHA_DEPTH_NONE (RenderScript rs)

Since: API Level 11

Returns a pre-defined program store object with the following characteristics: - incoming pixels always pass the depth test and their value is not stored in the depth buffer - incoming pixel's value is combined with the stored color (Dest) using the following formula Final.RGB = Source.RGB * Source.A + Dest.RGB * (1 - Source.A)

Parameters
rs Context to which the program will belong.

public static ProgramStore BLEND_ALPHA_DEPTH_TEST (RenderScript rs)

Since: API Level 11

Returns a pre-defined program store object with the following characteristics: - incoming pixels are drawn if their depth value is less than the stored value in the depth buffer. If the pixel is drawn, its value is also stored in the depth buffer - if the incoming (Source) pixel passes depth test, its value is combined with the stored color (Dest) using the following formula Final.RGB = Source.RGB * Source.A + Dest.RGB * (1 - Source.A)

Parameters
rs Context to which the program will belong.

public static ProgramStore BLEND_NONE_DEPTH_NONE (RenderScript rs)

Since: API Level 11

Returns a pre-defined program store object with the following characteristics: - incoming pixels always pass the depth test and their value is not stored in the depth buffer - incoming pixels override the value stored in the color buffer

Parameters
rs Context to which the program will belong.

public static ProgramStore BLEND_NONE_DEPTH_TEST (RenderScript rs)

Since: API Level 11

Returns a pre-defined program store object with the following characteristics: - incoming pixels are drawn if their depth value is less than the stored value in the depth buffer. If the pixel is drawn, its value is also stored in the depth buffer - incoming pixels override the value stored in the color buffer if it passes the depth test

Parameters
rs Context to which the program will belong.

public synchronized void destroy ()

Since: API Level 11

destroy disconnects the object from the native object effectively rendering this java object dead. The primary use is to force immediate cleanup of resources when it is believed the GC will not respond quickly enough.

public void setName (String name)

Since: API Level 11

setName assigns a name to an object. This object can later be looked up by this name. This name will also be retained if the object is written to an A3D file.

Parameters
name The name to assign to the object.

Protected Methods

protected void finalize ()

Since: API Level 11

Called before the object's memory is reclaimed by the VM. This can only happen once the garbage collector has detected that the object is no longer reachable by any thread of the running application.

The method can be used to free system resources or perform other cleanup before the object is garbage collected. The default implementation of the method is empty, which is also expected by the VM, but subclasses can override finalize() as required. Uncaught exceptions which are thrown during the execution of this method cause it to terminate immediately but are otherwise ignored.

Note that the VM does guarantee that finalize() is called at most once for any object, but it doesn't guarantee when (if at all) finalize() will be called. For example, object B's finalize() can delay the execution of object A's finalize() method and therefore it can delay the reclamation of A's memory. To be safe, use a ReferenceQueue, because it provides more control over the way the VM deals with references during garbage collection.

Throws
Throwable