ID3D10InputLayout

반응형

정점은 여러가지 정보를 가진다.
기본적으로는 정점의 위치, 색상, 노말, 텍스쳐 좌표등이 그것이다.
이러한 정점 정보는 파이프라인의 첫번째 스테이지인 입력조립기(IA)스테이지로 입력된다.
렌더링 파이프라인의 입력조립기 스테이지는 개발자가 정의한 정점 구조체의 형식을
미리 알고 있어야 앞으로 파이프라인에 입력될 정점 데이터를 올바르게 해석할 수 있다.

장치에 정점의 형식을 알리는 방법은 정점에 대한 입력레이아웃 이라는 객체를 구성하고
이를 입력조립기 스테이지에 제공하는 것이다.
결국 입력레이아웃이란 입력조립기 스테이지가 입력데이터를 접근할 때에 사용하는 인터페이스이다.

정점구조체의 각 속성은 D3D10 _INPUT_ELEMENT_DESC구조체의 배열로 표현된다.

ID3D10InputLayout Interface

An input-layout interface accesses the input data for the input-assembler stage.

IUnknown
   ID3D10DeviceChild
      ID3D10InputLayout

This interface contains no additional methods.

This interface is created by calling ID3D10Device::CreateInputLayout; use ID3D10Device::IASetInputLayout to bind it to the graphics pipeline.

See Also

Core Interfaces


D3D10_INPUT_ELEMENT_DESC

A description of a single element for the input-assembler stage.

typedef struct D3D10_INPUT_ELEMENT_DESC {
    LPCSTR SemanticName;
    UINT SemanticIndex;
    DXGI_FORMAT Format;
    UINT InputSlot;
    UINT AlignedByteOffset;
    D3D10_INPUT_CLASSIFICATION InputSlotClass;
    UINT InstanceDataStepRate;
} D3D10_INPUT_ELEMENT_DESC;

Members

SemanticName
The HLSL semantic associated with this element in a shader input-signature.
SemanticIndex
The semantic index for the element. A semantic index modifies a semantic, with an integer index number. A semantic index is only needed in a case where there is more than one element with the same semantic. For example, a 4x4 matrix would have four components each with the semantic name matrix, however each of the four component would have different semantic indices (0, 1, 2, and 3).
Format
The data type of the element data. See DXGI_FORMAT.
InputSlot
An integer value that identifies the input-assembler (see input slot). Valid values are between 0 and 15, defined in D3D10.h.
AlignedByteOffset
Optional. Offset (in bytes) between each element. Use D3D10_APPEND_ALIGNED_ELEMENT for convenience to define the current element directly after the previous one, including any packing if necessary.
InputSlotClass
Identifies the input data class for a single input slot (see D3D10_INPUT_CLASSIFICATION).
InstanceDataStepRate
The number of instances to draw before stepping one unit forward in a vertex buffer filled with instance data. Can be any unsigned integer value (0 means do not step) when the slot class is D3D10_INPUT_PER_INSTANCE_DATA; must be 0 when the slot class is D3D10_INPUT_PER_VERTEX_DATA.

'Study > Directx 10' 카테고리의 다른 글

sprite 출력  (0) 2010.05.02
폰트 출력  (0) 2010.05.02
2d 점찍기  (0) 2010.05.02
dx10 사각형 그리기  (0) 2010.04.28
dx10 창생성  (0) 2010.04.21
TAGS.

Comments