Fix initial GL state for some systems
Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
3a88af1112
commit
673279a8bf
2 changed files with 6 additions and 2 deletions
|
@ -431,6 +431,10 @@ public:
|
||||||
setSize(DISTRHO_UI_DEFAULT_WIDTH * scaleFactor, DISTRHO_UI_DEFAULT_HEIGHT * scaleFactor);
|
setSize(DISTRHO_UI_DEFAULT_WIDTH * scaleFactor, DISTRHO_UI_DEFAULT_HEIGHT * scaleFactor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS
|
||||||
|
const DGL_NAMESPACE::Window::ScopedGraphicsContext sgc(window);
|
||||||
|
#endif
|
||||||
|
|
||||||
rack::window::WindowSetPluginUI(context->window, this);
|
rack::window::WindowSetPluginUI(context->window, this);
|
||||||
|
|
||||||
// hide "Browse VCV Library" button
|
// hide "Browse VCV Library" button
|
||||||
|
|
|
@ -188,7 +188,7 @@ struct Window::Internal {
|
||||||
Internal()
|
Internal()
|
||||||
#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS
|
#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS
|
||||||
: hiddenApp(false),
|
: hiddenApp(false),
|
||||||
hiddenWindow(hiddenApp)
|
hiddenWindow(hiddenApp, 0, DISTRHO_UI_DEFAULT_WIDTH, DISTRHO_UI_DEFAULT_HEIGHT, 0.0, true)
|
||||||
{
|
{
|
||||||
hiddenWindow.setIgnoringKeyRepeat(true);
|
hiddenWindow.setIgnoringKeyRepeat(true);
|
||||||
hiddenApp.idle();
|
hiddenApp.idle();
|
||||||
|
@ -221,7 +221,7 @@ Window::Window() {
|
||||||
const int nvgFlags = NVG_ANTIALIAS;
|
const int nvgFlags = NVG_ANTIALIAS;
|
||||||
|
|
||||||
#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS
|
#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS
|
||||||
DGL_NAMESPACE::Window::ScopedGraphicsContext sgc(internal->hiddenWindow);
|
const DGL_NAMESPACE::Window::ScopedGraphicsContext sgc(internal->hiddenWindow);
|
||||||
vg = nvgCreateGL(nvgFlags);
|
vg = nvgCreateGL(nvgFlags);
|
||||||
#else
|
#else
|
||||||
vg = static_cast<CardinalPluginContext*>(APP)->tlw->getContext();
|
vg = static_cast<CardinalPluginContext*>(APP)->tlw->getContext();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue