Search in sources :

Example 6 with RenderScriptGL

use of android.renderscript.RenderScriptGL in project android_frameworks_base by ParanoidAndroid.

the class Renderable method setTransform.

public void setTransform(Transform t) {
    mTransform = t;
    if (mField != null) {
        RenderScriptGL rs = SceneManager.getRS();
        updateFieldItem(rs);
        mField.set(mData, 0, true);
    }
}
Also used : RenderScriptGL(android.renderscript.RenderScriptGL)

Example 7 with RenderScriptGL

use of android.renderscript.RenderScriptGL in project android_frameworks_base by ParanoidAndroid.

the class LightBase method getRSData.

ScriptField_Light_s getRSData() {
    if (mField != null) {
        return mField;
    }
    RenderScriptGL rs = SceneManager.getRS();
    if (rs == null) {
        return null;
    }
    if (mField == null) {
        mField = new ScriptField_Light_s(rs, 1);
        mFieldData = new ScriptField_Light_s.Item();
    }
    updateRSData();
    return mField;
}
Also used : RenderScriptGL(android.renderscript.RenderScriptGL)

Example 8 with RenderScriptGL

use of android.renderscript.RenderScriptGL in project android_frameworks_base by ParanoidAndroid.

the class LightBase method updateRSData.

protected void updateRSData() {
    if (mField == null) {
        return;
    }
    RenderScriptGL rs = SceneManager.getRS();
    mFieldData.transformMatrix = mTransform.getRSData().getAllocation();
    mFieldData.name = getNameAlloc(rs);
    mFieldData.color = mColor;
    mFieldData.intensity = mIntensity;
    initLocalData();
    mField.set(mFieldData, 0, true);
}
Also used : RenderScriptGL(android.renderscript.RenderScriptGL)

Example 9 with RenderScriptGL

use of android.renderscript.RenderScriptGL in project android_frameworks_base by ParanoidAndroid.

the class Renderable method setRenderState.

public void setRenderState(RenderState renderState) {
    mRenderState = renderState;
    if (mField != null) {
        RenderScriptGL rs = SceneManager.getRS();
        updateFieldItem(rs);
        mField.set(mData, 0, true);
    }
}
Also used : RenderScriptGL(android.renderscript.RenderScriptGL)

Example 10 with RenderScriptGL

use of android.renderscript.RenderScriptGL in project android_frameworks_base by ParanoidAndroid.

the class ShaderParam method getRSData.

public ScriptField_ShaderParamData_s getRSData() {
    if (mField != null) {
        return mField;
    }
    RenderScriptGL rs = SceneManager.getRS();
    mField = new ScriptField_ShaderParamData_s(rs, 1);
    if (mParamName != null) {
        mData.paramName = SceneManager.getCachedAlloc(mParamName);
        if (mData.paramName == null) {
            mData.paramName = SceneManager.getStringAsAllocation(rs, mParamName);
            SceneManager.cacheAlloc(mParamName, mData.paramName);
        }
    }
    initLocalData();
    mData.timestamp = 1;
    mField.set(mData, 0, true);
    return mField;
}
Also used : RenderScriptGL(android.renderscript.RenderScriptGL)

Aggregations

RenderScriptGL (android.renderscript.RenderScriptGL)13 FragmentShader (com.android.scenegraph.FragmentShader)2 MipmapControl (android.renderscript.Allocation.MipmapControl)1 Element (android.renderscript.Element)1 VertexShader (com.android.scenegraph.VertexShader)1