我试图传递一个变量timeVar(一个初始设置为0.0的浮点值),该变量在我的display()方法中使用以下行进行更改
timeVar = time(0);
到我的碎片着色器。那我就这么做
safe_glUniform1f(h_uTime, timeVar);
然后像这样传递给我的着色器程序
h_uTime = safe_glGetAttribLocation(h_program, "uTime");
但我总是犯这个错误。请帮忙!
WARN: uTime cannot be bound (it either doesn't exist or has been optimized
away). safe_glAttrib calls will silently ignore it.