Browse Source

add dt and alpha params to renderers

main
cosmonaut 2 years ago
parent
commit
36e98b0376
  1. 4
      encompass-cs/RenderManager.cs
  2. 2
      encompass-cs/Renderer.cs
  3. 2
      encompass-cs/UberRenderer.cs
  4. 4
      encompass-cs/World.cs
  5. 2
      encompass-cs/WorldBuilder.cs

4
encompass-cs/RenderManager.cs

@ -17,11 +17,11 @@ namespace Encompass
renderers.Add(renderer);
}
public void Draw()
public void Draw(double dt, double alpha)
{
foreach (var renderer in renderers)
{
renderer.Render();
renderer.Render(dt, alpha);
}
}
}

2
encompass-cs/Renderer.cs

@ -18,7 +18,7 @@ namespace Encompass
_componentManager = componentManager;
}
public abstract void Render();
public abstract void Render(double dt, double alpha);
protected ReadOnlySpan<Entity> ReadEntities<TComponent>() where TComponent : struct
{

2
encompass-cs/UberRenderer.cs

@ -20,7 +20,7 @@ namespace Encompass
}
// can't reflect invoke on Span returns...
public override void Render()
public override void Render(double dt, double alpha)
{
foreach (var type in _componentTypes)
{

4
encompass-cs/World.cs

@ -69,9 +69,9 @@ namespace Encompass
/// <summary>
/// Causes the Renderers to draw.
/// </summary>
public void Draw()
public void Draw(double dt, double alpha)
{
_renderManager.Draw();
_renderManager.Draw(dt, alpha);
}
}
}

2
encompass-cs/WorldBuilder.cs

@ -474,7 +474,7 @@ namespace Encompass
dummyComponentManager.WriteComponents();
uberRenderer.SetEntity(uberEngine.Entity);
uberRenderer.Render();
uberRenderer.Render(1, 0);
}
}
}

Loading…
Cancel
Save