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


C++ Batch::editData方法代码示例

本文整理汇总了C++中Batch::editData方法的典型用法代码示例。如果您正苦于以下问题:C++ Batch::editData方法的具体用法?C++ Batch::editData怎么用?C++ Batch::editData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Batch的用法示例。


在下文中一共展示了Batch::editData方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: do_setViewportTransform

void GLBackend::do_setViewportTransform(Batch& batch, size_t paramOffset) {
    memcpy(&_transform._viewport, batch.editData(batch._params[paramOffset]._uint), sizeof(Vec4i));

    if (!_inRenderTransferPass && !isStereo()) {
        ivec4& vp = _transform._viewport;
        glViewport(vp.x, vp.y, vp.z, vp.w);
    }

    // The Viewport is tagged invalid because the CameraTransformUBO is not up to date and will need update on next drawcall
    _transform._invalidViewport = true;
}
开发者ID:AlexanderOtavka,项目名称:hifi,代码行数:11,代码来源:GLBackendTransform.cpp

示例2: do_setStateScissorRect

void GLBackend::do_setStateScissorRect(Batch& batch, size_t paramOffset) {
    Vec4i rect;
    memcpy(&rect, batch.editData(batch._params[paramOffset]._uint), sizeof(Vec4i));

    if (_stereo._enable) {
        rect.z /= 2;
        if (_stereo._pass) {
            rect.x += rect.z;
        }
    }
    glScissor(rect.x, rect.y, rect.z, rect.w);
    (void)CHECK_GL_ERROR();
}
开发者ID:AlexanderOtavka,项目名称:hifi,代码行数:13,代码来源:GLBackendState.cpp

示例3: updatePipeline

void GLBackend::do_glUniformMatrix4fv(Batch& batch, uint32 paramOffset) {
    if (_pipeline._program == 0) {
        // We should call updatePipeline() to bind the program but we are not doing that
        // because these uniform setters are deprecated and we don;t want to create side effect
        return;
    }
    updatePipeline();
    glUniformMatrix4fv(
        batch._params[paramOffset + 3]._int,
        batch._params[paramOffset + 2]._uint,
        batch._params[paramOffset + 1]._uint,
        (const GLfloat*)batch.editData(batch._params[paramOffset + 0]._uint));
    (void) CHECK_GL_ERROR();
}
开发者ID:charukcs,项目名称:hifi,代码行数:14,代码来源:GLBackend.cpp

示例4: updatePipeline

void GLBackend::do_glUniform4fv(Batch& batch, size_t paramOffset) {
    if (_pipeline._program == 0) {
        // We should call updatePipeline() to bind the program but we are not doing that
        // because these uniform setters are deprecated and we don;t want to create side effect
        return;
    }
    updatePipeline();
    
    GLint location = batch._params[paramOffset + 2]._int;
    GLsizei count = batch._params[paramOffset + 1]._uint;
    const GLfloat* value = (const GLfloat*)batch.editData(batch._params[paramOffset + 0]._uint);
    glUniform4fv(location, count, value);

    (void) CHECK_GL_ERROR();
}
开发者ID:AaronHillaker,项目名称:hifi,代码行数:15,代码来源:GLBackend.cpp

示例5: do_setViewportTransform

void GLBackend::do_setViewportTransform(Batch& batch, uint32 paramOffset) {
    memcpy(&_transform._viewport, batch.editData(batch._params[paramOffset]._uint), sizeof(Vec4i));

    ivec4& vp = _transform._viewport;

    // Where we assign the GL viewport
    if (_stereo._enable) {
        vp.z /= 2;
        if (_stereo._pass) {
            vp.x += vp.z;
        }
    } 

    glViewport(vp.x, vp.y, vp.z, vp.w);

    // The Viewport is tagged invalid because the CameraTransformUBO is not up to date and will need update on next drawcall
    _transform._invalidViewport = true;
}
开发者ID:Giugiogia,项目名称:hifi,代码行数:18,代码来源:GLBackendTransform.cpp

示例6: do_setProjectionTransform

void GLBackend::do_setProjectionTransform(Batch& batch, size_t paramOffset) {
    memcpy(&_transform._projection, batch.editData(batch._params[paramOffset]._uint), sizeof(Mat4));
    _transform._invalidProj = true;
}
开发者ID:AlexanderOtavka,项目名称:hifi,代码行数:4,代码来源:GLBackendTransform.cpp

示例7: do_setViewportTransform

void GLBackend::do_setViewportTransform(Batch& batch, uint32 paramOffset) {
    memcpy(&_transform._viewport, batch.editData(batch._params[paramOffset]._uint), sizeof(Vec4i));
    _transform._invalidViewport = true;
}
开发者ID:Dreckinfeuer,项目名称:hifi,代码行数:4,代码来源:GLBackendTransform.cpp


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