Mercurial > games > semicongine
diff src/semicongine/engine.nim @ 592:cda5874a8454
add: recreation of swapchain (at least on linux, windows will likely fail, needs testing
author | Sam <sam@basx.dev> |
---|---|
date | Wed, 19 Apr 2023 01:45:16 +0700 |
parents | 1edf3e16144e |
children | 9f2c178beb60 |
line wrap: on
line diff
--- a/src/semicongine/engine.nim Tue Apr 18 03:06:14 2023 +0700 +++ b/src/semicongine/engine.nim Wed Apr 19 01:45:16 2023 +0700 @@ -81,13 +81,13 @@ selectedPhysicalDevice.filterForGraphicsPresentationQueues() ) -proc setRenderer*(engine: var Engine, renderPasses: openArray[RenderPass]) = - engine.renderer = engine.device.initRenderer(renderPasses) +proc setRenderer*(engine: var Engine, renderPass: RenderPass) = + engine.renderer = engine.device.initRenderer(renderPass) proc addScene*(engine: var Engine, entity: Entity, vertexInput: seq[ShaderAttribute]) = engine.renderer.setupDrawableBuffers(entity, vertexInput) -proc renderScene*(engine: var Engine, entity: Entity): auto = +proc renderScene*(engine: var Engine, entity: Entity) = assert engine.running engine.renderer.render(entity)