dbg
This commit is contained in:
1 parent
813490c0ea
commit
4f40b509f6
1 file changed
+8
-1
@@ -45,22 +45,29 @@ final class RenderGLView: NSOpenGLView {
|
|||||||
var paths: [String] = []
|
var paths: [String] = []
|
||||||
|
|
||||||
if let resources = Bundle.main.resourceURL {
|
if let resources = Bundle.main.resourceURL {
|
||||||
|
print("ИГР RenderGV.loadM-1 resources: '\(resources.path)'")
|
||||||
paths.append(resources.appendingPathComponent("assets/cube.gltf").path)
|
paths.append(resources.appendingPathComponent("assets/cube.gltf").path)
|
||||||
}
|
}
|
||||||
|
|
||||||
let cwd = FileManager.default.currentDirectoryPath
|
let cwd = FileManager.default.currentDirectoryPath
|
||||||
paths.append("\(cwd)/assets/cube.gltf")
|
paths.append("\(cwd)/assets/cube.gltf")
|
||||||
|
print("ИГР RenderGV.loadM-2 cwd: '\(cwd)'")
|
||||||
|
|
||||||
if let exe = Bundle.main.executableURL {
|
if let exe = Bundle.main.executableURL {
|
||||||
let dir = exe.deletingLastPathComponent()
|
let dir = exe.deletingLastPathComponent()
|
||||||
|
print("ИГР RenderGV.loadM-2 exedir: '\(dir)'")
|
||||||
paths.append(dir.appendingPathComponent("assets/cube.gltf").path)
|
paths.append(dir.appendingPathComponent("assets/cube.gltf").path)
|
||||||
}
|
}
|
||||||
|
|
||||||
for path in paths where FileManager.default.fileExists(atPath: path) {
|
for path in paths {
|
||||||
|
print("ИГР RenderGV.loadM-10 path: '\(path)'")
|
||||||
|
if FileManager.default.fileExists(atPath: path) {
|
||||||
|
print("ИГР RenderGV.loadM-11 load")
|
||||||
sr_load_model(path)
|
sr_load_model(path)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override func reshape() {
|
override func reshape() {
|
||||||
super.reshape()
|
super.reshape()
|
||||||
|
|||||||
Reference in new issue
Block a user