소스 검색

math: declare some HLSL-compliant types.

legacy
Sam Hocevar sam 12 년 전
부모
커밋
bd5ff72507
1개의 변경된 파일18개의 추가작업 그리고 0개의 파일을 삭제
  1. +18
    -0
      src/lol/math/vector.h

+ 18
- 0
src/lol/math/vector.h 파일 보기

@@ -63,6 +63,24 @@ DECLARE_VECTOR_TYPEDEFS(Mat2, mat2)
DECLARE_VECTOR_TYPEDEFS(Mat3, mat3)
DECLARE_VECTOR_TYPEDEFS(Mat4, mat4)

/*
* HLSL/Cg-compliant type names.
*/

typedef vec2 float2;
typedef vec3 float3;
typedef vec4 float4;
typedef mat2 float2x2;
typedef mat3 float3x3;
typedef mat4 float4x4;

typedef ivec2 int2;
typedef ivec3 int3;
typedef ivec4 int4;
typedef imat2 int2x2;
typedef imat3 int3x3;
typedef imat4 int4x4;

/*
* Magic vector swizzling (part 1/2)
* These vectors are empty, but thanks to static_cast we can take their


불러오는 중...
취소
저장