mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 18:16:45 +02:00
Getting rid of some warnings
This commit is contained in:
parent
be3cca2d04
commit
39794a7a40
1 changed files with 8 additions and 9 deletions
|
@ -57,13 +57,9 @@ void fillBuffer(QBuffer & buffer, T (&t)[N]) {
|
||||||
buffer.setData((const char*) t, N);
|
buffer.setData((const char*) t, N);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// FIXME support the shadow effect, or remove it from the API
|
// FIXME support the shadow effect, or remove it from the API
|
||||||
|
|
||||||
// FIXME figure out how to improve the anti-aliasing on the
|
// FIXME figure out how to improve the anti-aliasing on the
|
||||||
// interior of the outline fonts
|
// interior of the outline fonts
|
||||||
const char SHADER_TEXT_FS[] =
|
|
||||||
R"XXXX()XXXX";
|
|
||||||
|
|
||||||
// stores the font metrics for a single character
|
// stores the font metrics for a single character
|
||||||
struct Glyph {
|
struct Glyph {
|
||||||
|
@ -288,7 +284,7 @@ void Font::setupGL() {
|
||||||
if (!_program->addShaderFromSourceCode(QOpenGLShader::Vertex, sdf_text_vert) || //
|
if (!_program->addShaderFromSourceCode(QOpenGLShader::Vertex, sdf_text_vert) || //
|
||||||
!_program->addShaderFromSourceCode(QOpenGLShader::Fragment, sdf_text_frag) || //
|
!_program->addShaderFromSourceCode(QOpenGLShader::Fragment, sdf_text_frag) || //
|
||||||
!_program->link()) {
|
!_program->link()) {
|
||||||
qFatal(_program->log().toLocal8Bit().constData());
|
qFatal("%s", _program->log().toLocal8Bit().constData());
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<TextureVertex> vertexData;
|
std::vector<TextureVertex> vertexData;
|
||||||
|
@ -314,7 +310,6 @@ void Font::setupGL() {
|
||||||
indexData.push_back(index + 3);
|
indexData.push_back(index + 3);
|
||||||
});
|
});
|
||||||
|
|
||||||
//_vao = VertexArrayPtr(new VertexArray());
|
|
||||||
_vao = VertexArrayPtr(new QOpenGLVertexArrayObject());
|
_vao = VertexArrayPtr(new QOpenGLVertexArrayObject());
|
||||||
_vao->create();
|
_vao->create();
|
||||||
_vao->bind();
|
_vao->bind();
|
||||||
|
@ -489,9 +484,13 @@ TextRenderer* TextRenderer::getInstance(const char* family, float pointSize,
|
||||||
TextRenderer::TextRenderer(const char* family, float pointSize, int weight,
|
TextRenderer::TextRenderer(const char* family, float pointSize, int weight,
|
||||||
bool italic, EffectType effect, int effectThickness,
|
bool italic, EffectType effect, int effectThickness,
|
||||||
const QColor& color) :
|
const QColor& color) :
|
||||||
_effectType(effect), _pointSize(pointSize), _effectThickness(
|
_effectType(effect), _effectThickness(effectThickness), _pointSize(pointSize), _color(color), _font(loadFont(family)) {
|
||||||
effectThickness), _color(color), _font(loadFont(family)) {
|
if (1 != _effectThickness) {
|
||||||
|
qWarning() << "Effect thickness not current supported";
|
||||||
|
}
|
||||||
|
if (NO_EFFECT != _effectType && OUTLINE_EFFECT != _effectType) {
|
||||||
|
qWarning() << "Effect thickness not current supported";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TextRenderer::~TextRenderer() {
|
TextRenderer::~TextRenderer() {
|
||||||
|
|
Loading…
Reference in a new issue