§ 4.1 Basic Types
The OpenGL Shading Language supports the following basic data types, grouped as follows:
boola conditional type, taking on values of true or falsebvec2a two-component Boolean vectorbvec3a three-component Boolean vectorbvec4a four-component Boolean vector
…
§ 4.1.2 Booleans To make conditional execution of code easier to express, the type bool is supported. There is no expectation that hardware directly supports variables of this type. (…)
As for setting:
§ 2.2.1 (…) When state values are specified using a different parameter type than the actual type of that state, data conversions are
performed as follows:
- When the type of internal state is boolean, zero integer or floating-point values are converted to
FALSEand non-zero values are converted toTRUE.