AssImp GLTF Embedded Texture questions

Started by dajack05, June 13, 2019, 15:08:19

Previous topic - Next topic

dajack05

Hey everyone!

So, I've got asset loading working, and AssImp has made my life so much better. That said, I'm trying to use GLTF, and I can't seem to wrap my head around the proper usage of embedded textures.

I understand that AssImp loads the texture from the glb file directly. And I get that when the filename is something like "*1" it means that it is an embedded texture.

Here's where I am stuck. I load a GLB, I recognize that it has an embedded texture and then I want to bind it to a GL Texture. Normally I'd use "glTexImage2D" but I need access to a ByteBuffer to pass it.

Am I missing something here? I know there are a whole host of aiGet* methods I am not super familiar with, but I'm at a loss here.

Thanks for the help!
-
Daniel Jackson

theVerySharpFlat

I encountered this issue as well. After going into the source code, I found these functions: https://github.com/LWJGL/lwjgl3/blob/c84766565202ba41b71e23ca45a8e84a7d4cb971/modules/lwjgl/assimp/src/generated/java/org/lwjgl/assimp/AIScene.java#L181-L190 which address my use case. I hope this helps someone!