Namespace: WebGL
Rendering.WebGL
Classes
Type Definitions
InkLayerOptions
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
width | int | Layer width, required when user defined framebuffer or renderbuffer properties are not available or specific texture size is desired | ||
height | int | Layer height, required when user defined Framebuffer or Renderbuffer properties are not available or specific texture size is desired | ||
scaleFactor | float | <optional> | 1 | Layer is scaled |
flipY | boolean | <optional> | false | |
useBuffersStorage | boolean | <optional> | false | Used for auto allocated gl resources, by default allocates WebGLTextureWhen is true WebGLTexture is allocated else WebGLFramebuffer and WebGLRenderbuffer are allocated.Memory managment will be handled automatically.Applicable only when own resource is not available. |
framebuffer | WebGLFramebuffer | <optional> | User defined framebuffer. When Renderbuffer not available it should be attached to the framebuffer.When attachment is not available or attachment is not renderbuffer exception is thrown. Renderbuffer dimensions used for layer creation. | |
renderbuffer | WebGLRenderbuffer | <optional> | User defined renderbuffer, Renderbuffer dimensions used for layer creation. | |
texture | WebGLTexture | <optional> | User defined texture,width and height not required when desired size matches image size and image is attached to the texture (fillTexture attaches image) | |
ownGlResources | boolean | <optional> | false | When own resource is attached, this property should be true.Memory managment will not be handled automatically, layer will free the GL resources when deallocated.Applicable only when own resource is available. |
WebGLContextAttributes
Defines WebGL context attributes
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
alpha | boolean | <optional> | true | Boolean that indicates if the canvas contains an alpha buffer. |
antialias | boolean | <optional> | true | Boolean that indicates whether or not to perform anti-aliasing. |
depth | boolean | <optional> | true | Boolean that indicates whether or not to perform anti-aliasing. |
desynchronized | boolean | <optional> | false | Boolean that hints the user agent to reduce the latency by desynchronizing the canvas paint cycle from the event loop. |
failIfMajorPerformanceCaveat | boolean | <optional> | false | Boolean that indicates if a context will be created if the system performance is low or if no hardware GPU is available. |
powerPreference | string | <optional> | "default" | A hint to the user agent indicating what configuration of GPU is suitable for the WebGL context. Possible values are: |
"default": Let the user agent decide which GPU configuration is most suitable. This is the default value. "high-performance": Prioritizes rendering performance over power consumption. "low-power": Prioritizes power saving over rendering performance. | ||||
premultipliedAlpha | boolean | <optional> | true | Boolean that indicates that the page compositor will assume the drawing buffer contains colors with pre-multiplied alpha. |
preserveDrawingBuffer | boolean | <optional> | false | If the value is true the buffers will not be cleared and will preserve their values until cleared or overwritten by the author. |
stencil | boolean | <optional> | false | Boolean that indicates that the drawing buffer has a stencil buffer of at least 8 bits. |