Browse Source

fix FBOs in dynamically loaded modules

(thanks, Cameron!)
pull/1639/head
bsp2 6 years ago
parent
commit
5654c1581d
2 changed files with 15 additions and 1 deletions
  1. +14
    -0
      src/widgets/FramebufferWidget.cpp
  2. +1
    -1
      vst2_bin/settings.json

+ 14
- 0
src/widgets/FramebufferWidget.cpp View File

@@ -39,6 +39,20 @@ void FramebufferWidget::draw(NVGcontext *vg) {
// printf("xxx FramebufferWidget::draw: global_ui=%p\n", global_ui);
#ifdef RACK_PLUGIN_SHARED
bool bFBO = global_ui->b_fbo_shared;

static bool bInit = false;
if(bFBO && !bInit)
{
printf("xxx FramebufferWidget::draw: lazy-init glew\n");
glewExperimental = GL_TRUE;
bInit = true;
if(glewInit() != GLEW_OK) {
printf("Could not init glew.\n");
return;
}
// GLEW generates GL error because it calls glGetString(GL_EXTENSIONS), we'll consume it here.
glGetError();
}
#else
bool bFBO = global_ui->b_fbo;
#endif // RACK_PLUGIN_SHARED


+ 1
- 1
vst2_bin/settings.json View File

@@ -14,7 +14,7 @@
"refreshRate": 30,
"vsync": true,
"fbo": true,
"fbo_shared": false,
"fbo_shared": true,
"touchInput": false,
"touchKbd": false,
"oversampleFactor": 1.0,


Loading…
Cancel
Save