However, the WebGL 1.0 specification describes no such form, and use of this form throws the following error in Chrome:
Failed to execute 'compressedTexImage2D' on 'WebGLRenderingContext': 7 arguments required, but only 6 present.
In Safari:
no version of function 'compressedTexImage2D' takes 6 arguments
What did you expect to see?
This line should be removed.
I don't know if there's a way to allocate a compressed mip level without providing data. If there is, it would be great to know what that is. If not, it should be noted here that this works differently than texImage2D for uncompressed data.
Do you have any supporting links, references, or citations?
Note that the analogous entry for texImage2D has a question mark on the pixels argument, as if to imply that it's optional.
Do you have anything more you want to share?
For context, I'm trying to meet the texture completeness requirement for a cube map that does not provide all levels. WebGL 2 supports min and max mip level values, but WebGL 1 does not, so I have to define all the levels individually.
MDN URL
https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/compressedTexImage2D
What specific section or headline is this issue about?
Syntax
What information was incorrect, unhelpful, or incomplete?
This document claims that the following form is acceptable:
However, the WebGL 1.0 specification describes no such form, and use of this form throws the following error in Chrome:
In Safari:
What did you expect to see?
This line should be removed.
I don't know if there's a way to allocate a compressed mip level without providing data. If there is, it would be great to know what that is. If not, it should be noted here that this works differently than
texImage2D
for uncompressed data.Do you have any supporting links, references, or citations?
WebGL 1.0 specification
Note that the analogous entry for
texImage2D
has a question mark on thepixels
argument, as if to imply that it's optional.Do you have anything more you want to share?
For context, I'm trying to meet the texture completeness requirement for a cube map that does not provide all levels. WebGL 2 supports min and max mip level values, but WebGL 1 does not, so I have to define all the levels individually.
See: https://www.khronos.org/opengl/wiki/Texture#Texture_completeness
MDN metadata
Page report details
* Folder: `en-us/web/api/webglrenderingcontext/compressedteximage2d` * MDN URL: https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/compressedTexImage2D * GitHub URL: https://github.com/mdn/content/blob/main/files/en-us/web/api/webglrenderingcontext/compressedteximage2d/index.md * Last commit: https://github.com/mdn/content/commit/acfe8c9f1f4145f77653a2bc64a9744b001358dc * Document last modified: 2023-07-07T07:19:19.000Z