files/en-us/web/api/webgl2renderingcontext/texstorage3d/index.md
{{APIRef("WebGL")}}{{AvailableInWorkers}}
The texStorage3D() method of the {{domxref("WebGL2RenderingContext")}} of the WebGL API specifies all levels of three-dimensional texture storage.
texStorage3D(target, levels, internalformat, width, height, depth)
target
gl.TEXTURE_3D: A three-dimensional texture.gl.TEXTURE_2D_ARRAY: A two-dimensional array texture.levels
internalformat
width
height
depth
TEXTURE_2D_ARRAY.None ({{jsxref("undefined")}}).
gl.texStorage3D(gl.TEXTURE_3D, 1, gl.RGB8, 256, 256, 256);
{{Specifications}}
{{Compat}}