Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing geometry buffer type on the fly #85

Closed
vorg opened this issue Aug 20, 2018 · 2 comments
Closed

Changing geometry buffer type on the fly #85

vorg opened this issue Aug 20, 2018 · 2 comments
Milestone

Comments

@vorg
Copy link
Member

vorg commented Aug 20, 2018

We initialize geometry component with a cube that defaults to Uint16 index buffer. Updating geometry with high poly mesh and switching to Uint32 index buffer (or from 32 to 16) crashes as we try to update buffer assuming old type.

We need to detect the change of type and recreate the buffer.

Maybe geometry should auto-guess based in positions length? Or always switch to Uint32 if available?

Related Invalid index buffer type

@vorg
Copy link
Member Author

vorg commented Aug 20, 2018

That's actually problem with any attribute. Eg. we initialize geometry with cube that has texCoords and then we want to render something without we will get wrong attribute for texCoords as they will not be updated.

@vorg
Copy link
Member Author

vorg commented Aug 20, 2018

The bigger issue / pattern is how to distinguish between updating geometry and replacing geometry (with potentially different attribute set)

@dmnsgn dmnsgn added type/feat A new feature and removed enhancement labels Jul 5, 2022
@dmnsgn dmnsgn added this to the 4.0.0 milestone Oct 19, 2022
@vorg vorg closed this as not planned Won't fix, can't repro, duplicate, stale Sep 1, 2023
@github-project-automation github-project-automation bot moved this to Done in 4.0.0 Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

2 participants