Documentation / device
device
A thin wrapper for WebGL/WebGPU api.
Remarks
This library is a thin wrapper for WebGL/WebGPU api. It not only encapsulates the programming interface, but also provides a unified way to write shaders and automatically generate shader code for the current platform.
Enumerations
Classes
- Proxiable
- PBShaderExp
- ProgramBuilder
- PBScope
- PBLocalScope
- PBBuiltinScope
- PBInputScope
- PBOutputScope
- PBGlobalScope
- PBInsideFunctionScope
- PBFunctionScope
- PBWhileScope
- PBDoWhileScope
- PBForScope
- PBNakedScope
- PBIfScope
- PBReflection
- PBTypeInfo
- PBVoidTypeInfo
- PBAnyTypeInfo
- PBPrimitiveTypeInfo
- PBStructTypeInfo
- PBArrayTypeInfo
- PBPointerTypeInfo
- PBAtomicI32TypeInfo
- PBAtomicU32TypeInfo
- PBSamplerTypeInfo
- PBTextureTypeInfo
- PBFunctionTypeInfo
- BaseDevice
- DrawText
- Font
- GlyphManager
- TextureAtlasManager
- Pool
- CPUTimer
- StructuredBufferData
- VertexData
Interfaces
- FrameInfo
- TimestampQueryOptions
- TimestampQueryResult
- TimestampQueryFilter
- GPUObjectList
- DeviceCaps
- FramebufferCaps
- MiscCaps
- ShaderCaps
- TextureFormatInfo
- TextureCaps
- RenderProgramConstructParams
- ComputeProgramConstructParams
- GPUProgramConstructParams
- DeviceOptions
- DrawTextLayoutOptions
- AbstractDevice
- ShaderExpTagRecord
- PBRenderOptions
- PBComputeOptions
- PrimitiveTypeDetail
- StructTypeDetail
- ArrayTypeDetail
- PointerTypeDetail
- AtomicTypeInfoDetail
- SamplerTypeDetail
- TextureTypeDetail
- FunctionTypeDetail
- DeviceBackend
- BaseCreationOptions
- TextureCreationOptions
- BufferCreationOptions
- TextureMipmapLevelData
- TextureMipmapData
- FrameBufferTextureAttachment
- FrameBufferOptions
- UniformBufferLayout
- UniformLayout
- BufferBindingLayout
- SamplerBindingLayout
- TextureBindingLayout
- StorageTextureBindingLayout
- ExternalTextureBindingLayout
- BindGroupLayoutEntry
- BindGroupLayout
- BindPointInfo
- SamplerOptions
- GPUObject
- TextureSampler
- BaseTexture
- Texture2D
- Texture2DArray
- Texture3D
- TextureCube
- TextureVideo
- GPUDataBuffer
- IndexBuffer
- StructuredBuffer
- VertexLayout
- FrameBuffer
- GPUProgram
- BindGroup
- AtlasInfo
- ColorState
- BlendingState
- RasterizerState
- DepthState
- StencilState
- RenderStateSet
- ITimer
Type Aliases
- WebGLContext
- FrameBufferClearColors
- TextureType
- CompareFunc
- TextureAddressMode
- TextureFilterMode
- DataType
- TextureFormat
- PrimitiveType
- ShaderKind
- TimestampQueryStatus
- TimestampQueryHandle
- DeviceEventMap
- DeviceViewport
- TextHorizontalAlignment
- TextVerticalAlignment
- ShaderExpTagValue
- ShaderTypeFunc
- ExpValueNonArrayType
- ExpValueType
- PBReflectionTagGetter
- PBStructLayout
- TypeDetailInfo
- TextureImageElement
- VertexAttribFormat
- VertexSemantic
- VertexLayoutOptions
- TextureColorSpace
- BufferUsage
- VertexStepMode
- StructuredValue
- RenderBundle
- BlendEquation
- BlendFunc
- FaceMode
- FaceWinding
- StencilOp
- VertexBufferInfo
Variables
- MAX_VERTEX_ATTRIBUTES
- MAX_BINDING_GROUPS
- MAX_TEXCOORD_INDEX_COUNT
- VERTEX_ATTRIB_POSITION
- VERTEX_ATTRIB_NORMAL
- VERTEX_ATTRIB_DIFFUSE
- VERTEX_ATTRIB_TANGENT
- VERTEX_ATTRIB_TEXCOORD0
- VERTEX_ATTRIB_TEXCOORD1
- VERTEX_ATTRIB_TEXCOORD2
- VERTEX_ATTRIB_TEXCOORD3
- VERTEX_ATTRIB_TEXCOORD4
- VERTEX_ATTRIB_TEXCOORD5
- VERTEX_ATTRIB_TEXCOORD6
- VERTEX_ATTRIB_TEXCOORD7
- VERTEX_ATTRIB_BLEND_WEIGHT
- VERTEX_ATTRIB_BLEND_INDICES
- semanticList
Functions
- linearTextureFormatToSRGB
- hasAlphaChannel
- hasRedChannel
- hasGreenChannel
- hasBlueChannel
- hasDepthChannel
- hasStencilChannel
- isFloatTextureFormat
- isIntegerTextureFormat
- isSignedTextureFormat
- isCompressedTextureFormat
- isSRGBTextureFormat
- getTextureFormatBlockSize
- getTextureFormatBlockWidth
- getTextureFormatBlockHeight
- getVertexAttribByName
- getVertexAttribName
- matchVertexBuffer
- getVertexAttributeFormat
- getVertexAttributeIndex
- getVertexFormatSize
- getVertexFormatComponentCount
- getVertexAttribFormat
- getVertexBufferLength
- getVertexBufferStride
- getVertexBufferAttribTypeBySemantic
- getVertexBufferAttribType
- makeVertexBufferType
- genDefaultName