Browse Source

Update DPF

tags/v1.0
falkTX 9 years ago
parent
commit
f0296f30b8
6 changed files with 28 additions and 7 deletions
  1. +3
    -0
      dpf/dgl/Makefile
  2. +1
    -0
      dpf/dgl/src/NanoVG.cpp
  3. +3
    -0
      dpf/dgl/src/WidgetPrivateData.hpp
  4. +6
    -3
      dpf/dgl/src/pugl/pugl_win.cpp
  5. +7
    -4
      dpf/dgl/src/pugl/pugl_x11.c
  6. +8
    -0
      dpf/distrho/src/DistrhoPluginChecks.h

+ 3
- 0
dpf/dgl/Makefile View File

@@ -12,6 +12,9 @@ BUILD_C_FLAGS += $(DGL_FLAGS) -I. -Isrc
BUILD_CXX_FLAGS += $(DGL_FLAGS) -I. -Isrc BUILD_CXX_FLAGS += $(DGL_FLAGS) -I. -Isrc
LINK_FLAGS += $(DGL_LIBS) LINK_FLAGS += $(DGL_LIBS)


# needed by oui-blendish
BUILD_CXX_FLAGS += -Wno-unused-parameter

# -------------------------------------------------------------- # --------------------------------------------------------------


OBJS = \ OBJS = \


+ 1
- 0
dpf/dgl/src/NanoVG.cpp View File

@@ -932,6 +932,7 @@ NanoWidget::NanoWidget(NanoWidget* groupWidget)
nData(new PrivateData(this)) nData(new PrivateData(this))
{ {
pData->needsScaling = true; pData->needsScaling = true;
pData->skipDisplay = true;
groupWidget->nData->subWidgets.push_back(this); groupWidget->nData->subWidgets.push_back(this);
} }




+ 3
- 0
dpf/dgl/src/WidgetPrivateData.hpp View File

@@ -51,7 +51,10 @@ struct Widget::PrivateData {
visible(true) visible(true)
{ {
if (addToSubWidgets && groupWidget != nullptr) if (addToSubWidgets && groupWidget != nullptr)
{
skipDisplay = true;
groupWidget->pData->subWidgets.push_back(self); groupWidget->pData->subWidgets.push_back(self);
}
} }


~PrivateData() ~PrivateData()


+ 6
- 3
dpf/dgl/src/pugl/pugl_win.cpp View File

@@ -87,9 +87,12 @@ void
puglLeaveContext(PuglView* view, bool flush) puglLeaveContext(PuglView* view, bool flush)
{ {
#ifdef PUGL_HAVE_GL #ifdef PUGL_HAVE_GL
if (view->ctx_type == PUGL_GL && flush) {
glFlush();
SwapBuffers(view->impl->hdc);
if (view->ctx_type == PUGL_GL) {
if (flush) {
glFlush();
SwapBuffers(view->impl->hdc);
}
wglMakeCurrent(NULL, NULL);
} }
#endif #endif
} }


+ 7
- 4
dpf/dgl/src/pugl/pugl_x11.c View File

@@ -218,11 +218,14 @@ void
puglLeaveContext(PuglView* view, bool flush) puglLeaveContext(PuglView* view, bool flush)
{ {
#ifdef PUGL_HAVE_GL #ifdef PUGL_HAVE_GL
if (view->ctx_type == PUGL_GL && flush) {
glFlush();
if (view->impl->doubleBuffered) {
glXSwapBuffers(view->impl->display, view->impl->win);
if (view->ctx_type == PUGL_GL) {
if (flush) {
glFlush();
if (view->impl->doubleBuffered) {
glXSwapBuffers(view->impl->display, view->impl->win);
}
} }
glXMakeCurrent(view->impl->display, None, NULL);
} }
#endif #endif
} }


+ 8
- 0
dpf/distrho/src/DistrhoPluginChecks.h View File

@@ -104,6 +104,14 @@
# error Synths need MIDI input to work! # error Synths need MIDI input to work!
#endif #endif


// -----------------------------------------------------------------------
// Disable UI if DGL is not available

#if DISTRHO_PLUGIN_HAS_UI && ! defined(HAVE_DGL)
# undef DISTRHO_PLUGIN_HAS_UI
# define DISTRHO_PLUGIN_HAS_UI 0
#endif

// ----------------------------------------------------------------------- // -----------------------------------------------------------------------


#endif // DISTRHO_PLUGIN_CHECKS_H_INCLUDED #endif // DISTRHO_PLUGIN_CHECKS_H_INCLUDED

Loading…
Cancel
Save