Introduce chkgfx (#3)

This commit was merged in pull request #3.
This commit is contained in:
kornerr committed 2026-10-22 05:17:21 +02:00
1 parent 1515a9483b
commit fb28dd55c7
77 files changed
+1598 -543

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
import AppKit
import RaylibBridge
func renderDraw(_ vm: RenderVM) {
vm.glView.openGLContext?.makeCurrentContext()
raybri_resize(vm.pixelSize[0], vm.pixelSize[1])
let t = Float(CACurrentMediaTime() - vm.startTime)
raybri_set_rotation(t * 6.0, t * 18.0, 0.0)
raybri_render()
vm.glView.openGLContext?.flushBuffer()
}
func renderPixelSize(_ view: NSView) -> [Int32] {
let backing = view.convertToBacking(view.bounds)
let w = Int32(max(1, backing.width))
let h = Int32(max(1, backing.height))
return [w, h]
}