You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For all other attributes that needs to be a runtime check, like in this case if (texCoordAccessor.bufferViewIndex.has_value()) to just skip the VAO 1 setting.
The per mesh glVertexArrayElementBuffer at the end must still be done unconditionally or OpenGL will complain about an invalid input data types.
The text was updated successfully, but these errors were encountered:
The check is whether the UV accessor has a buffer view associated with it. The example doesn't support sparse accessors at all currently. but I guess I could fix that fairly quickly by refactoring the code to use fastgltf::copyFromAccessor into some GL buffer. However, I wanted to keep the example fairly simple, so currently it just doesn't support sparse accessors and I honestly don't feel like completely refactoring how the example works for adding sparse accessor support. I'll leave this open as a reminder though.
spnda
changed the title
gl_viewer skips glVertexArrayElementBuffer setting for primitives without texture coordinates
gl_viewer skips primitive morph targets
Dec 11, 2023
Follow-up to #36
Using
continue
when the accessor has no buffer view index for TEXCOORD_0 is incorrect.https://github.com/spnda/fastgltf/blob/main/examples/gl_viewer/gl_viewer.cpp#L423
The
continue
only works for the position attribute because that is strictly required.For all other attributes that needs to be a runtime check, like in this case
if (texCoordAccessor.bufferViewIndex.has_value())
to just skip the VAO 1 setting.The per mesh glVertexArrayElementBuffer at the end must still be done unconditionally or OpenGL will complain about an invalid input data types.
The text was updated successfully, but these errors were encountered: