ENABLE_THUMBNAIL_GENERATOR -> Use off-screen framebuffer to render the thumbnail on graphic cards supporting it

This commit is contained in:
Enrico Turri 2019-10-29 10:27:51 +01:00
parent f36dd833d2
commit 3ff3eed2b1
4 changed files with 151 additions and 82 deletions

View file

@ -189,6 +189,7 @@ std::string GLCanvas3DManager::GLInfo::to_string(bool format_as_html, bool exten
GLCanvas3DManager::EMultisampleState GLCanvas3DManager::s_multisample = GLCanvas3DManager::MS_Unknown;
bool GLCanvas3DManager::s_compressed_textures_supported = false;
bool GLCanvas3DManager::s_framebuffers_supported = false;
GLCanvas3DManager::GLInfo GLCanvas3DManager::s_gl_info;
GLCanvas3DManager::GLCanvas3DManager()
@ -269,6 +270,11 @@ void GLCanvas3DManager::init_gl()
else
s_compressed_textures_supported = false;
if (s_gl_info.is_version_greater_or_equal_to(3, 0) && GLEW_ARB_framebuffer_object)
s_framebuffers_supported = true;
else
s_framebuffers_supported = false;
if (! s_gl_info.is_version_greater_or_equal_to(2, 0)) {
// Complain about the OpenGL version.
wxString message = wxString::Format(