@Generated(value="org.realityforge.webtack")
@JsType(isNative=true,
namespace="<global>",
name="WebGLContextAttributes")
public interface WebGLContextAttributes
WebGLRenderingContext or WebGL2RenderingContext created.| Modifier and Type | Interface and Description |
|---|---|
static interface |
WebGLContextAttributes.Builder
Attributes that control the characteristics of the
WebGLRenderingContext or WebGL2RenderingContext created. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
alpha()
A flag that that hints that the user agent to reduce the latency by desynchronizing the canvas paint cycle from the event loop.
|
boolean |
antialias()
A flag that indicates whether or not to perform anti-aliasing.
|
static WebGLContextAttributes.Builder |
create() |
boolean |
depth()
A flag that indicates that the drawing buffer has a depth buffer of at least 16 bits.
|
boolean |
desynchronized()
A flag that indicates if the canvas contains an alpha buffer.
|
boolean |
failIfMajorPerformanceCaveat()
A flag that indicates if a context will be created if the system performance is low or if no hardware GPU is available.
|
java.lang.String |
powerPreference()
A hint to the user agent indicating what configuration of GPU is suitable for the WebGL context.
|
boolean |
premultipliedAlpha()
A flag that indicates that the page compositor will assume the drawing buffer contains colors with pre-multiplied alpha.
|
boolean |
preserveDrawingBuffer()
A flag that controls whether the buffers will not be cleared and will preserve their values until cleared or overwritten by the author.
|
void |
setAlpha(boolean alpha)
A flag that that hints that the user agent to reduce the latency by desynchronizing the canvas paint cycle from the event loop.
|
void |
setAntialias(boolean antialias)
A flag that indicates whether or not to perform anti-aliasing.
|
void |
setDepth(boolean depth)
A flag that indicates that the drawing buffer has a depth buffer of at least 16 bits.
|
void |
setDesynchronized(boolean desynchronized)
A flag that indicates if the canvas contains an alpha buffer.
|
void |
setFailIfMajorPerformanceCaveat(boolean failIfMajorPerformanceCaveat)
A flag that indicates if a context will be created if the system performance is low or if no hardware GPU is available.
|
void |
setPowerPreference(java.lang.String powerPreference)
A hint to the user agent indicating what configuration of GPU is suitable for the WebGL context.
|
void |
setPremultipliedAlpha(boolean premultipliedAlpha)
A flag that indicates that the page compositor will assume the drawing buffer contains colors with pre-multiplied alpha.
|
void |
setPreserveDrawingBuffer(boolean preserveDrawingBuffer)
A flag that controls whether the buffers will not be cleared and will preserve their values until cleared or overwritten by the author.
|
void |
setStencil(boolean stencil)
A flag that indicates that the drawing buffer has a stencil buffer of at least 8 bits.
|
void |
setXrCompatible(boolean xrCompatible) |
boolean |
stencil()
A flag that indicates that the drawing buffer has a stencil buffer of at least 8 bits.
|
boolean |
xrCompatible() |
@JsOverlay @Nonnull static WebGLContextAttributes.Builder create()
@JsProperty(name="alpha") boolean alpha()
@JsProperty void setAlpha(boolean alpha)
@JsProperty(name="antialias") boolean antialias()
@JsProperty void setAntialias(boolean antialias)
@JsProperty(name="depth") boolean depth()
@JsProperty void setDepth(boolean depth)
@JsProperty(name="desynchronized") boolean desynchronized()
@JsProperty void setDesynchronized(boolean desynchronized)
@JsProperty(name="failIfMajorPerformanceCaveat") boolean failIfMajorPerformanceCaveat()
@JsProperty void setFailIfMajorPerformanceCaveat(boolean failIfMajorPerformanceCaveat)
@JsProperty(name="powerPreference") @WebGLPowerPreference java.lang.String powerPreference()
@JsProperty void setPowerPreference(@WebGLPowerPreference @Nonnull java.lang.String powerPreference)
@JsProperty(name="premultipliedAlpha") boolean premultipliedAlpha()
@JsProperty void setPremultipliedAlpha(boolean premultipliedAlpha)
@JsProperty(name="preserveDrawingBuffer") boolean preserveDrawingBuffer()
@JsProperty void setPreserveDrawingBuffer(boolean preserveDrawingBuffer)
@JsProperty(name="stencil") boolean stencil()
@JsProperty void setStencil(boolean stencil)
@JsProperty(name="xrCompatible") boolean xrCompatible()
@JsProperty void setXrCompatible(boolean xrCompatible)