improvements to skins

This commit is contained in:
Henrique Santiago
2012-06-19 05:46:49 -03:00
parent 5a048eb7ea
commit 4bdcae2f8b
74 changed files with 155 additions and 87 deletions

View File

@@ -38,6 +38,12 @@ void FontManager::terminate()
m_defaultFont = nullptr;
}
void FontManager::clearFonts()
{
m_fonts.clear();
m_defaultFont = BitmapFontPtr(new BitmapFont("emptyfont"));
}
bool FontManager::importFont(std::string fontFile)
{
try {

View File

@@ -31,6 +31,7 @@ public:
FontManager();
void terminate();
void clearFonts();
bool importFont(std::string fontFile);

View File

@@ -120,7 +120,7 @@ void PainterOGL2::drawCoords(CoordsBuffer& coordsBuffer, DrawMode drawMode)
void PainterOGL2::drawTextureCoords(CoordsBuffer& coordsBuffer, const TexturePtr& texture)
{
if(texture->isEmpty())
if(texture && texture->isEmpty())
return;
setDrawProgram(m_shaderProgram ? m_shaderProgram : m_drawTexturedProgram.get());