FileDocCategorySizeDatePackage
ProgramFragment.javaAPI DocAndroid 5.1 API3555Thu Mar 12 22:22:42 GMT 2015android.renderscript

ProgramFragment

public class ProgramFragment extends Program
hide
deprecated
in API 16

The RenderScript fragment program, also known as fragment shader is responsible for manipulating pixel data in a user defined way. It's constructed from a GLSL shader string containing the program body, textures inputs, and a Type object that describes the constants used by the program. Similar to the vertex programs, when an allocation with constant input values is bound to the shader, its values are sent to the graphics program automatically.

The values inside the allocation are not explicitly tracked. If they change between two draw calls using the same program object, the runtime needs to be notified of that change by calling rsgAllocationSyncAll so it could send the new values to hardware. Communication between the vertex and fragment programs is handled internally in the GLSL code. For example, if the fragment program is expecting a varying input called varTex0, the GLSL code inside the program vertex must provide it.

Fields Summary
Constructors Summary
ProgramFragment(long id, RenderScript rs)

        super(id, rs);
    
Methods Summary