A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/drawingBufferColorSpace below:

WebGLRenderingContext: drawingBufferColorSpace property - Web APIs

WebGLRenderingContext: drawingBufferColorSpace property

Baseline 2024

Newly available

Note: This feature is available in Web Workers.

The WebGLRenderingContext.drawingBufferColorSpace property specifies the color space of the WebGL drawing buffer. Along with the default (srgb), the display-p3 color space can be used.

See WebGLRenderingContext.unpackColorSpace for specifying the color space for textures.

Value

This property can have the following values:

If an invalid value is specified, then the value of drawingBufferColorSpace will remain unchanged.

Examples Setting the drawing buffer color space to draw a Display P3 red
const canvas = document.getElementById("canvas");
const gl = canvas.getContext("webgl");
gl.drawingBufferColorSpace = "display-p3";
gl.clearColor(1, 0, 0, 1);
gl.clear(gl.COLOR_BUFFER_BIT);
Specifications Browser compatibility See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4