当前位置: 首页>>代码示例>>C++>>正文


C++ GrGLCaps::bindUniformLocationSupport方法代码示例

本文整理汇总了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;
        }
    }
}
开发者ID:MIPS,项目名称:external-skia,代码行数:27,代码来源:GrGLUniformHandler.cpp

示例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;
        }
    }
}
开发者ID:Crawping,项目名称:chromium_extract,代码行数:9,代码来源:GrGLUniformHandler.cpp

示例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;
        }
    }
}
开发者ID:03050903,项目名称:skia,代码行数:14,代码来源:GrGLUniformHandler.cpp

示例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;
        }
    }
}
开发者ID:MIPS,项目名称:external-skia,代码行数:23,代码来源:GrGLUniformHandler.cpp


注:本文中的GrGLCaps::bindUniformLocationSupport方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。