Support iOS for ogs-blue (#7)
This commit was merged in pull request #7.
This commit is contained in:
1 parent
37c4e6f442
commit
2b556a4a58
58 files changed
+710
-300
No files matched your search
@@ -0,0 +1,19 @@
|
||||
import AppKit
|
||||
import RaylibBridge
|
||||
|
||||
func renderDraw(_ vm: RenderVM) {
|
||||
vm.glView.openGLContext?.makeCurrentContext()
|
||||
raybriRender(vm.pixelSize[0], vm.pixelSize[1])
|
||||
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]
|
||||
}
|
||||
|
||||
func renderRecreateSurface(_ vm: RenderVM) {
|
||||
// No-op on macOS
|
||||
}
|
||||
Reference in new issue
Block a user