This commit is contained in:
Михаил Капелько committed 2026-10-20 06:31:26 +03:00
1 parent 7829cab78b
commit 137188e618
5 files changed
+42 -25

No files matched your search

+19
View File
@@ -1,6 +1,25 @@
import Foundation
import RaylibBridge
func renderInit(_ vm: RenderVM) {
vm.glView.openGLContext?.makeCurrentContext()
// Enable VSync
var swapInterval: Int32 = 1
vm.glView.openGLContext?.setValues(&swapInterval, for: .swapInterval)
// Init Raylib
sr_init(
1, // Default width
1, // Default height
RENDER_SHADER_MAIN_VS,
RENDER_SHADER_MAIN_FS,
RENDER_SHADER_SHADOW_VS,
RENDER_SHADER_SHADOW_FS,
RENDER_CONFIG
)
}
func renderLoadCubeModel(_ vm: RenderVM) {
let path = Bundle.main.resourceURL!.path + RENDER_MODEL_CUBE
vm.glView.openGLContext?.makeCurrentContext()