阅片器项目工作总结1


void EntryExitPoints::initialize() {
    if (_has_init) {
        return;
    }
    if (GPU_BASE == _strategy && GL_BASE == _gpu_platform) {
        CHECK_GL_ERROR;

        //TODO change GL_RGBA32F->GL_RGBA16

        _entry_points_texture->get_gl_resource()->initialize();
        _exit_points_texture->get_gl_resource()->initialize();

        _entry_points_texture->get_gl_resource()->bind();
        GLTextureUtils::set_2d_wrap_s_t(GL_CLAMP_TO_BORDER);
        GLTextureUtils::set_filter(GL_TEXTURE_2D, GL_LINEAR);
        _entry_points_texture->get_gl_resource()->load(GL_RGBA32F, _width, _height, GL_RGBA, GL_FLOAT, NULL);
        _entry_points_texture->get_gl_resource()->unbind();

        _exit_points_texture->get_gl_resource()->bind();
        GLTextureUtils::set_2d_wrap_s_t(GL_CLAMP_TO_BORDER);
        GLTextureUtils::set_filter(GL_TEXTURE_2D, GL_LINEAR);
        _exit_points_texture->get_gl_resource()->load(GL_RGBA32F, _width, _height, GL_RGBA, GL_FLOAT, NULL);
        _exit_points_texture->get_gl_resource()->unbind();

        CHECK_GL_ERROR;
    }
    _has_init = true;

}

今天在整理一个阅片器项目的时候发现使用cpu模式下一只有错误,调试代码过程中发现有一个地方条件有误,导致cpu模式下执行了gpu的代码,经过修改,终于改好了 ,就是多加了这句话GPU_BASE == _strategy

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章