Skip to content

Commit

Permalink
Unity 2019.1 support
Browse files Browse the repository at this point in the history
- Modified to use DrawProceduralNow instead of DrawProcedural on 2019.1.
  • Loading branch information
keijiro committed Jul 8, 2019
1 parent 4448703 commit 3aa6823
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Assets/Pcx/Runtime/PointCloudRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,11 @@ void OnRenderObject()
_pointMaterial.SetColor("_Tint", _pointTint);
_pointMaterial.SetMatrix("_Transform", transform.localToWorldMatrix);
_pointMaterial.SetBuffer("_PointBuffer", pointBuffer);
#if UNITY_2019_1_OR_NEWER
Graphics.DrawProceduralNow(MeshTopology.Points, pointBuffer.count, 1);
#else
Graphics.DrawProcedural(MeshTopology.Points, pointBuffer.count, 1);
#endif
}
else
{
Expand All @@ -121,7 +125,11 @@ void OnRenderObject()
_diskMaterial.SetMatrix("_Transform", transform.localToWorldMatrix);
_diskMaterial.SetBuffer("_PointBuffer", pointBuffer);
_diskMaterial.SetFloat("_PointSize", pointSize);
#if UNITY_2019_1_OR_NEWER
Graphics.DrawProceduralNow(MeshTopology.Points, pointBuffer.count, 1);
#else
Graphics.DrawProcedural(MeshTopology.Points, pointBuffer.count, 1);
#endif
}
}

Expand Down

0 comments on commit 3aa6823

Please sign in to comment.