mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-25 20:26:31 +00:00
Possible texture environment code for single-pass player-colour rendering
This was SVN commit r1754.
This commit is contained in:
@@ -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++;
|
||||
|
||||
Reference in New Issue
Block a user