X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=scripts%2Fbuiltin_funcs.py;h=ef19d54fd9162d9e4bf92cfa94d22dfcac648c83;hb=91e65bc9e24a6889995081035f6f6f0a78a6c20e;hp=24cc3643c418eb6a7b106b7be609dd5c7977af8b;hpb=305b62cf4f7e2a4ca3cc56109003aed6bde61c25;p=libs%2Fgl.git diff --git a/scripts/builtin_funcs.py b/scripts/builtin_funcs.py index 24cc3643..ef19d54f 100755 --- a/scripts/builtin_funcs.py +++ b/scripts/builtin_funcs.py @@ -24,6 +24,10 @@ traits = { "ivec2": { "Base": "int", "Dim": 2 }, "ivec3": { "Base": "int", "Dim": 3 }, "ivec4": { "Base": "int", "Dim": 4 }, + "uint": { "Base": "uint", "Dim": 1, "Vec": "uvec" }, + "uvec2": { "Base": "uint", "Dim": 2 }, + "uvec3": { "Base": "uint", "Dim": 3 }, + "uvec4": { "Base": "uint", "Dim": 4 }, "bool": { "Base": "bool", "Dim": 1, "Vec": "bvec" }, "bvec2": { "Base": "bool", "Dim": 2 }, "bvec3": { "Base": "bool", "Dim": 3 }, @@ -43,11 +47,15 @@ float32vectypes = ("vec2", "vec3", "vec4") float32types = ("float",)+float32vectypes floatvectypes = float32vectypes floattypes = float32types -int32vectypes = ("ivec2", "ivec3", "ivec4") -int32types = ("int",)+int32vectypes -signedtypes = floattypes+int32types -arithmetictypes = signedtypes -arithmeticvectypes = float32vectypes+int32vectypes +sint32vectypes = ("ivec2", "ivec3", "ivec4") +sint32types = ("int",)+sint32vectypes +signedtypes = floattypes+sint32types +uint32vectypes = ("uvec2", "uvec3", "uvec4") +uint32types = ("uint",)+uint32vectypes +int32types = sint32types+uint32types +unsignedtypes = uint32types +arithmetictypes = signedtypes+unsignedtypes +arithmeticvectypes = float32vectypes+sint32vectypes+uint32vectypes boolvectypes = ("bvec2", "bvec3", "bvec4") squarematrixtypes = ("mat2", "mat3", "mat4") matrixtypes = squarematrixtypes+("mat2x3", "mat3x2", "mat2x4", "mat4x2", "mat3x4", "mat4x3") @@ -114,7 +122,7 @@ shared_funcs = [ ("T::Base length(T x)", floattypes), ("T::Base distance(T p0, T p1)", floattypes), ("T::Base dot(T x, T y)", floattypes), - "vec3 cross(vec3 x)", + "vec3 cross(vec3 x, vec3 y)", ("T normalize(T x)", floattypes), ("T faceforward(T N, T I, T Nref)", floattypes), ("T reflect(T I, T N)", floattypes),