-
-
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 #14188 from m0dB/rg-wr-mark
mark waveformrenderer using rendergraph
- Loading branch information
Showing
9 changed files
with
364 additions
and
277 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,50 @@ | ||
#pragma once | ||
|
||
#include <QOpenGLFunctions> | ||
#include "rendergraph/context.h" | ||
#include "rendergraph/geometrynode.h" | ||
#include "util/class.h" | ||
|
||
#include "shaders/textureshader.h" | ||
#include "util/opengltexture2d.h" | ||
namespace rendergraph { | ||
class TexturedVertexUpdater; | ||
} // namespace rendergraph | ||
|
||
namespace allshader { | ||
class DigitsRenderer; | ||
} | ||
class DigitsRenderNode; | ||
} // namespace allshader | ||
|
||
class allshader::DigitsRenderer : public QOpenGLFunctions { | ||
class allshader::DigitsRenderNode : public rendergraph::GeometryNode { | ||
public: | ||
DigitsRenderer() = default; | ||
~DigitsRenderer(); | ||
DigitsRenderNode(); | ||
~DigitsRenderNode(); | ||
|
||
void init(); | ||
void updateTexture(float fontPointSize, float maxHeight, float devicePixelRatio); | ||
float draw(const QMatrix4x4& matrix, | ||
void updateTexture(rendergraph::Context* pContext, | ||
float fontPointSize, | ||
float maxHeight, | ||
float devicePixelRatio); | ||
|
||
void update( | ||
float x, | ||
float y, | ||
const QString& s); | ||
bool multiLine, | ||
const QString& s1, | ||
const QString& s2); | ||
|
||
void clear(); | ||
|
||
float height() const; | ||
|
||
private: | ||
mixxx::TextureShader m_shader; | ||
OpenGLTexture2D m_texture; | ||
float addVertices(rendergraph::TexturedVertexUpdater& vertexUpdater, | ||
float x, | ||
float y, | ||
const QString& s); | ||
|
||
int m_penWidth; | ||
float m_offset[13]; | ||
float m_width[12]; | ||
float m_fontPointSize{}; | ||
float m_height{}; | ||
float m_maxHeight{}; | ||
float m_adjustedFontPointSize{}; | ||
DISALLOW_COPY_AND_ASSIGN(DigitsRenderer); | ||
DISALLOW_COPY_AND_ASSIGN(DigitsRenderNode); | ||
}; |
Oops, something went wrong.