DXGL r136 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r135‎ | r136 | r137 >
Date:13:31, 14 April 2012
Author:admin
Status:new
Tags:
Comment:
Add texcoord vertex attrib arrays to _DrawPrimitives internal function
Modified paths:
  • /ddraw/glRenderer.cpp (modified) (history)

Diff [purge]

Index: ddraw/glRenderer.cpp
@@ -1067,7 +1067,24 @@
10681068 {
10691069 switch(texformats[i])
10701070 {
1071 -
 1071+ case -1: // Null
 1072+ break;
 1073+ case 0: // st
 1074+ glEnableVertexAttribArray(prog.attribs[i+18]);
 1075+ glVertexAttribPointer(prog.attribs[i+18],2,GL_FLOAT,false,vertices[i+10].stride,vertices[i+10].data);
 1076+ break;
 1077+ case 1: // str
 1078+ glEnableVertexAttribArray(prog.attribs[i+26]);
 1079+ glVertexAttribPointer(prog.attribs[i+26],3,GL_FLOAT,false,vertices[i+10].stride,vertices[i+10].data);
 1080+ break;
 1081+ case 2: // strq
 1082+ glEnableVertexAttribArray(prog.attribs[i+34]);
 1083+ glVertexAttribPointer(prog.attribs[i+34],4,GL_FLOAT,false,vertices[i+10].stride,vertices[i+10].data);
 1084+ break;
 1085+ case 3: // s
 1086+ glEnableVertexAttribArray(prog.attribs[i+10]);
 1087+ glVertexAttribPointer(prog.attribs[i+10],1,GL_FLOAT,false,vertices[i+10].stride,vertices[i+10].data);
 1088+ break;
10721089 }
10731090
10741091 }