1
0
forked from mirrors/0ad

Add a list of statically-constructed CStrIntern strings

Switch all the constant strings in graphics code to use the new
variables.
This avoids the cost of instantiating CStrInterns at runtime every
frame.

This was SVN commit r13906.
This commit is contained in:
Ykkrosh
2013-09-29 13:19:52 +00:00
parent 08f431fa0d
commit 994ebd9836
40 changed files with 451 additions and 308 deletions
+3 -3
View File
@@ -41,9 +41,9 @@ void CTexturedLineRData::Render(const SOverlayTexturedLine& line, const CShaderP
const int streamFlags = shader->GetStreamFlags();
shader->BindTexture("baseTex", line.m_TextureBase->GetHandle());
shader->BindTexture("maskTex", line.m_TextureMask->GetHandle());
shader->Uniform("objectColor", line.m_Color);
shader->BindTexture(str_baseTex, line.m_TextureBase->GetHandle());
shader->BindTexture(str_maskTex, line.m_TextureMask->GetHandle());
shader->Uniform(str_objectColor, line.m_Color);
GLsizei stride = sizeof(CTexturedLineRData::SVertex);
CTexturedLineRData::SVertex* vertexBase = reinterpret_cast<CTexturedLineRData::SVertex*>(m_VB->m_Owner->Bind());