-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10989 from m0dB/qopengl_renderers
qopenglwindow-based replacement of qglwidget, full glsl shader based waveforms, vumeters and spinnies
- Loading branch information
Showing
150 changed files
with
6,391 additions
and
1,904 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#include "shaders/endoftrackshader.h" | ||
|
||
using namespace mixxx; | ||
|
||
void EndOfTrackShader::init() { | ||
QString vertexShaderCode = QStringLiteral(R"--( | ||
attribute vec4 position; | ||
attribute float gradient; | ||
varying float vgradient; | ||
void main() | ||
{ | ||
vgradient = gradient; | ||
gl_Position = position; | ||
} | ||
)--"); | ||
|
||
QString fragmentShaderCode = QStringLiteral(R"--( | ||
uniform vec4 color; | ||
varying float vgradient; | ||
void main() | ||
{ | ||
float minAlpha = 0.5 * color.w; | ||
float maxAlpha = 0.83 * color.w; | ||
gl_FragColor = vec4(color.xyz, mix(minAlpha, maxAlpha, max(0.,vgradient))); | ||
} | ||
)--"); | ||
|
||
load(vertexShaderCode, fragmentShaderCode); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#pragma once | ||
|
||
#include "shaders/shader.h" | ||
|
||
namespace mixxx { | ||
class EndOfTrackShader; | ||
} | ||
|
||
class mixxx::EndOfTrackShader : public mixxx::Shader { | ||
public: | ||
EndOfTrackShader() = default; | ||
~EndOfTrackShader() = default; | ||
void init(); | ||
|
||
private: | ||
DISALLOW_COPY_AND_ASSIGN(EndOfTrackShader) | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#include "shaders/rgbashader.h" | ||
|
||
using namespace mixxx; | ||
|
||
void RGBAShader::init() { | ||
QString vertexShaderCode = QStringLiteral(R"--( | ||
uniform mat4 matrix; | ||
attribute vec4 position; | ||
attribute vec4 color; | ||
varying vec4 vcolor; | ||
void main() | ||
{ | ||
vcolor = color; | ||
gl_Position = matrix * position; | ||
} | ||
)--"); | ||
|
||
QString fragmentShaderCode = QStringLiteral(R"--( | ||
varying vec4 vcolor; | ||
void main() | ||
{ | ||
gl_FragColor = vcolor; | ||
} | ||
)--"); | ||
|
||
load(vertexShaderCode, fragmentShaderCode); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#pragma once | ||
|
||
#include "shaders/shader.h" | ||
|
||
namespace mixxx { | ||
class RGBAShader; | ||
} | ||
|
||
class mixxx::RGBAShader final : public mixxx::Shader { | ||
public: | ||
RGBAShader() = default; | ||
~RGBAShader() = default; | ||
void init(); | ||
|
||
private: | ||
DISALLOW_COPY_AND_ASSIGN(RGBAShader) | ||
}; |
Oops, something went wrong.