]> git.tdb.fi Git - libs/gl.git/blobdiff - builtin_data/_builtin.glsl
Give declaration nodes to all GLSL types.
[libs/gl.git] / builtin_data / _builtin.glsl
index f6a3574f52dac374991e348afc309ab117fba570..df39bcc0a49020f4e16baf4cc13e6c4c9da1b604 100644 (file)
@@ -1,3 +1,37 @@
+typedef vector(2) float vec2;
+typedef vector(3) float vec3;
+typedef vector(4) float vec4;
+typedef vector(2) vec2 mat2;
+typedef mat2 mat2x2;
+typedef vector(3) vec2 mat3x2;
+typedef vector(4) vec2 mat4x2;
+typedef vector(2) vec3 mat2x3;
+typedef vector(3) vec3 mat3;
+typedef mat3 mat3x3;
+typedef vector(4) vec3 mat4x3;
+typedef vector(2) vec4 mat2x4;
+typedef vector(3) vec4 mat3x4;
+typedef vector(4) vec4 mat4;
+typedef mat4 mat4x4;
+
+typedef vector(2) int ivec2;
+typedef vector(3) int ivec3;
+typedef vector(4) int ivec4;
+
+typedef image(dimensions=1, sampled) float sampler1D;
+typedef image(dimensions=2, sampled) float sampler2D;
+typedef image(dimensions=3, sampled) float sampler3D;
+typedef image(dimensions=cube, sampled) float samplerCube;
+typedef image(dimensions=1[], sampled) float sampler1DArray;
+typedef image(dimensions=2[], sampled) float sampler2DArray;
+typedef image(dimensions=cube[], sampled) float samplerCubeArray;
+typedef image(dimensions=1, shadow, sampled) float sampler1DShadow;
+typedef image(dimensions=2, shadow, sampled) float sampler2DShadow;
+typedef image(dimensions=1[], shadow, sampled) float sampler1DArrayShadow;
+typedef image(dimensions=2[], shadow, sampled) float sampler2DArrayShadow;
+typedef image(dimensions=cube, shadow, sampled) float samplerCubeShadow;
+typedef image(dimensions=cube[], shadow, sampled) float samplerCubeArrayShadow;
+
 #pragma MSP stage(vertex)
 out gl_PerVertex
 {