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

32-bit vertex indices #5

Open
ggerganov opened this issue Jul 1, 2019 · 7 comments
Open

32-bit vertex indices #5

ggerganov opened this issue Jul 1, 2019 · 7 comments
Labels
enhancement New feature or request

Comments

@ggerganov
Copy link
Owner

Can this be achieved? Seems like WebGL only support 16-bit integer indices.

@Eragon-Brisingr
Copy link

ImDrawList: Support for large meshes (64k+ vertices) with 16-bits indices
I am a game developer, imgui-ws can not draw large meshes, do you plan to support it ?

@ggerganov
Copy link
Owner Author

Thanks for the link. This will be supported, but I cannot provide ETA at the moment.

@ggerganov ggerganov added the enhancement New feature or request label May 8, 2022
@ggerganov
Copy link
Owner Author

ggerganov commented May 28, 2022

It seems in order to support large meshes with 16-bit indices, you need the OpenGL renderer to support the glDrawElementsBaseVertex() function:

ocornut/imgui@b3dd03f#diff-55777f445e451bfff7805abb611c00b44c025149fae791c7d1a1535818788c5fR107-R113

Currently, it seems to not be supported by WebGL, so not sure if we can do anything at the moment

@Eragon-Brisingr
Copy link

You mean is WebGL not support this feature? I am sorry to know less about WebGL.

ggerganov added a commit that referenced this issue May 28, 2022
Your browser must support the "OES_element_index_uint" extension
@ggerganov
Copy link
Owner Author

It turns out that some browsers actually support 32-bit vertex indices, so I just created a branch that uses this:

#23

See https://computergraphics.stackexchange.com/questions/3637/how-to-use-32-bit-integers-for-element-indices-in-webgl-1-0 for more information.

@Eragon-Brisingr You can give it a try and see if it works for you. See instructions in the PR

@Eragon-Brisingr
Copy link

Thank you, I will try it~

@Eragon-Brisingr
Copy link

OES_element_index_uint work very good. Seem Browser compatibility is full support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants