/** * The attribute qualifier is used to declare variables that are passed to a vertex shader from OpenGL on a * per-vertex basis. It is an error to declare an attribute variable in any type of shader other than a vertex * shader. Attribute variables are read-only as far as the vertex shader is concerned. Values for attribute * variables are passed to a vertex shader through the OpenGL vertex API or as part of a vertex array. They * convey vertex attributes to the vertex shader and are expected to change on every vertex shader run. The * attribute qualifier can be used only with float, floating-point vectors, and matrices. Attribute variables * cannot be declared as arrays or structures. * * @param var A global shader variable * @return */ protected ShaderVar addAttribute(IGlobalShaderVar var) { return addAttribute(var.getVarString(), var.getDataType()); }
/** * The attribute qualifier is used to declare variables that are passed to a vertex shader from OpenGL on a * per-vertex basis. It is an error to declare an attribute variable in any type of shader other than a vertex * shader. Attribute variables are read-only as far as the vertex shader is concerned. Values for attribute * variables are passed to a vertex shader through the OpenGL vertex API or as part of a vertex array. They * convey vertex attributes to the vertex shader and are expected to change on every vertex shader run. The * attribute qualifier can be used only with float, floating-point vectors, and matrices. Attribute variables * cannot be declared as arrays or structures. * * @param var A global shader variable * @return */ protected ShaderVar addAttribute(IGlobalShaderVar var) { return addAttribute(var.getVarString(), var.getDataType()); }