"// Alternatively, this file may be used under the terms of Open CASCADE\n"
"// commercial license or contractual agreement.\n"
"\n"
- "// This files includes definition of common uniform variables in OCCT GLSL programs\n"
+ "//! @file Declarations.glsl\n"
+ "//! This files includes definition of common uniform variables in OCCT GLSL programs\n"
"\n"
- "#define THE_MAX_LIGHTS 8\n"
- "#define THE_MAX_CLIP_PLANES 8\n"
+ "//! @def THE_MAX_LIGHTS\n"
+ "//! Specifies the length of array of lights, which is 8 by default. Defined by Shader Manager.\n"
+ "// #define THE_MAX_LIGHTS 8\n"
+ "\n"
+ "//! @def THE_MAX_CLIP_PLANES\n"
+ "//! Specifies the length of array of clipping planes, which is 8 by default. Defined by Shader Manager.\n"
+ "// #define THE_MAX_CLIP_PLANES 8\n"
"\n"
"// compatibility macros\n"
"#if (__VERSION__ >= 130)\n"
"\n"
"// Light sources\n"
"uniform vec4 occLightAmbient; //!< Cumulative ambient color\n"
+ "#if defined(THE_MAX_LIGHTS) && (THE_MAX_LIGHTS > 0)\n"
"uniform THE_PREC_ENUM int occLightSourcesCount; //!< Total number of light sources\n"
"int occLight_Type (in int theId); //!< Type of light source\n"
"int occLight_IsHeadlight (in int theId); //!< Is light a headlight?\n"
"float occLight_LinearAttenuation (in int theId); //!< Linear attenuation factor of positional light source\n"
"float occLight_SpotCutOff (in int theId); //!< Maximum spread angle of the spot light (in radians)\n"
"float occLight_SpotExponent (in int theId); //!< Attenuation of the spot light intensity (from 0 to 1)\n"
+ "#endif\n"
"\n"
"// Front material properties accessors\n"
"vec4 occFrontMaterial_Emission(void); //!< Emission color\n"
"uniform float occOitDepthFactor; //!< Influence of the depth component to the coverage of the accumulated fragment\n"
"\n"
"//! Parameters of clipping planes\n"
+ "#if defined(THE_MAX_CLIP_PLANES) && (THE_MAX_CLIP_PLANES > 0)\n"
"uniform vec4 occClipPlaneEquations[THE_MAX_CLIP_PLANES];\n"
- "uniform THE_PREC_ENUM int occClipPlaneCount; //!< Total number of clip planes\n";
+ "uniform THE_PREC_ENUM int occClipPlaneCount; //!< Total number of clip planes\n"
+ "#endif\n";