Merge branch 'master' of github.com:supertuxkart/stk-code

This commit is contained in:
hiker 2014-10-18 23:44:11 +11:00
commit c40a8eb377
3 changed files with 5 additions and 6 deletions

View File

@ -655,7 +655,7 @@ void draw2DImage(const video::ITexture* texture, const core::rect<s32>& destRect
glGetError();
}
void draw2DVertexPrimitiveList(const void* vertices,
void draw2DVertexPrimitiveList(video::ITexture *tex, const void* vertices,
u32 vertexCount, const void* indexList, u32 primitiveCount,
video::E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType, video::E_INDEX_TYPE iType)
{
@ -680,7 +680,6 @@ void draw2DVertexPrimitiveList(const void* vertices,
glUseProgram(UIShader::Primitive2DList::getInstance()->Program);
UIShader::Primitive2DList::getInstance()->setUniforms();
const video::SOverrideMaterial &m = irr_driver->getVideoDriver()->getOverrideMaterial();
video::ITexture* tex = getUnicolorTexture(video::SColor(255, 255, 255, 255));
compressTexture(tex, false);
UIShader::Primitive2DList::getInstance()->SetTextureUnits({ getTextureGLuint(tex) });
glDrawElements(GL_TRIANGLE_FAN, primitiveCount, GL_UNSIGNED_SHORT, 0);

View File

@ -215,7 +215,7 @@ void draw2DImage(const irr::video::ITexture* texture, const irr::core::rect<s32>
const irr::core::rect<s32>& sourceRect, const irr::core::rect<s32>* clipRect,
const irr::video::SColor* const colors, bool useAlphaChannelOfTexture);
void draw2DVertexPrimitiveList(const void* vertices,
void draw2DVertexPrimitiveList(video::ITexture *t, const void* vertices,
u32 vertexCount, const void* indexList, u32 primitiveCount,
video::E_VERTEX_TYPE vType = video::EVT_STANDARD, scene::E_PRIMITIVE_TYPE pType = scene::EPT_TRIANGLES, video::E_INDEX_TYPE iType = video::EIT_16BIT);

View File

@ -506,7 +506,7 @@ void RaceGUI::drawEnergyMeter(int x, int y, const AbstractKart *kart,
m.setTexture(0, m_gauge_goal);
m.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL;
irr_driver->getVideoDriver()->setMaterial(m);
draw2DVertexPrimitiveList(vertices, count,
draw2DVertexPrimitiveList(m_gauge_goal, vertices, count,
index, count-2, video::EVT_STANDARD, scene::EPT_TRIANGLE_FAN);
}
@ -594,7 +594,7 @@ void RaceGUI::drawEnergyMeter(int x, int y, const AbstractKart *kart,
m.setTexture(0, m_gauge_full);
m.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL;
irr_driver->getVideoDriver()->setMaterial(m);
draw2DVertexPrimitiveList(vertices, count,
draw2DVertexPrimitiveList(m.getTexture(0), vertices, count,
index, count-2, video::EVT_STANDARD, scene::EPT_TRIANGLE_FAN);
}
@ -800,7 +800,7 @@ void RaceGUI::drawSpeedEnergyRank(const AbstractKart* kart,
m.setTexture(0, m_speed_bar_icon->getTexture());
m.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL;
irr_driver->getVideoDriver()->setMaterial(m);
draw2DVertexPrimitiveList(vertices, count,
draw2DVertexPrimitiveList(m_speed_bar_icon->getTexture(), vertices, count,
index, count-2, video::EVT_STANDARD, scene::EPT_TRIANGLE_FAN);
} // drawSpeedEnergyRank