3 int f(int a, int b, int c)
5 int a = b; // ERROR, redefinition
8 float a = float(a) + 1.0; // okay
14 int f(int a, int b, int c); // okay to redeclare
17 float b(int a); // ERROR: redefinition
20 bool c; // ERROR: redefinition
22 float f; // ERROR: redefinition
23 float tan; // okay, hides built-in function
24 float sin(float x); // okay, can redefine built-in functions
25 float cos(float x) // okay, can redefine built-in functions
29 bool radians(bool x) // okay, can overload built-in functions
34 invariant gl_Position;
43 sin(0.7); // ERROR, use of hidden function
49 gl_Position = vec4(f);
51 for (int f = 0; f < 10; ++f)
56 float x = 2.0, /* 2nd x visible here */ y = x; // y is initialized to 2
57 int z = z; // ERROR: z not previously defined.
60 int x = x; // x is initialized to '1'
68 S S = S(0); // 'S' is only visible as a struct and constructor
69 S.x; // 'S' is now visible as a variable
73 degrees(3.2); // ERROR, use of hidden built-in function