本文整理汇总了C++中GrGLCaps::bindUniformLocationSupport方法的典型用法代码示例。如果您正苦于以下问题:C++ GrGLCaps::bindUniformLocationSupport方法的具体用法?C++ GrGLCaps::bindUniformLocationSupport怎么用?C++ GrGLCaps::bindUniformLocationSupport使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GrGLCaps
的用法示例。
在下文中一共展示了GrGLCaps::bindUniformLocationSupport方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getUniformLocations
void GrGLUniformHandler::getUniformLocations(GrGLuint programID, const GrGLCaps& caps) {
if (!caps.bindUniformLocationSupport()) {
int count = fUniforms.count();
for (int i = 0; i < count; ++i) {
GrGLint location;
GL_CALL_RET(location, GetUniformLocation(programID, fUniforms[i].fVariable.c_str()));
fUniforms[i].fLocation = location;
}
for (int i = 0; i < fSamplers.count(); ++i) {
GrGLint location;
GL_CALL_RET(location, GetUniformLocation(programID, fSamplers[i].fVariable.c_str()));
fSamplers[i].fLocation = location;
}
for (int i = 0; i < fTexelBuffers.count(); ++i) {
GrGLint location;
GL_CALL_RET(location, GetUniformLocation(programID,
fTexelBuffers[i].fVariable.c_str()));
fTexelBuffers[i].fLocation = location;
}
for (int i = 0; i < fImageStorages.count(); ++i) {
GrGLint location;
GL_CALL_RET(location, GetUniformLocation(programID,
fImageStorages[i].fVariable.c_str()));
fImageStorages[i].fLocation = location;
}
}
}
示例2: bindUniformLocations
void GrGLUniformHandler::bindUniformLocations(GrGLuint programID, const GrGLCaps& caps) {
if (caps.bindUniformLocationSupport()) {
int count = fUniforms.count();
for (int i = 0; i < count; ++i) {
GL_CALL(BindUniformLocation(programID, i, fUniforms[i].fVariable.c_str()));
fUniforms[i].fLocation = i;
}
}
}
示例3: bindUniformLocations
void GrGLUniformHandler::bindUniformLocations(GrGLuint programID, const GrGLCaps& caps) {
if (caps.bindUniformLocationSupport()) {
int uniformCnt = fUniforms.count();
for (int i = 0; i < uniformCnt; ++i) {
GL_CALL(BindUniformLocation(programID, i, fUniforms[i].fVariable.c_str()));
fUniforms[i].fLocation = i;
}
for (int i = 0; i < fSamplers.count(); ++i) {
GrGLint location = i + uniformCnt;
GL_CALL(BindUniformLocation(programID, location, fSamplers[i].fShaderVar.c_str()));
fSamplers[i].fLocation = location;
}
}
}
示例4: bindUniformLocations
void GrGLUniformHandler::bindUniformLocations(GrGLuint programID, const GrGLCaps& caps) {
if (caps.bindUniformLocationSupport()) {
int currUniform = 0;
for (int i = 0; i < fUniforms.count(); ++i, ++currUniform) {
GL_CALL(BindUniformLocation(programID, currUniform, fUniforms[i].fVariable.c_str()));
fUniforms[i].fLocation = currUniform;
}
for (int i = 0; i < fSamplers.count(); ++i, ++currUniform) {
GL_CALL(BindUniformLocation(programID, currUniform, fSamplers[i].fVariable.c_str()));
fSamplers[i].fLocation = currUniform;
}
for (int i = 0; i < fTexelBuffers.count(); ++i, ++currUniform) {
GL_CALL(BindUniformLocation(programID, currUniform,
fTexelBuffers[i].fVariable.c_str()));
fTexelBuffers[i].fLocation = currUniform;
}
for (int i = 0; i < fImageStorages.count(); ++i, ++currUniform) {
GL_CALL(BindUniformLocation(programID, currUniform,
fImageStorages[i].fVariable.c_str()));
fImageStorages[i].fLocation = currUniform;
}
}
}