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
WebGL1 doesn't have the ability to get data from a buffer on the GPU. Therefore, the index buffer must be stored in CPU memory to compute new indices for the wireframe. However, this is unideal for users who won't ever use debugWireframe for their purposes.
There are two possible solutions:
Find a way to store the index buffer's resource loader, and load the index buffer originally on the GPU. If debugWireframe is enabled, then reload this resource as a typed array.
a. This might complicated to figure out, but it could be possible. Could we store the index resource loader separately from the others in GltfLoader?
b. This would also only involve changes to the loading system; there'd be no changes to the public API.
Add a debug option or flag to ModelExperimental that the user must specify before the model is loaded. If this flag is true, then load the index buffer as a typed array.
a. This would simplify the loading logic. It may also be expandable if other debug options need this in the future (though I'm not sure what those would be?)
b. This would involve changes to the API for both models and tilesets. It also may not be intuitive that having debug: true is necessary for debugWireframe to work, but not for debugShowBoundingVolume.
The text was updated successfully, but these errors were encountered:
Solution 1 is complicated because we might need to reload the entire glTF if the index buffer was embedded in the glTF.
I prefer option 2. Maybe it's ok if the name is something specific like enableDebugWireframe. Really it's all about the documentation being super clear about what's going on.
I think I like the more specific enableDebugWireframe since debug: true would be confusing.
My only concern is if we need to do other things like this in the future, what's the cleanest convention for the parameters? ModelExperimental/Cesium3DTileset already have a huge number of parameters as it is.
This came up with #10332 being merged.
WebGL1 doesn't have the ability to get data from a buffer on the GPU. Therefore, the index buffer must be stored in CPU memory to compute new indices for the wireframe. However, this is unideal for users who won't ever use
debugWireframe
for their purposes.There are two possible solutions:
debugWireframe
is enabled, then reload this resource as a typed array.a. This might complicated to figure out, but it could be possible. Could we store the index resource loader separately from the others in
GltfLoader
?b. This would also only involve changes to the loading system; there'd be no changes to the public API.
debug
option or flag toModelExperimental
that the user must specify before the model is loaded. If this flag is true, then load the index buffer as a typed array.a. This would simplify the loading logic. It may also be expandable if other debug options need this in the future (though I'm not sure what those would be?)
b. This would involve changes to the API for both models and tilesets. It also may not be intuitive that having
debug: true
is necessary fordebugWireframe
to work, but not fordebugShowBoundingVolume
.The text was updated successfully, but these errors were encountered: