Skip to content

Commit

Permalink
Tweak build to ensure GL3 is enabled, file browser disabled
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Jan 9, 2022
1 parent 0a31409 commit 5b81089
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ HAVE_PROJECTM = $(shell pkg-config --exists libprojectM && echo true)
# --------------------------------------------------------------

dgl:
$(MAKE) -C dpf/dgl opengl
$(MAKE) -C dpf/dgl opengl3 FILE_BROWSER_DISABLED=true

plugins: dgl
$(MAKE) all -C plugins/ProM
Expand Down
2 changes: 1 addition & 1 deletion dpf
8 changes: 2 additions & 6 deletions plugins/ProM/DistrhoUIProM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,8 @@ START_NAMESPACE_DISTRHO

DistrhoUIProM::DistrhoUIProM()
: UI(512, 512),
fPM(nullptr)
#ifndef DGL_USE_OPENGL3
, fResizeHandle(this)
#endif
fPM(nullptr),
fResizeHandle(this)
{
const double scaleFactor = getScaleFactor();

Expand All @@ -47,10 +45,8 @@ DistrhoUIProM::DistrhoUIProM()
setGeometryConstraints(256*scaleFactor, 256*scaleFactor, true);

// no need to show resize handle if window is user-resizable
#ifndef DGL_USE_OPENGL3
// if (isResizable())
// fResizeHandle.hide();
#endif
}

DistrhoUIProM::~DistrhoUIProM()
Expand Down
11 changes: 1 addition & 10 deletions plugins/ProM/DistrhoUIProM.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,8 @@
#ifndef 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"

#ifndef DGL_USE_OPENGL3
# include "ResizeHandle.hpp"
#endif
#include "ResizeHandle.hpp"

class projectM;

Expand Down Expand Up @@ -59,9 +52,7 @@ class DistrhoUIProM : public UI

private:
ScopedPointer<projectM> fPM;
#ifndef DGL_USE_OPENGL3
ResizeHandle fResizeHandle;
#endif

DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DistrhoUIProM)
};
Expand Down
2 changes: 2 additions & 0 deletions plugins/ProM/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ HAVE_PROJECTM = $(shell pkg-config --exists libprojectM && echo true)
# --------------------------------------------------------------
# Import base definitions

FILE_BROWSER_DISABLED = true
include ../../dpf/Makefile.base.mk

# --------------------------------------------------------------
Expand Down Expand Up @@ -105,6 +106,7 @@ endif # !HAVE_PROJECTM
# --------------------------------------------------------------
# Do some magic

UI_TYPE = opengl3
USE_VST2_BUNDLE = true
include ../../dpf/Makefile.plugins.mk

Expand Down
3 changes: 3 additions & 0 deletions plugins/ProM/ResizeHandle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ class ResizeHandle : public TopLevelWidget
protected:
void onDisplay() override
{
// TODO implement gl3 stuff in DPF
#ifndef DGL_USE_OPENGL3
const GraphicsContext& context(getGraphicsContext());
const double lineWidth = 1.0 * getScaleFactor();

Expand All @@ -77,6 +79,7 @@ class ResizeHandle : public TopLevelWidget
l1b.draw(context, lineWidth);
l2b.draw(context, lineWidth);
l3b.draw(context, lineWidth);
#endif
}

bool onMouse(const MouseEvent& ev) override
Expand Down

0 comments on commit 5b81089

Please sign in to comment.