try to load model on click

This commit is contained in:
Михаил Капелько committed 2026-10-19 18:25:35 +03:00
1 parent 5c93de7764
commit cc29a5fc93
5 files changed
+22 -9

No files matched your search

@@ -34,21 +34,13 @@ final class RenderGLView: NSOpenGLView {
RENDER_SHADER_MAIN_VS, RENDER_SHADER_MAIN_FS,
RENDER_SHADER_SHADOW_VS, RENDER_SHADER_SHADOW_FS,
RENDER_CONFIG)
loadModel()
//loadModel()
startTime = CACurrentMediaTime()
ready = true
renderSet(F.willPrepareGLContext, true)
}
private func loadModel() {
guard let resources = Bundle.main.resourceURL else { return }
let path = resources.appendingPathComponent("assets/cube.gltf").path
if FileManager.default.fileExists(atPath: path) {
sr_load_model(path)
}
}
override func reshape() {
super.reshape()
needsDisplay = true