Documentation
¶
Index ¶
- func AddressModeToJS(m gputypes.AddressMode) string
- func BlendFactorToJS(f gputypes.BlendFactor) string
- func BlendOperationToJS(op gputypes.BlendOperation) string
- func BufferBindingTypeToJS(t gputypes.BufferBindingType) string
- func CompareFunctionToJS(f gputypes.CompareFunction) string
- func CompositeAlphaModeToJS(mode gputypes.CompositeAlphaMode) string
- func CullModeToJS(m gputypes.CullMode) string
- func FilterModeToJS(m gputypes.FilterMode) string
- func FrontFaceToJS(f gputypes.FrontFace) string
- func IndexFormatToJS(f gputypes.IndexFormat) string
- func LoadOpToJS(op gputypes.LoadOp) string
- func PresentModeToJS(mode gputypes.PresentMode) string
- func PrimitiveTopologyToJS(t gputypes.PrimitiveTopology) string
- func SamplerBindingTypeToJS(t gputypes.SamplerBindingType) string
- func StencilOperationToJS(op gputypes.StencilOperation) string
- func StorageTextureAccessToJS(a gputypes.StorageTextureAccess) string
- func StoreOpToJS(op gputypes.StoreOp) string
- func TextureAspectToJS(a gputypes.TextureAspect) string
- func TextureDimensionToJS(d gputypes.TextureDimension) string
- func TextureFormatFromJS(s string) gputypes.TextureFormat
- func TextureFormatToJS(f gputypes.TextureFormat) string
- func TextureSampleTypeToJS(t gputypes.TextureSampleType) string
- func TextureViewDimensionToJS(d gputypes.TextureViewDimension) string
- func VertexFormatToJS(f gputypes.VertexFormat) string
- func VertexStepModeToJS(m gputypes.VertexStepMode) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddressModeToJS ¶
func AddressModeToJS(m gputypes.AddressMode) string
AddressModeToJS converts a gputypes.AddressMode to JS string.
func BlendFactorToJS ¶
func BlendFactorToJS(f gputypes.BlendFactor) string
BlendFactorToJS converts a gputypes.BlendFactor to JS string.
func BlendOperationToJS ¶
func BlendOperationToJS(op gputypes.BlendOperation) string
BlendOperationToJS converts a gputypes.BlendOperation to JS string.
func BufferBindingTypeToJS ¶
func BufferBindingTypeToJS(t gputypes.BufferBindingType) string
BufferBindingTypeToJS converts a gputypes.BufferBindingType to JS string.
func CompareFunctionToJS ¶
func CompareFunctionToJS(f gputypes.CompareFunction) string
CompareFunctionToJS converts a gputypes.CompareFunction to JS string.
func CompositeAlphaModeToJS ¶
func CompositeAlphaModeToJS(mode gputypes.CompositeAlphaMode) string
CompositeAlphaModeToJS converts a gputypes.CompositeAlphaMode to the WebGPU JS canvas alpha mode string.
Browser WebGPU only supports "opaque" and "premultiplied". PostMultiplied and Inherit are not valid on the web (Rust wgpu panics on those). Auto and Opaque both map to "opaque".
See: https://www.w3.org/TR/webgpu/#enumdef-gpucanvasalphamode
func CullModeToJS ¶
CullModeToJS converts a gputypes.CullMode to JS string.
func FilterModeToJS ¶
func FilterModeToJS(m gputypes.FilterMode) string
FilterModeToJS converts a gputypes.FilterMode to JS string.
func FrontFaceToJS ¶
FrontFaceToJS converts a gputypes.FrontFace to JS string.
func IndexFormatToJS ¶
func IndexFormatToJS(f gputypes.IndexFormat) string
IndexFormatToJS converts a gputypes.IndexFormat to JS string.
func LoadOpToJS ¶
LoadOpToJS converts a gputypes.LoadOp to the WebGPU JS string. Returns "load" for LoadOpLoad, "clear" for LoadOpClear, and "load" as default.
func PresentModeToJS ¶
func PresentModeToJS(mode gputypes.PresentMode) string
PresentModeToJS converts a gputypes.PresentMode to the WebGPU JS present mode string.
Browser WebGPU does not expose present mode control; the browser always uses FIFO (VSync). Rust wgpu panics on Mailbox/Immediate on the web. We return "fifo" for all modes since the browser ignores it anyway.
func PrimitiveTopologyToJS ¶
func PrimitiveTopologyToJS(t gputypes.PrimitiveTopology) string
PrimitiveTopologyToJS converts a gputypes.PrimitiveTopology to JS string.
func SamplerBindingTypeToJS ¶
func SamplerBindingTypeToJS(t gputypes.SamplerBindingType) string
SamplerBindingTypeToJS converts a gputypes.SamplerBindingType to JS string.
func StencilOperationToJS ¶
func StencilOperationToJS(op gputypes.StencilOperation) string
StencilOperationToJS converts a gputypes.StencilOperation to JS string.
func StorageTextureAccessToJS ¶
func StorageTextureAccessToJS(a gputypes.StorageTextureAccess) string
StorageTextureAccessToJS converts a gputypes.StorageTextureAccess to JS string.
func StoreOpToJS ¶
StoreOpToJS converts a gputypes.StoreOp to the WebGPU JS string. Returns "store" for StoreOpStore, "discard" for StoreOpDiscard, and "store" as default.
func TextureAspectToJS ¶
func TextureAspectToJS(a gputypes.TextureAspect) string
TextureAspectToJS converts a gputypes.TextureAspect to JS string.
func TextureDimensionToJS ¶
func TextureDimensionToJS(d gputypes.TextureDimension) string
TextureDimensionToJS converts a gputypes.TextureDimension to the WebGPU JS string.
func TextureFormatFromJS ¶
func TextureFormatFromJS(s string) gputypes.TextureFormat
TextureFormatFromJS converts a WebGPU JS texture format string to the corresponding gputypes.TextureFormat. Returns TextureFormatUndefined if the string is not recognized.
This is the reverse of TextureFormatToJS and is needed for parsing the preferred canvas format returned by navigator.gpu.getPreferredCanvasFormat().
func TextureFormatToJS ¶
func TextureFormatToJS(f gputypes.TextureFormat) string
TextureFormatToJS converts a gputypes.TextureFormat to the WebGPU JS string. Returns "" for TextureFormatUndefined.
func TextureSampleTypeToJS ¶
func TextureSampleTypeToJS(t gputypes.TextureSampleType) string
TextureSampleTypeToJS converts a gputypes.TextureSampleType to JS string.
func TextureViewDimensionToJS ¶
func TextureViewDimensionToJS(d gputypes.TextureViewDimension) string
TextureViewDimensionToJS converts a gputypes.TextureViewDimension to JS string.
func VertexFormatToJS ¶
func VertexFormatToJS(f gputypes.VertexFormat) string
VertexFormatToJS converts a gputypes.VertexFormat to JS string.
func VertexStepModeToJS ¶
func VertexStepModeToJS(m gputypes.VertexStepMode) string
VertexStepModeToJS converts a gputypes.VertexStepMode to JS string.
Types ¶
This section is empty.