render implement thread, wrap GL commands into tasks
This commit is contained in:
@@ -9,16 +9,18 @@ void App::initShaders()
|
||||
std::logic_error("check_uniform_uniqueness() failed");
|
||||
#endif // _DEBUG
|
||||
|
||||
GLint n_exts;
|
||||
glGetIntegerv(GL_NUM_EXTENSIONS, &n_exts);
|
||||
for (int i = 0; i < n_exts; i++)
|
||||
{
|
||||
std::string ext = (const char*)glGetStringi(GL_EXTENSIONS, i);
|
||||
if (ext.find("shader_framebuffer_fetch") != std::string::npos)
|
||||
render_task([] {
|
||||
GLint n_exts;
|
||||
glGetIntegerv(GL_NUM_EXTENSIONS, &n_exts);
|
||||
for (int i = 0; i < n_exts; i++)
|
||||
{
|
||||
ShaderManager::ext_framebuffer_fetch = true;
|
||||
std::string ext = (const char*)glGetStringi(GL_EXTENSIONS, i);
|
||||
if (ext.find("shader_framebuffer_fetch") != std::string::npos)
|
||||
{
|
||||
ShaderManager::ext_framebuffer_fetch = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
LOG("Shader Extension shader_framebuffer_fetch: %s", ShaderManager::ext_framebuffer_fetch ? "enabled" : "disabled");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user