mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2024-11-22 23:12:59 +08:00
Removed unnecessary locks when updating grass/path graphics - Improved apparent performance of grass painting when FPS is high
This commit is contained in:
parent
a7e2c7a0b6
commit
05d3e37394
@ -245,7 +245,7 @@ namespace CodeWalker.Project.Panels
|
||||
var wf = ProjectForm.WorldForm;
|
||||
if (wf == null) return;
|
||||
|
||||
lock (wf.RenderSyncRoot)
|
||||
//lock (wf.RenderSyncRoot)
|
||||
{
|
||||
CurrentBatch.CreateInstancesAtMouse(
|
||||
CurrentBatch,
|
||||
@ -270,7 +270,7 @@ namespace CodeWalker.Project.Panels
|
||||
var wf = ProjectForm.WorldForm;
|
||||
if (wf == null) return;
|
||||
var changed = false;
|
||||
lock (wf.RenderSyncRoot)
|
||||
//lock (wf.RenderSyncRoot)
|
||||
{
|
||||
if (CurrentBatch.EraseInstancesAtMouse(
|
||||
CurrentBatch,
|
||||
|
12
WorldForm.cs
12
WorldForm.cs
@ -1744,7 +1744,7 @@ namespace CodeWalker
|
||||
{
|
||||
space.BuildYndVerts(ynd);
|
||||
}
|
||||
lock (Renderer.RenderSyncRoot)
|
||||
//lock (Renderer.RenderSyncRoot)
|
||||
{
|
||||
Renderer.Invalidate(ynd);
|
||||
}
|
||||
@ -1766,7 +1766,7 @@ namespace CodeWalker
|
||||
ynv.UpdateTriangleVertices();
|
||||
ynv.BuildBVH();
|
||||
|
||||
lock (Renderer.RenderSyncRoot)
|
||||
//lock (Renderer.RenderSyncRoot)
|
||||
{
|
||||
Renderer.Invalidate(ynv);
|
||||
}
|
||||
@ -1802,7 +1802,7 @@ namespace CodeWalker
|
||||
//{
|
||||
// //space.BuildYndVerts(ynd);
|
||||
//}
|
||||
lock (Renderer.RenderSyncRoot)
|
||||
//lock (Renderer.RenderSyncRoot)
|
||||
{
|
||||
Renderer.Invalidate(tt);
|
||||
}
|
||||
@ -1823,7 +1823,7 @@ namespace CodeWalker
|
||||
|
||||
scenario.BuildVertices();
|
||||
|
||||
lock (Renderer.RenderSyncRoot)
|
||||
//lock (Renderer.RenderSyncRoot)
|
||||
{
|
||||
Renderer.Invalidate(scenario);
|
||||
}
|
||||
@ -1831,7 +1831,7 @@ namespace CodeWalker
|
||||
|
||||
public void UpdateGrassBatchGraphics(YmapGrassInstanceBatch grassBatch)
|
||||
{
|
||||
lock (Renderer.RenderSyncRoot)
|
||||
//lock (Renderer.RenderSyncRoot)
|
||||
{
|
||||
Renderer.Invalidate(grassBatch);
|
||||
}
|
||||
@ -6148,7 +6148,7 @@ namespace CodeWalker
|
||||
ControlBrushTimer++;
|
||||
if (ControlBrushTimer > (Input.ShiftPressed ? 5 : 10))
|
||||
{
|
||||
lock (Renderer.RenderSyncRoot)
|
||||
//lock (Renderer.RenderSyncRoot)
|
||||
{
|
||||
if (ProjectForm != null && MouseLButtonDown)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user