고정 소수점 꼭지점 데이터 사용
업데이트: 2007년 11월
고정 소수점 꼭지점 데이터를 사용하면 하드웨어에서 변환 및 조명을 구현하지 않는 3D 그래픽 드라이버의 변환 및 조명 속도를 높일 수 있습니다. 일부 드라이버의 경우 고정 소수점 데이터 작업 시 한층 빠른 속도를 제공합니다. DeviceCaps 구조체의 NativeFloat 속성을 검토하여 드라이버에서 부동 소수점 수치 연산을 사용하는지 확인할 수 있습니다. 속성 값이 false이면 장치에 대해 고정 소수점 형식의 데이터를 사용하는 것이 좋습니다. 고정 소수점 데이터와 부동 소수점 데이터를 모두 지원하려면 모든 Windows Mobile Direct3D 드라이버가 필요합니다.
고정 소수점 꼭지점 버퍼는 부동 소수점 꼭지점 버퍼와 동일한 방식으로 사용됩니다. 유일한 차이점은 포함된 데이터의 형식과 꼭지점 버퍼가 만들어질 때 지정된 유연한 꼭지점 형식입니다.
데이터가 원래 고정 소수점 형식이 아닌 경우 부동 소수점 데이터를 포함하는 Mesh 개체를 생성한 후 Mesh 개체의 Clone 메서드를 호출하여 고정 소수점 데이터로 변환할 수 있습니다.
다음 표에서는 부동 소수점 및 고정 소수점 데이터에 대해 유연한 여러 형식을 지정하는 데 사용되는 VertexFormats 열거형 값을 보여 줍니다. 이 목록은 모든 값을 포괄적으로 제공하지 않지만 고정 소수점의 유연한 꼭지점 형식이 부동 소수점의 유연한 꼭지점 형식과 어떻게 다른지 보여 줍니다.
형식 |
부동 소수점 사양 |
고정 소수점 사양 |
---|---|---|
위치만 |
VertexFormats.Position |
VertexFormats.PositionFixed |
위치 및 법선 |
VertexFormats.Position | VertexFormats.Normal |
VertexFormats.PositionFixed | VertexFormats.NormalFixed |
위치 및 색 확산 |
VertexFormats.Position | VertexFormats.Diffuse |
VertexFormats.PositionFixed | VertexFormats.Diffuse |
위치 및 단일 2D 질감 좌표 |
VertexFormats.Position | VertexFormats.Texture1 |
VertexFormats.PositionFixed | VertexFormats.Texture1 | VertexTextureCoordinate.Fixed(0) |
위치, 법선, 색 반사, 색 확산, 1D 질감 좌표 및 2D 질감 좌표 |
VertexFormats.Position | VertexFormats.Normal | VertexFormats.Diffuse | VertexFormats.Texture2 | VertexTextureCoordinate.Size1(0) |
VertexFormats.PositionFixed | VertexFormats.NormalFixed | VertexFormats.Diffuse | VertexFormats.Texture2 | VertexTextureCoordinate.Size1(0) | VertexTextureCoordinate.Fixed(0) | VertexTextureCoordinate.Fixed(1) |