Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Field ¶
type Field struct { // Name is the name of the field in the Go struct. Name string // Offset is the offset (in bytes) of the field in the Go struct. Offset uintptr // WGSLType is the corresponding WGSL type to use. WGSLType Type }
A Field provides information about a particular field in a Go struct.
type Struct ¶
type Struct struct { // Name is the name of the struct as it appears in Go. Name string // Size of the structure, in bytes. Size int // Fields is a slice of the struct's fields, in declaration order. Fields []string // FieldMap maps field names to Fields. FieldMap map[string]Field }
A Struct provides information about a Go struct.
func MustNewStruct ¶
func (*Struct) MustOffsetOf ¶
MustOffsetOf returns the offset of the specified field. Panics if the field is not found.
type Type ¶
type Type struct { // Name of the WGSL type. Name TypeName // Alignment of the WGSL type (see https://www.w3.org/TR/WGSL/#alignof). AlignOf int // Size if the WGSL type (see https://www.w3.org/TR/WGSL/#sizeof). SizeOf int }
Click to show internal directories.
Click to hide internal directories.