FileDocCategorySizeDatePackage
Shader.javaAPI DocAndroid 5.1 API2417Thu Mar 12 22:22:44 GMT 2015com.android.scenegraph

Shader

public abstract class Shader extends com.android.scenegraph.SceneGraphBase
hide

Fields Summary
protected Type
mPerObjConstants
protected Type
mPerShaderConstants
protected HashMap
mSourceParams
protected ArrayList
mShaderTextureNames
protected ArrayList
mShaderTextureTypes
protected ArrayList
mTextureNames
protected ArrayList
mTextureTypes
protected Allocation
mConstantBuffer
protected ScriptField_ShaderParam_s
mConstantBufferParams
Constructors Summary
public Shader()

        mSourceParams = new HashMap<String, ShaderParam>();
        mShaderTextureNames = new ArrayList<String>();
        mShaderTextureTypes = new ArrayList<Program.TextureType>();
        mTextureNames = new ArrayList<String>();
        mTextureTypes = new ArrayList<Program.TextureType>();
    
Methods Summary
public voidappendSourceParams(com.android.scenegraph.ShaderParam p)

        mSourceParams.put(p.getParamName(), p);
    
public TypegetObjectConstants()

        return mPerObjConstants;
    
public TypegetShaderConstants()

        return mPerObjConstants;
    
voidlinkConstants(RenderScriptGL rs)

        if (mPerShaderConstants == null) {
            return;
        }

        Element constElem = mPerShaderConstants.getElement();
        mConstantBufferParams  = ShaderParam.fillInParams(constElem, mSourceParams, null);

        mConstantBuffer = Allocation.createTyped(rs, mPerShaderConstants);