Methods Summary |
---|
public static android.renderscript.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)
if(rs.mProgramStore_BLEND_ALPHA_DEPTH_NO_DEPTH == null) {
ProgramStore.Builder builder = new ProgramStore.Builder(rs);
builder.setDepthFunc(ProgramStore.DepthFunc.ALWAYS);
builder.setBlendFunc(BlendSrcFunc.SRC_ALPHA, BlendDstFunc.ONE_MINUS_SRC_ALPHA);
builder.setDitherEnabled(false);
builder.setDepthMaskEnabled(false);
rs.mProgramStore_BLEND_ALPHA_DEPTH_NO_DEPTH = builder.create();
}
return rs.mProgramStore_BLEND_ALPHA_DEPTH_NO_DEPTH;
|
public static android.renderscript.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. 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)
if(rs.mProgramStore_BLEND_ALPHA_DEPTH_TEST == null) {
ProgramStore.Builder builder = new ProgramStore.Builder(rs);
builder.setDepthFunc(ProgramStore.DepthFunc.LESS);
builder.setBlendFunc(BlendSrcFunc.SRC_ALPHA, BlendDstFunc.ONE_MINUS_SRC_ALPHA);
builder.setDitherEnabled(false);
builder.setDepthMaskEnabled(true);
rs.mProgramStore_BLEND_ALPHA_DEPTH_TEST = builder.create();
}
return rs.mProgramStore_BLEND_ALPHA_DEPTH_TEST;
|
public static android.renderscript.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
if(rs.mProgramStore_BLEND_NONE_DEPTH_NO_DEPTH == null) {
ProgramStore.Builder builder = new ProgramStore.Builder(rs);
builder.setDepthFunc(ProgramStore.DepthFunc.ALWAYS);
builder.setBlendFunc(BlendSrcFunc.ONE, BlendDstFunc.ZERO);
builder.setDitherEnabled(false);
builder.setDepthMaskEnabled(false);
rs.mProgramStore_BLEND_NONE_DEPTH_NO_DEPTH = builder.create();
}
return rs.mProgramStore_BLEND_NONE_DEPTH_NO_DEPTH;
|
public static android.renderscript.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. 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
if(rs.mProgramStore_BLEND_NONE_DEPTH_TEST == null) {
ProgramStore.Builder builder = new ProgramStore.Builder(rs);
builder.setDepthFunc(ProgramStore.DepthFunc.LESS);
builder.setBlendFunc(BlendSrcFunc.ONE, BlendDstFunc.ZERO);
builder.setDitherEnabled(false);
builder.setDepthMaskEnabled(true);
rs.mProgramStore_BLEND_NONE_DEPTH_TEST = builder.create();
}
return rs.mProgramStore_BLEND_NONE_DEPTH_TEST;
|
public android.renderscript.ProgramStore$BlendDstFunc | getBlendDstFunc()Specifies how the destination blending factor is computed
return mBlendDst;
|
public android.renderscript.ProgramStore$BlendSrcFunc | getBlendSrcFunc()Specifies how the source blending factor is computed
return mBlendSrc;
|
public android.renderscript.ProgramStore$DepthFunc | getDepthFunc()Returns the function used to test writing into the depth
buffer
return mDepthFunc;
|
public boolean | isColorMaskAlphaEnabled()Queries whether alpha channel is written
return mColorMaskA;
|
public boolean | isColorMaskBlueEnabled()Queries whether blue channel is written
return mColorMaskB;
|
public boolean | isColorMaskGreenEnabled()Queries whether green channel is written
return mColorMaskG;
|
public boolean | isColorMaskRedEnabled()Queries whether red channel is written
return mColorMaskR;
|
public boolean | isDepthMaskEnabled()Queries whether writes are enabled into the depth buffer
return mDepthMask;
|
public boolean | isDitherEnabled()Specifies whether colors are dithered before writing into the
framebuffer
return mDither;
|