gl view done
This commit is contained in:
1 parent
137188e618
commit
ff4613d8e6
6 files changed
+54
-45
No files matched your search
@@ -1,4 +1,16 @@
|
||||
import AppKit
|
||||
import RaylibBridge
|
||||
|
||||
func renderDraw(_ vm: RenderVM) {
|
||||
vm.glView.openGLContext?.makeCurrentContext()
|
||||
|
||||
sr_resize(vm.pixelSize[0], vm.pixelSize[1])
|
||||
let t = Float(CACurrentMediaTime() - vm.startTime)
|
||||
sr_set_rotation(t * 6.0, t * 18.0, 0.0)
|
||||
sr_render()
|
||||
|
||||
vm.glView.openGLContext?.flushBuffer()
|
||||
}
|
||||
|
||||
func renderPixelSize(_ view: NSView) -> [Int32] {
|
||||
let backing = view.convertToBacking(view.bounds)
|
||||
|
||||
Reference in new issue
Block a user