Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1965610f authored by Romain Guy's avatar Romain Guy
Browse files

Fix FallRS by keeping a reference to the mesh.

parent 475ead0c
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -103,6 +103,9 @@ class FallRS {
    private int mMeshWidth;

    private int mMeshHeight;
    @SuppressWarnings({"FieldCanBeLocal"})
    private RenderScript.TriangleMesh mMesh;

    private Allocation mRippleMap;
    private Allocation mRefractionMap;

@@ -211,8 +214,8 @@ class FallRS {
            }
        }

        RenderScript.TriangleMesh mesh = rs.triangleMeshCreate();
        mesh.setName("WaterMesh");
        mMesh = rs.triangleMeshCreate();
        mMesh.setName("WaterMesh");

        mMeshWidth = wResolution + 1;
        mMeshHeight = hResolution + 1;