FileDocCategorySizeDatePackage
VertexShader.javaAPI DocAndroid 5.1 API3275Thu Mar 12 22:22:44 GMT 2015com.android.scenegraph

VertexShader

public class VertexShader extends Shader
hide

Fields Summary
ProgramVertex
mProgram
ScriptField_VertexShader_s
mField
Constructors Summary
Methods Summary
public ProgramVertexgetProgram()

        return mProgram;
    
ScriptField_VertexShader_sgetRSData()

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

        RenderScriptGL rs = SceneManager.getRS();
        Resources res = SceneManager.getRes();
        if (rs == null || res == null) {
            return null;
        }

        ScriptField_VertexShader_s.Item item = new ScriptField_VertexShader_s.Item();
        item.program = mProgram;

        linkConstants(rs);
        if (mPerShaderConstants != null) {
            item.shaderConst = mConstantBuffer;
            item.shaderConstParams = mConstantBufferParams.getAllocation();
            mProgram.bindConstants(item.shaderConst, 0);
        }

        item.objectConstIndex = -1;
        if (mPerObjConstants != null) {
            item.objectConstIndex = mPerShaderConstants != null ? 1 : 0;
        }

        mField = new ScriptField_VertexShader_s(rs, 1);
        mField.set(item, 0, true);
        return mField;