/** * Add a uniform. The uniform qualifier is used to declare global variables whose values are the same across the entire * primitive being processed. All uniform variables are read-only and are initialized externally either at link * time or through the API. The link time initial value is either the value of the variable's initializer, if * present, or 0 if no initializer is present. Sampler types cannot have initializers. * * @param var A global shader variable * @param index The index for the shader variable. This number will appear suffixed in the final shader string. * @return */ protected ShaderVar addUniform(IGlobalShaderVar var, int index) { return addUniform(var.getVarString() + Integer.toString(index), var.getDataType()); }
/** * Add a uniform. The uniform qualifier is used to declare global variables whose values are the same across the entire * primitive being processed. All uniform variables are read-only and are initialized externally either at link * time or through the API. The link time initial value is either the value of the variable's initializer, if * present, or 0 if no initializer is present. Sampler types cannot have initializers. * * @param var A global shader variable. * @return */ protected ShaderVar addUniform(IGlobalShaderVar var) { return addUniform(var.getVarString(), var.getDataType()); }
/** * Add a uniform. The uniform qualifier is used to declare global variables whose values are the same across the entire * primitive being processed. All uniform variables are read-only and are initialized externally either at link * time or through the API. The link time initial value is either the value of the variable's initializer, if * present, or 0 if no initializer is present. Sampler types cannot have initializers. * * @param var A global shader variable * @param suffix A string that will appear suffixed in the final shader string. * @return */ protected ShaderVar addUniform(IGlobalShaderVar var, String suffix) { return addUniform(var.getVarString() + suffix, var.getDataType()); }
/** * Add a uniform. The uniform qualifier is used to declare global variables whose values are the same across the entire * primitive being processed. All uniform variables are read-only and are initialized externally either at link * time or through the API. The link time initial value is either the value of the variable's initializer, if * present, or 0 if no initializer is present. Sampler types cannot have initializers. * * @param var A global shader variable * @param index The index for the shader variable. This number will appear suffixed in the final shader string. * @return */ protected ShaderVar addUniform(IGlobalShaderVar var, int index) { return addUniform(var.getVarString() + Integer.toString(index), var.getDataType()); }
/** * Add a uniform. The uniform qualifier is used to declare global variables whose values are the same across the entire * primitive being processed. All uniform variables are read-only and are initialized externally either at link * time or through the API. The link time initial value is either the value of the variable's initializer, if * present, or 0 if no initializer is present. Sampler types cannot have initializers. * * @param var A global shader variable. * @return */ protected ShaderVar addUniform(IGlobalShaderVar var) { return addUniform(var.getVarString(), var.getDataType()); }
/** * Add a uniform. The uniform qualifier is used to declare global variables whose values are the same across the entire * primitive being processed. All uniform variables are read-only and are initialized externally either at link * time or through the API. The link time initial value is either the value of the variable's initializer, if * present, or 0 if no initializer is present. Sampler types cannot have initializers. * * @param var A global shader variable * @param suffix A string that will appear suffixed in the final shader string. * @return */ protected ShaderVar addUniform(IGlobalShaderVar var, String suffix) { return addUniform(var.getVarString() + suffix, var.getDataType()); }