comparison examples/E04_input.nim @ 247:beb41c93aa3f

fix: gltf loading
author Sam <sam@basx.dev>
date Tue, 23 May 2023 01:05:06 +0700
parents f3912838cd69
children ad078e26a1c7
comparison
equal deleted inserted replaced
246:dcbd9f256f6a 247:beb41c93aa3f
177 177
178 # mainloop 178 # mainloop
179 while myengine.updateInputs() == Running: 179 while myengine.updateInputs() == Running:
180 if myengine.windowWasResized(): 180 if myengine.windowWasResized():
181 setShaderGlobal(scene, "projection", 181 setShaderGlobal(scene, "projection",
182 ortho[float32]( 182 ortho(
183 0'f32, float32(myengine.getWindow().size[0]), 183 0, float32(myengine.getWindow().size[0]),
184 0'f32, float32(myengine.getWindow().size[1]), 184 0, float32(myengine.getWindow().size[1]),
185 0'f32, 1'f32, 185 0, 1,
186 ) 186 )
187 ) 187 )
188 let 188 let
189 winsize = myengine.getWindow().size 189 winsize = myengine.getWindow().size
190 center = translate3d(float32(winsize[0]) / 2'f32, float32(winsize[1]) / 2'f32, 0.1'f32) 190 center = translate3d(float32(winsize[0]) / 2'f32, float32(winsize[1]) / 2'f32, 0.1'f32)