VertexAttr
이 페이지에서

VertexAttr

인터페이스, 리플렉션 분류

One @location-attributed parameter of the module's @vertex entry point.

import type { VertexAttr } from 'typeshade'

시그니처, 설명, 예제는 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.

구문

interface VertexAttr {
readonly name: string;
readonly location: number;
readonly type: string;
readonly offset: number;
}

설명

Attributes are listed in the order the entry function declares its parameters, and offset comes from walking them in that order and rounding each one up to its own type’s std430 alignment. The layout follows the parameter order, so reordering the entry’s parameters changes every later attribute’s offset. type is the DSL type key (the string typeKey returns), the same spelling StructLayout.fields[].type uses.

인스턴스 속성

name읽기 전용 string
location읽기 전용 number
type읽기 전용 string
offset읽기 전용 number

함께 보기

소스

src/core/reflect.ts, 477행, 커밋 c66579bf 기준

이 페이지 편집 문제 보고