Signed-off-by: falkTX <falktx@falktx.com>master
@@ -16,7 +16,7 @@ HAVE_PROJECTM = $(shell pkg-config --exists libprojectM && echo true) | |||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
dgl: | dgl: | ||||
$(MAKE) -C dpf/dgl opengl | |||||
$(MAKE) -C dpf/dgl opengl3 FILE_BROWSER_DISABLED=true | |||||
plugins: dgl | plugins: dgl | ||||
$(MAKE) all -C plugins/ProM | $(MAKE) all -C plugins/ProM | ||||
@@ -1 +1 @@ | |||||
Subproject commit 7f206b99dcccadbf26376ea6db0b9557800dd97d | |||||
Subproject commit 923664009361100bba378c6cfb94d68e39575476 |
@@ -34,10 +34,8 @@ START_NAMESPACE_DISTRHO | |||||
DistrhoUIProM::DistrhoUIProM() | DistrhoUIProM::DistrhoUIProM() | ||||
: UI(512, 512), | : UI(512, 512), | ||||
fPM(nullptr) | |||||
#ifndef DGL_USE_OPENGL3 | |||||
, fResizeHandle(this) | |||||
#endif | |||||
fPM(nullptr), | |||||
fResizeHandle(this) | |||||
{ | { | ||||
const double scaleFactor = getScaleFactor(); | const double scaleFactor = getScaleFactor(); | ||||
@@ -47,10 +45,8 @@ DistrhoUIProM::DistrhoUIProM() | |||||
setGeometryConstraints(256*scaleFactor, 256*scaleFactor, true); | setGeometryConstraints(256*scaleFactor, 256*scaleFactor, true); | ||||
// no need to show resize handle if window is user-resizable | // no need to show resize handle if window is user-resizable | ||||
#ifndef DGL_USE_OPENGL3 | |||||
// if (isResizable()) | // if (isResizable()) | ||||
// fResizeHandle.hide(); | // fResizeHandle.hide(); | ||||
#endif | |||||
} | } | ||||
DistrhoUIProM::~DistrhoUIProM() | DistrhoUIProM::~DistrhoUIProM() | ||||
@@ -17,15 +17,8 @@ | |||||
#ifndef DISTRHO_UI_PROM_HPP_INCLUDED | #ifndef DISTRHO_UI_PROM_HPP_INCLUDED | ||||
#define DISTRHO_UI_PROM_HPP_INCLUDED | #define DISTRHO_UI_PROM_HPP_INCLUDED | ||||
#if defined(DISTRHO_OS_MAC) || defined(DISTRHO_OS_WINDOWS) | |||||
# define DGL_USE_OPENGL3 | |||||
#endif | |||||
#include "DistrhoUI.hpp" | #include "DistrhoUI.hpp" | ||||
#ifndef DGL_USE_OPENGL3 | |||||
# include "ResizeHandle.hpp" | |||||
#endif | |||||
#include "ResizeHandle.hpp" | |||||
class projectM; | class projectM; | ||||
@@ -59,9 +52,7 @@ protected: | |||||
private: | private: | ||||
ScopedPointer<projectM> fPM; | ScopedPointer<projectM> fPM; | ||||
#ifndef DGL_USE_OPENGL3 | |||||
ResizeHandle fResizeHandle; | ResizeHandle fResizeHandle; | ||||
#endif | |||||
DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DistrhoUIProM) | DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DistrhoUIProM) | ||||
}; | }; | ||||
@@ -26,6 +26,7 @@ HAVE_PROJECTM = $(shell pkg-config --exists libprojectM && echo true) | |||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
# Import base definitions | # Import base definitions | ||||
FILE_BROWSER_DISABLED = true | |||||
include ../../dpf/Makefile.base.mk | include ../../dpf/Makefile.base.mk | ||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
@@ -105,6 +106,7 @@ endif # !HAVE_PROJECTM | |||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
# Do some magic | # Do some magic | ||||
UI_TYPE = opengl3 | |||||
USE_VST2_BUNDLE = true | USE_VST2_BUNDLE = true | ||||
include ../../dpf/Makefile.plugins.mk | include ../../dpf/Makefile.plugins.mk | ||||
@@ -55,6 +55,8 @@ public: | |||||
protected: | protected: | ||||
void onDisplay() override | void onDisplay() override | ||||
{ | { | ||||
// TODO implement gl3 stuff in DPF | |||||
#ifndef DGL_USE_OPENGL3 | |||||
const GraphicsContext& context(getGraphicsContext()); | const GraphicsContext& context(getGraphicsContext()); | ||||
const double lineWidth = 1.0 * getScaleFactor(); | const double lineWidth = 1.0 * getScaleFactor(); | ||||
@@ -77,6 +79,7 @@ protected: | |||||
l1b.draw(context, lineWidth); | l1b.draw(context, lineWidth); | ||||
l2b.draw(context, lineWidth); | l2b.draw(context, lineWidth); | ||||
l3b.draw(context, lineWidth); | l3b.draw(context, lineWidth); | ||||
#endif | |||||
} | } | ||||
bool onMouse(const MouseEvent& ev) override | bool onMouse(const MouseEvent& ev) override | ||||