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