FileDocCategorySizeDatePackage
RenderState.javaAPI DocAndroid 5.1 API2978Thu Mar 12 22:22:44 GMT 2015com.android.scenegraph

RenderState

public class RenderState extends SceneGraphBase
hide

Fields Summary
VertexShader
mVertex
FragmentShader
mFragment
android.renderscript.ProgramStore
mStore
android.renderscript.ProgramRaster
mRaster
ScriptField_RenderState_s
mField
Constructors Summary
public RenderState(VertexShader pv, FragmentShader pf, android.renderscript.ProgramStore ps, android.renderscript.ProgramRaster pr)

        mVertex = pv;
        mFragment = pf;
        mStore = ps;
        mRaster = pr;
    
public RenderState(RenderState r)

        mVertex = r.mVertex;
        mFragment = r.mFragment;
        mStore = r.mStore;
        mRaster = r.mRaster;
    
Methods Summary
public ScriptField_RenderState_sgetRSData()

        if (mField != null) {
            return mField;
        }

        RenderScriptGL rs = SceneManager.getRS();
        if (rs == null) {
            return null;
        }

        mField = new ScriptField_RenderState_s(rs, 1);
        updateRSData();

        return mField;
    
public voidsetProgramFragment(FragmentShader pf)

        mFragment = pf;
        updateRSData();
    
public voidsetProgramRaster(android.renderscript.ProgramRaster pr)

        mRaster = pr;
        updateRSData();
    
public voidsetProgramStore(android.renderscript.ProgramStore ps)

        mStore = ps;
        updateRSData();
    
public voidsetProgramVertex(VertexShader pv)

        mVertex = pv;
        updateRSData();
    
voidupdateRSData()

        if (mField == null) {
            return;
        }
        ScriptField_RenderState_s.Item item = new ScriptField_RenderState_s.Item();
        item.pv = mVertex.getRSData().getAllocation();
        item.pf = mFragment.getRSData().getAllocation();
        item.ps = mStore;
        item.pr = mRaster;

        mField.set(item, 0, true);