Skip to content

Commit d2497ac

Browse files
charlieforward9ibgreen
authored andcommitted
fix: add WebGLContextProps.stencil
Found in visgl/hubble.gl#285 (comment)
1 parent bcbdf33 commit d2497ac

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

modules/core/src/adapter/device.ts

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -291,14 +291,24 @@ export type DeviceProps = {
291291

292292
/** WebGL independent copy of WebGLContextAttributes */
293293
type WebGLContextProps = {
294-
alpha?: boolean; // indicates if the canvas contains an alpha buffer.
295-
desynchronized?: boolean; // hints the user agent to reduce the latency by desynchronizing the canvas paint cycle from the event loop
296-
antialias?: boolean; // indicates whether or not to perform anti-aliasing.
297-
depth?: boolean; // indicates that the drawing buffer has a depth buffer of at least 16 bits.
298-
failIfMajorPerformanceCaveat?: boolean; // indicates if a context will be created if the system performance is low or if no hardware GPU is available.
294+
/** indicates if the canvas contains an alpha buffer. */
295+
alpha?: boolean;
296+
/** hints the user agent to reduce the latency by desynchronizing the canvas paint cycle from the event loop */
297+
desynchronized?: boolean;
298+
/** indicates whether or not to perform anti-aliasing. */
299+
antialias?: boolean;
300+
/** indicates that the render target has a stencil buffer of at least `8` bits. */
301+
stencil?: boolean;
302+
/** indicates that the drawing buffer has a depth buffer of at least 16 bits. */
303+
depth?: boolean;
304+
/** indicates if a context will be created if the system performance is low or if no hardware GPU is available. */
305+
failIfMajorPerformanceCaveat?: boolean;
306+
/** Selects GPU */
299307
powerPreference?: 'default' | 'high-performance' | 'low-power';
300-
premultipliedAlpha?: boolean; // page compositor will assume the drawing buffer contains colors with pre-multiplied alpha.
301-
preserveDrawingBuffer?: boolean; // buffers will not be cleared and will preserve their values until cleared or overwritten by the author.
308+
/** page compositor will assume the drawing buffer contains colors with pre-multiplied alpha. */
309+
premultipliedAlpha?: boolean;
310+
/** buffers will not be cleared and will preserve their values until cleared or overwritten by the author. */
311+
preserveDrawingBuffer?: boolean;
302312
};
303313

304314
/**

0 commit comments

Comments
 (0)