comparison tests/test_rendering.nim @ 1277:01138e6257dd

did: fix a few things
author sam <sam@basx.dev>
date Mon, 29 Jul 2024 15:04:52 +0700
parents 4cf9872f7bb6
children a89a70ea3da2
comparison
equal deleted inserted replaced
1276:b5fb00760162 1277:01138e6257dd
434 var start = getMonoTime() 434 var start = getMonoTime()
435 while ((getMonoTime() - start).inMilliseconds().int / 1000) < time: 435 while ((getMonoTime() - start).inMilliseconds().int / 1000) < time:
436 let tStartLoop = getMonoTime() - tStart 436 let tStartLoop = getMonoTime() - tStart
437 437
438 uniforms1.data.data.data.mvp = ( 438 uniforms1.data.data.data.mvp = (
439 Perspective(-PI / 2, GetAspectRatio(), 0.01, 100) * 439 Projection(-PI / 2, GetAspectRatio(), 0.01, 100) *
440 Translate(0, 0, 2) * 440 Translate(0, 0, 2) *
441 Rotate(PI / 4, X) * 441 Rotate(PI / 4, X) *
442 Rotate(PI * 0.1 * (tStartLoop.inMicroseconds() / 1_000_000), Y) 442 Rotate(PI * 0.1 * (tStartLoop.inMicroseconds() / 1_000_000), Y)
443 ) 443 )
444 UpdateGPUBuffer(uniforms1.data.data, flush = true) 444 UpdateGPUBuffer(uniforms1.data.data, flush = true)