jjzjj

activeLights

全部标签

c++ - 如何在结构数组中设置统一值?

我正在尝试设置数组中结构的各个字段的值。问题在于,在着色器中,结构的每个字段都分配了值0。着色器:structLight{vec3position;vec3color;floatambient;floatdiffuse;floatspecular;floatexponent;};uniformLightlights[8];C++:structLight{vec3position;vec3color;floatambient;floatdiffuse;floatspecular;floatexponent;};...std::vectoractiveLights;Lightl;l.pos