warrenm / GLTFKit2

A glTF 2.0 asset loader and exporter for Objective-C and Swift.
MIT License
150 stars 26 forks source link

GLB models are having no textures and solid colours #15

Closed JGVB closed 2 years ago

JGVB commented 2 years ago

The sample project works fine, but when the source code is imported into my project, this is the result. It happens for all glbs that I have tested so far.

Screenshot 2022-02-23 at 15 55 54

Any ideas as to why?

warrenm commented 2 years ago

Nope. If you can attach a complete project that manifests this issue, I'll try to investigate.

JGVB commented 2 years ago

I extracted the code from my project related to displaying this 3d and put it into a new project (along with your source code)....and it worked. Seems like it's something with my project settings? My work is cut out!

JGVB commented 2 years ago

I had the pod GLTFSceneKit in my project. Though removing it did not fix the issue, I'm wondering if this is causing some conflict.

JGVB commented 2 years ago

The issue was PrefersOpenGL = true in plist. Removing this (usign Metal) fixed it

warrenm commented 2 years ago

Good to know; thanks for following up.