Possible texture environment code for single-pass player-colour rendering

This was SVN commit r1754.
This commit is contained in:
Ykkrosh
2005-01-22 21:25:27 +00:00
parent 71e3b4e289
commit 113d89e148
2 changed files with 88 additions and 10 deletions
+7 -1
View File
@@ -332,7 +332,13 @@ void CModelRData::RenderModels(u32 streamflags,u32 flags)
for (i=0;i<batches.size();++i) {
const CVertexBuffer::Batch* batch=batches[i];
if (batch->m_IndexData.size()>0) {
if (streamflags & STREAM_UV0) g_Renderer.BindTexture(0,tex_id(batch->m_Texture));
if (streamflags & STREAM_UV0)
{
// TODO: If not doing player-colours, only bind this to
// the first texture unit
g_Renderer.BindTexture(0,tex_id(batch->m_Texture));
g_Renderer.BindTexture(1,tex_id(batch->m_Texture));
}
for (uint j=0;j<batch->m_IndexData.size();j++) {
glDrawElements(GL_TRIANGLES,(GLsizei)batch->m_IndexData[j].first,GL_UNSIGNED_SHORT,batch->m_IndexData[j].second);
g_Renderer.m_Stats.m_DrawCalls++;