mov
This commit is contained in:
1 parent
197d93ee7b
commit
33fae994fc
5 files changed
+6
-5
No files matched your search
@@ -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]
|
||||
}
|
||||
Reference in new issue
Block a user