ColorBufferWebGL

class ColorBufferWebGL(val context: WebGL2RenderingContext, val target: GLenum, textureObject: WebGLTexture?, val width: Int, val height: Int, val contentScale: Double, val format: ColorFormat, val type: ColorType, val levels: Int, val multisample: BufferMultisample, val session: Session?, val renderbuffer: WebGLRenderbuffer? = null) : ColorBuffer(source)

A color buffer of the WebGL back-end. WebGL 2 has no multisampled textures, multisampled color buffers are stored in a multisampled renderbuffer: they can be attached to render targets and copied with copyTo, which resolves them, but not be sampled, written, read or mipmapped, like multisampled color buffers of the GL3 back-end.

Constructors

Link copied to clipboard
constructor(context: WebGL2RenderingContext, target: GLenum, textureObject: WebGLTexture?, width: Int, height: Int, contentScale: Double, format: ColorFormat, type: ColorType, levels: Int, multisample: BufferMultisample, session: Session?, renderbuffer: WebGLRenderbuffer? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override var anisotropy: Double
Link copied to clipboard
Link copied to clipboard
open override val contentScale: Double
Link copied to clipboard
val context: WebGL2RenderingContext
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override var flipV: Boolean
Link copied to clipboard
open override val format: ColorFormat
Link copied to clipboard
open override val height: Int
Link copied to clipboard
open override val levels: Int
Link copied to clipboard
open override val multisample: BufferMultisample
Link copied to clipboard
val renderbuffer: WebGLRenderbuffer?

the storage of a multisampled color buffer

Link copied to clipboard
open override val session: Session?
Link copied to clipboard
val target: GLenum
Link copied to clipboard
val texture: WebGLTexture

The texture of a single sampled color buffer

Link copied to clipboard
open override val type: ColorType
Link copied to clipboard
open override val width: Int
Link copied to clipboard
open override var wrapU: WrapMode
Link copied to clipboard
open override var wrapV: WrapMode

Functions

Link copied to clipboard
fun bind(unit: Int)
Link copied to clipboard
Link copied to clipboard
open override fun close()
Link copied to clipboard
open override fun copyTo(target: ArrayTexture, layer: Int, fromLevel: Int, toLevel: Int)
open override fun copyTo(target: ColorBuffer, fromLevel: Int, toLevel: Int, filter: MagnifyingFilter)

open override fun copyTo(target: ColorBuffer, fromLevel: Int, toLevel: Int, sourceRectangle: IntRectangle, targetRectangle: IntRectangle, filter: MagnifyingFilter)

Copies sourceRectangle of level fromLevel to targetRectangle of level toLevel of target, like the GL3 back-end under OpenGL ES: unscaled copies between single sampled color buffers of the same format and type use copyTexSubImage2D, other unscaled copies that WebGL can blit are blitted, everything else is drawn, which scales with filter and converts between sRGB and linear, fixed and floating point formats, and to multisampled color buffers.

Link copied to clipboard
open override fun destroy()
Link copied to clipboard
open override fun fill(color: ColorRGBa, level: Int)
Link copied to clipboard
open override fun filter(filterMin: MinifyingFilter, filterMag: MagnifyingFilter)
Link copied to clipboard
open override fun generateMipmaps()
Link copied to clipboard
open override fun read(target: ArrayBufferView<ArrayBufferLike>, x: Int, y: Int, width: Int, height: Int, level: Int)
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open override fun write(source: TexImageSource, x: Int, y: Int, width: Int, height: Int, level: Int)
open override fun write(source: ArrayBufferView<ArrayBufferLike>, sourceFormat: ColorFormat, sourceType: ColorType, x: Int, y: Int, width: Int, height: Int, level: Int)
open override fun write(sourceBuffer: MPPBuffer, sourceFormat: ColorFormat, sourceType: ColorType, x: Int, y: Int, width: Int, height: Int, level: Int)