diff src/semicongine/engine.nim @ 650:be6e0f89645a

add: initial code for texture support, not finished, had to completely refactor how to handle material-data (ie scene-wide data, sorry if you ever read this
author Sam <sam@basx.dev>
date Fri, 05 May 2023 23:45:50 +0700
parents c774b064def5
children 659992f14dd6
line wrap: on
line diff
--- a/src/semicongine/engine.nim	Thu May 04 23:44:15 2023 +0700
+++ b/src/semicongine/engine.nim	Fri May 05 23:45:50 2023 +0700
@@ -102,12 +102,12 @@
   assert engine.state != Destroyed
   engine.renderer = engine.device.initRenderer(renderPass)
 
-proc addScene*(engine: var Engine, scene: Entity, vertexInput: seq[ShaderAttribute], transformAttribute="") =
+proc addScene*(engine: var Engine, scene: Scene, vertexInput: seq[ShaderAttribute], transformAttribute="") =
   assert engine.state != Destroyed
   assert transformAttribute == "" or transformAttribute in map(vertexInput, proc(a: ShaderAttribute): string = a.name)
   engine.renderer.setupDrawableBuffers(scene, vertexInput, transformAttribute=transformAttribute)
 
-proc renderScene*(engine: var Engine, scene: Entity) =
+proc renderScene*(engine: var Engine, scene: var Scene) =
   assert engine.state == Running
   assert engine.renderer.valid
   if engine.state == Running: