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