👋 only print opengl errors if errors actually occurred. also fixed building on gcc
This commit is contained in:
parent
176c79bada
commit
fa5042902c
@ -693,8 +693,6 @@ void OpenGl20Renderer::GlRenderBuffer::set(List<RenderPrimitive> primitives) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void OpenGl20Renderer::logGlErrorSummary(String prefix) {
|
void OpenGl20Renderer::logGlErrorSummary(String prefix) {
|
||||||
prefix += ": ";
|
|
||||||
Logger::error(prefix.utf8Ptr());
|
|
||||||
List<GLenum> errors;
|
List<GLenum> errors;
|
||||||
while (GLenum error = glGetError())
|
while (GLenum error = glGetError())
|
||||||
errors.append(error);
|
errors.append(error);
|
||||||
|
@ -28,9 +28,9 @@ String const& FontTextureGroup::activeFont() {
|
|||||||
return m_fontName;
|
return m_fontName;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FontTextureGroup::addFont(FontPtr const& font, String const& name, bool default) {
|
void FontTextureGroup::addFont(FontPtr const& font, String const& name, bool isDefault) {
|
||||||
m_fonts[name] = font;
|
m_fonts[name] = font;
|
||||||
if (default)
|
if (isDefault)
|
||||||
m_defaultFont = m_font = font;
|
m_defaultFont = m_font = font;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ public:
|
|||||||
// Switches the current font
|
// Switches the current font
|
||||||
void switchFont(String const& font);
|
void switchFont(String const& font);
|
||||||
String const& activeFont();
|
String const& activeFont();
|
||||||
void addFont(FontPtr const& font, String const& name, bool default = false);
|
void addFont(FontPtr const& font, String const& name, bool isDefault = false);
|
||||||
void clearFonts();
|
void clearFonts();
|
||||||
private:
|
private:
|
||||||
StringMap<FontPtr> m_fonts;
|
StringMap<FontPtr> m_fonts;
|
||||||
|
Loading…
Reference in New Issue
Block a user