Clementine-audio-player-Mac.../src/analyzers/glanalyzer2.h

79 lines
2.0 KiB
C
Raw Normal View History

/* This file is part of Clementine.
Copyright 2004, Enrico Ros <eros.kde@email.it>
Copyright 2009, David Sansome <davidsansome@gmail.com>
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
Copyright 2014, John Maguire <john.maguire@gmail.com>
2009-12-24 20:16:07 +01:00
Clementine is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
2009-12-24 20:16:07 +01:00
Clementine is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
*/
/* Original Author: Enrico Ros <eros.kde@email.it> 2004
*/
#ifndef ANALYZERS_GLANALYZER2_H_
#define ANALYZERS_GLANALYZER2_H_
2009-12-24 20:16:07 +01:00
#include <config.h>
#ifdef HAVE_QGLWIDGET
#include <qptrlist.h>
2020-09-18 16:15:19 +02:00
#include <qstring.h>
#include "analyzerbase.h"
2009-12-24 20:16:07 +01:00
class GLAnalyzer2 : public Analyzer::Base3D {
public:
explicit GLAnalyzer2(QWidget*);
~GLAnalyzer2();
void analyze(const Scope&);
void paused();
2009-12-24 20:16:07 +01:00
protected:
void initializeGL();
void resizeGL(int w, int h);
void paintGL();
2009-12-24 20:16:07 +01:00
private:
struct ShowProperties {
2009-12-24 20:16:07 +01:00
bool paused;
double timeStamp;
double dT;
double pauseTimer;
float rotDegrees;
} show;
2009-12-24 20:16:07 +01:00
struct FrameProperties {
2009-12-24 20:16:07 +01:00
float energy;
float dEnergy;
float meanBand;
float rotDegrees;
bool silence;
} frame;
2009-12-24 20:16:07 +01:00
GLuint dotTexture;
GLuint w1Texture;
GLuint w2Texture;
float unitX, unitY;
2009-12-24 20:16:07 +01:00
void drawDot(float x, float y, float size);
void drawFullDot(float r, float g, float b, float a);
void setTextureMatrix(float rot, float scale);
2009-12-24 20:16:07 +01:00
bool loadTexture(QString file, GLuint& textureID);
void freeTexture(GLuint& textureID);
2009-12-24 20:16:07 +01:00
};
#endif
#endif // ANALYZERS_GLANALYZER2_H_