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

WebGL2RenderingContext»texSubImage3D page: List of valid "format" parameter values does not match WebGL2 spec #19610

Open
JohnGrime opened this issue Aug 16, 2022 · 0 comments
Labels
area: WebGL Content:WebAPI Web API docs help wanted If you know something about this topic, we would love your help!

Comments

@JohnGrime
Copy link

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/WebGL2RenderingContext/texSubImage3D

What specific section or headline is this issue about?

Parameters

What information was incorrect, unhelpful, or incomplete?

The "Parameters" section of the WebGL2RenderingContext.texSubImage3D() documentation appears to list values that do not agree with the documentation provided by Khronos. They also do not seem to agree with the values linked via the "WebGL 2.0 Specification 3.7.6" link under the "Specifications" section.

For example, Tables 1 & 2 of the glTexImage3D() method (indicated as the authoritative source of information regarding the legal combinations of the format and type parameters for WebGL2's texSubImage3D() method) include format values of e.g. GL_RED and GL_RED_INTEGER that are not listed in the MDN documentation for this method.

Furthermore, the MDN documentation claims that gl.R8, gl.R16F, gl.R32F etc are valid format parameters - but these values are not listed as valid format parameters by Khronos. Indeed, trying to use gl.R8 as a format parameter with a type parameter of gl.UNSIGNED_BYTE and uint8 source data produced the following error in Chrome:

WebGL: INVALID_ENUM: texSubImage3D: invalid format

... but using gl.RED_INTEGER (as per the Khronos specifications) fixed that error message.

What did you expect to see?

Values for format that agree with the Khronos documentation for this method.

Do you have any supporting links, references, or citations?

Khronos documentation for texSubImage3D : https://registry.khronos.org/webgl/specs/latest/2.0/#3.7.6

The documentation above links to the Khronos documentation for Tables 1 & 2 of the glTexImage3D() documentation:

https://registry.khronos.org/OpenGL-Refpages/es3.0/html/glTexImage3D.xhtml

These tables contain the "valid" values (and their combinations) for the format and type parameters of texSubImage3D().

Do you have anything more you want to share?

No response

MDN metadata

Page report details
@github-actions github-actions bot added Content:WebAPI Web API docs needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. and removed Content:WebAPI Web API docs labels Aug 16, 2022
@Josh-Cena Josh-Cena added the Content:WebAPI Web API docs label Aug 16, 2022
@sideshowbarker sideshowbarker added help wanted If you know something about this topic, we would love your help! and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Aug 16, 2022
@sideshowbarker sideshowbarker changed the title Problem with specified "format" parameter values WebGL2RenderingContext»texSubImage3D page: List of valid "format" parameter values does not match WebGL2 spec Aug 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: WebGL Content:WebAPI Web API docs help wanted If you know something about this topic, we would love your help!
Projects
None yet
Development

No branches or pull requests

3 participants