Working on render logic

This commit is contained in:
Robert committed 2019-10-23 17:35:13 +02:00
1 parent c2c849201d
commit 9badc666e8
8 files changed
+50 -19

No files matched your search

+5
View File
@@ -64,12 +64,17 @@ namespace Artemis.Core.Services
foreach (var module in modules)
module.Update(args.DeltaTime);
// If there is no graphics decorator, skip the frame
if (_rgbService.GraphicsDecorator == null)
return;
// Render all active modules
using (var g = _rgbService.GraphicsDecorator.GetGraphics())
{
// If there are no graphics, skip the frame
if (g == null)
return;
g.Clear(Color.Black);
foreach (var module in modules)
module.Render(args.DeltaTime, _rgbService.Surface, g);