From 808da2d9c7095548963acdec51a2add1cab16c22 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 17 May 2014 03:59:25 +0100 Subject: [PATCH] Cleanup; Update DPF --- dpf | 2 +- plugins/ProM/DistrhoUIProM.cpp | 32 ++++++-------------------------- 2 files changed, 7 insertions(+), 27 deletions(-) diff --git a/dpf b/dpf index b4ac031..51a6f9c 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit b4ac0311058bd1626d00e83824ec98a23651d873 +Subproject commit 51a6f9c3ba792374158b8ed2123844369a8f916d diff --git a/plugins/ProM/DistrhoUIProM.cpp b/plugins/ProM/DistrhoUIProM.cpp index a9c2076..f3ae23b 100644 --- a/plugins/ProM/DistrhoUIProM.cpp +++ b/plugins/ProM/DistrhoUIProM.cpp @@ -91,7 +91,10 @@ void DistrhoUIProM::d_uiIdle() void DistrhoUIProM::onDisplay() { if (fPM == nullptr) - return; + { + fPM = new projectM(kSettings); // std::string("/usr/share/projectM/config.inp")); + fPM->projectM_resetGL(getWidth(), getHeight()); + } fPM->renderFrame(); } @@ -240,45 +243,22 @@ bool DistrhoUIProM::onSpecial(bool press, uint key) void DistrhoUIProM::onReshape(int width, int height) { - /* Our shading model--Gouraud (smooth). */ glShadeModel(GL_SMOOTH); - /* Set the clear color. */ - glClearColor(0, 0, 0, 0); - /* Setup our viewport. */ - glViewport(0, 0, width, height); - - /* - * Change to the projection matrix and set - * our viewing volume. - */ glMatrixMode(GL_TEXTURE); glLoadIdentity(); - //gluOrtho2D(0.0, (GLfloat) width, 0.0, (GLfloat) height); - //glOrtho(0, width, height, 0, 0.0f, 1.0f); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glDrawBuffer(GL_BACK); glReadBuffer(GL_BACK); glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_LINE_SMOOTH); glEnable(GL_POINT_SMOOTH); - glClearColor(0.0f, 0.0f, 0.0f, 0.0f); - glClear(GL_COLOR_BUFFER_BIT); glLineStipple(2, 0xAAAA); - if (fPM == nullptr) - fPM = new projectM(kSettings); // std::string("/usr/share/projectM/config.inp")); - - fPM->projectM_resetGL(width, height); + if (fPM != nullptr) + fPM->projectM_resetGL(width, height); } // -----------------------------------------------------------------------