ReactOS 0.4.15-dev-7788-g1ad9096
vbrender.h File Reference
#include "types.h"
Include dependency graph for vbrender.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void gl_render_vb (GLcontext *ctx, GLboolean alldone)
 
void gl_reset_vb (GLcontext *ctx, GLboolean allDone)
 

Function Documentation

◆ gl_render_vb()

void gl_render_vb ( GLcontext ctx,
GLboolean  alldone 
)

Definition at line 774 of file vbrender.c.

775{
776 struct vertex_buffer *VB = ctx->VB;
777 GLuint vlist[VB_SIZE];
778
779 switch (ctx->Primitive) {
780 case GL_POINTS:
782 (*ctx->Driver.PointsFunc)( ctx, 0, VB->Count-1 );
783 END_PROFILE( ctx->PointTime, ctx->PointCount, VB->Count )
784 break;
785
786 case GL_LINES:
787 if (VB->ClipOrMask) {
788 GLuint i;
789 for (i=1;i<VB->Count;i+=2) {
790 if (VB->ClipMask[i-1] | VB->ClipMask[i]) {
791 render_clipped_line( ctx, i-1, i );
792 }
793 else {
795 (*ctx->Driver.LineFunc)( ctx, i-1, i, i );
796 END_PROFILE( ctx->LineTime, ctx->LineCount, 1 )
797 }
798 ctx->StippleCounter = 0;
799 }
800 }
801 else {
802 GLuint i;
803 for (i=1;i<VB->Count;i+=2) {
805 (*ctx->Driver.LineFunc)( ctx, i-1, i, i );
806 END_PROFILE( ctx->LineTime, ctx->LineCount, 1 )
807 ctx->StippleCounter = 0;
808 }
809 }
810 break;
811
812 case GL_LINE_STRIP:
813 if (VB->ClipOrMask) {
814 GLuint i;
815 for (i=1;i<VB->Count;i++) {
816 if (VB->ClipMask[i-1] | VB->ClipMask[i]) {
817 render_clipped_line( ctx, i-1, i );
818 }
819 else {
821 (*ctx->Driver.LineFunc)( ctx, i-1, i, i );
822 END_PROFILE( ctx->LineTime, ctx->LineCount, 1 )
823 }
824 }
825 }
826 else {
827 /* no clipping needed */
828 GLuint i;
829 for (i=1;i<VB->Count;i++) {
831 (*ctx->Driver.LineFunc)( ctx, i-1, i, i );
832 END_PROFILE( ctx->LineTime, ctx->LineCount, 1 )
833 }
834 }
835 break;
836
837 case GL_LINE_LOOP:
838 {
839 GLuint i;
840 if (VB->Start==0) {
841 i = 1; /* start at 0th vertex */
842 }
843 else {
844 i = 2; /* skip first vertex, we're saving it until glEnd */
845 }
846 while (i<VB->Count) {
847 if (VB->ClipMask[i-1] | VB->ClipMask[i]) {
848 render_clipped_line( ctx, i-1, i );
849 }
850 else {
852 (*ctx->Driver.LineFunc)( ctx, i-1, i, i );
853 END_PROFILE( ctx->LineTime, ctx->LineCount, 1 )
854 }
855 i++;
856 }
857 }
858 break;
859
860 case GL_TRIANGLES:
861 if (VB->ClipOrMask) {
862 GLuint i;
863 for (i=2;i<VB->Count;i+=3) {
864 if (VB->ClipMask[i-2] & VB->ClipMask[i-1]
865 & VB->ClipMask[i] & CLIP_ALL_BITS) {
866 /* all points clipped by common plane */
867 continue;
868 }
869 else if (VB->ClipMask[i-2] | VB->ClipMask[i-1] | VB->ClipMask[i]) {
870 vlist[0] = i-2;
871 vlist[1] = i-1;
872 vlist[2] = i-0;
873 render_clipped_polygon( ctx, 3, vlist );
874 }
875 else {
876 if (ctx->DirectTriangles) {
878 (*ctx->Driver.TriangleFunc)( ctx, i-2, i-1, i, i );
879 END_PROFILE( ctx->PolygonTime, ctx->PolygonCount, 1 )
880 }
881 else {
882 render_triangle( ctx, i-2, i-1, i, i );
883 }
884 }
885 }
886 }
887 else {
888 /* no clipping needed */
889 GLuint i;
890 if (ctx->DirectTriangles) {
891 for (i=2;i<VB->Count;i+=3) {
893 (*ctx->Driver.TriangleFunc)( ctx, i-2, i-1, i, i );
894 END_PROFILE( ctx->PolygonTime, ctx->PolygonCount, 1 )
895 }
896 }
897 else {
898 for (i=2;i<VB->Count;i+=3) {
899 render_triangle( ctx, i-2, i-1, i, i );
900 }
901 }
902 }
903 break;
904
906 if (VB->ClipOrMask) {
907 GLuint i;
908 for (i=2;i<VB->Count;i++) {
909 if (VB->ClipMask[i-2] & VB->ClipMask[i-1]
910 & VB->ClipMask[i] & CLIP_ALL_BITS) {
911 /* all points clipped by common plane */
912 continue;
913 }
914 else if (VB->ClipMask[i-2] | VB->ClipMask[i-1] | VB->ClipMask[i]) {
915 if (i&1) {
916 /* reverse vertex order */
917 vlist[0] = i-1;
918 vlist[1] = i-2;
919 vlist[2] = i-0;
920 render_clipped_polygon( ctx, 3, vlist );
921 }
922 else {
923 vlist[0] = i-2;
924 vlist[1] = i-1;
925 vlist[2] = i-0;
926 render_clipped_polygon( ctx, 3, vlist );
927 }
928 }
929 else {
930 if (ctx->DirectTriangles) {
932 (*ctx->Driver.TriangleFunc)( ctx, i-2, i-1, i, i );
933 END_PROFILE( ctx->PolygonTime, ctx->PolygonCount, 1 )
934 }
935 else {
936 if (i&1)
937 render_triangle( ctx, i, i-1, i-2, i );
938 else
939 render_triangle( ctx, i-2, i-1, i, i );
940 }
941 }
942 }
943 }
944 else {
945 /* no vertices were clipped */
946 GLuint i;
947 if (ctx->DirectTriangles) {
948 for (i=2;i<VB->Count;i++) {
950 (*ctx->Driver.TriangleFunc)( ctx, i-2, i-1, i, i );
951 END_PROFILE( ctx->PolygonTime, ctx->PolygonCount, 1 )
952 }
953 }
954 else {
955 for (i=2;i<VB->Count;i++) {
956 if (i&1)
957 render_triangle( ctx, i, i-1, i-2, i );
958 else
959 render_triangle( ctx, i-2, i-1, i, i );
960 }
961 }
962 }
963 break;
964
965 case GL_TRIANGLE_FAN:
966 if (VB->ClipOrMask) {
967 GLuint i;
968 for (i=2;i<VB->Count;i++) {
969 if (VB->ClipMask[0] & VB->ClipMask[i-1] & VB->ClipMask[i]
970 & CLIP_ALL_BITS) {
971 /* all points clipped by common plane */
972 continue;
973 }
974 else if (VB->ClipMask[0] | VB->ClipMask[i-1] | VB->ClipMask[i]) {
975 vlist[0] = 0;
976 vlist[1] = i-1;
977 vlist[2] = i;
978 render_clipped_polygon( ctx, 3, vlist );
979 }
980 else {
981 if (ctx->DirectTriangles) {
983 (*ctx->Driver.TriangleFunc)( ctx, 0, i-1, i, i );
984 END_PROFILE( ctx->PolygonTime, ctx->PolygonCount, 1 )
985 }
986 else {
987 render_triangle( ctx, 0, i-1, i, i );
988 }
989 }
990 }
991 }
992 else {
993 /* no clipping needed */
994 GLuint i;
995 if (ctx->DirectTriangles) {
996 for (i=2;i<VB->Count;i++) {
998 (*ctx->Driver.TriangleFunc)( ctx, 0, i-1, i, i );
999 END_PROFILE( ctx->PolygonTime, ctx->PolygonCount, 1 )
1000 }
1001 }
1002 else {
1003 for (i=2;i<VB->Count;i++) {
1004 render_triangle( ctx, 0, i-1, i, i );
1005 }
1006 }
1007 }
1008 break;
1009
1010 case GL_QUADS:
1011 if (VB->ClipOrMask) {
1012 GLuint i;
1013 for (i=3;i<VB->Count;i+=4) {
1014 if (VB->ClipMask[i-3] & VB->ClipMask[i-2]
1015 & VB->ClipMask[i-1] & VB->ClipMask[i] & CLIP_ALL_BITS) {
1016 /* all points clipped by common plane */
1017 continue;
1018 }
1019 else if (VB->ClipMask[i-3] | VB->ClipMask[i-2]
1020 | VB->ClipMask[i-1] | VB->ClipMask[i]) {
1021 vlist[0] = i-3;
1022 vlist[1] = i-2;
1023 vlist[2] = i-1;
1024 vlist[3] = i-0;
1025 render_clipped_polygon( ctx, 4, vlist );
1026 }
1027 else {
1028 if (ctx->DirectTriangles) {
1030 (*ctx->Driver.QuadFunc)( ctx, i-3, i-2, i-1, i, i );
1031 END_PROFILE( ctx->PolygonTime, ctx->PolygonCount, 2 )
1032 }
1033 else {
1034 render_quad( ctx, i-3, i-2, i-1, i, i );
1035 }
1036 }
1037 }
1038 }
1039 else {
1040 /* no vertices were clipped */
1041 GLuint i;
1042 if (ctx->DirectTriangles) {
1043 for (i=3;i<VB->Count;i+=4) {
1045 (*ctx->Driver.QuadFunc)( ctx, i-3, i-2, i-1, i, i );
1046 END_PROFILE( ctx->PolygonTime, ctx->PolygonCount, 2 )
1047 }
1048 }
1049 else {
1050 for (i=3;i<VB->Count;i+=4) {
1051 render_quad( ctx, i-3, i-2, i-1, i, i );
1052 }
1053 }
1054 }
1055 break;
1056
1057 case GL_QUAD_STRIP:
1058 if (VB->ClipOrMask) {
1059 GLuint i;
1060 for (i=3;i<VB->Count;i+=2) {
1061 if (VB->ClipMask[i-2] & VB->ClipMask[i-3]
1062 & VB->ClipMask[i-1] & VB->ClipMask[i] & CLIP_ALL_BITS) {
1063 /* all points clipped by common plane */
1064 continue;
1065 }
1066 else if (VB->ClipMask[i-2] | VB->ClipMask[i-3]
1067 | VB->ClipMask[i-1] | VB->ClipMask[i]) {
1068 vlist[0] = i-1;
1069 vlist[1] = i-3;
1070 vlist[2] = i-2;
1071 vlist[3] = i-0;
1072 render_clipped_polygon( ctx, 4, vlist );
1073 }
1074 else {
1075 if (ctx->DirectTriangles) {
1077 (*ctx->Driver.QuadFunc)( ctx, i-3, i-2, i, i-1, i );
1078 END_PROFILE( ctx->PolygonTime, ctx->PolygonCount, 2 )
1079 }
1080 else {
1081 render_quad( ctx, i-3, i-2, i, i-1, i );
1082 }
1083 }
1084 }
1085 }
1086 else {
1087 /* no clipping needed */
1088 GLuint i;
1089 if (ctx->DirectTriangles) {
1090 for (i=3;i<VB->Count;i+=2) {
1092 (*ctx->Driver.QuadFunc)( ctx, i-3, i-2, i, i-1, i );
1093 END_PROFILE( ctx->PolygonTime, ctx->PolygonCount, 2 )
1094 }
1095 }
1096 else {
1097 for (i=3;i<VB->Count;i+=2) {
1098 render_quad( ctx, i-3, i-2, i, i-1, i );
1099 }
1100 }
1101 }
1102 break;
1103
1104 case GL_POLYGON:
1105 if (VB->Count>2) {
1106 if (VB->ClipAndMask & CLIP_ALL_BITS) {
1107 /* all points clipped by common plane, draw nothing */
1108 break;
1109 }
1110 if (VB->ClipOrMask) {
1111 /* need clipping */
1112 GLuint i;
1113 for (i=0;i<VB->Count;i++) {
1114 vlist[i] = i;
1115 }
1116 render_clipped_polygon( ctx, VB->Count, vlist );
1117 }
1118 else {
1119 /* no clipping needed */
1120 static GLuint const_vlist[VB_SIZE];
1121 static GLboolean initFlag = GL_TRUE;
1122 if (initFlag) {
1123 /* vertex list always the same, never changes */
1124 GLuint i;
1125 for (i=0;i<VB_SIZE;i++) {
1126 const_vlist[i] = i;
1127 }
1128 initFlag = GL_FALSE;
1129 }
1130 render_polygon( ctx, VB->Count, const_vlist );
1131 }
1132 }
1133 break;
1134
1135 default:
1136 /* should never get here */
1137 gl_problem( ctx, "invalid mode in gl_render_vb" );
1138 }
1139
1140 gl_reset_vb( ctx, allDone );
1141}
void gl_problem(const GLcontext *ctx, const char *s)
Definition: context.c:1394
#define GL_TRUE
Definition: gl.h:174
#define GL_QUADS
Definition: gl.h:197
#define GL_TRIANGLE_FAN
Definition: gl.h:196
#define GL_LINE_STRIP
Definition: gl.h:193
#define GL_LINES
Definition: gl.h:191
#define GL_TRIANGLES
Definition: gl.h:194
unsigned int GLuint
Definition: gl.h:159
#define GL_POINTS
Definition: gl.h:190
#define GL_FALSE
Definition: gl.h:173
#define GL_POLYGON
Definition: gl.h:199
#define GL_LINE_LOOP
Definition: gl.h:192
#define GL_TRIANGLE_STRIP
Definition: gl.h:195
unsigned char GLboolean
Definition: gl.h:151
#define GL_QUAD_STRIP
Definition: gl.h:198
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
if(dx< 0)
Definition: linetemp.h:194
int Count
Definition: noreturn.cpp:7
GLubyte ClipOrMask
Definition: vb.h:120
struct vertex_buffer * VB
Definition: tritemp.h:139
#define VB_SIZE
Definition: vb.h:89
static void render_clipped_line(GLcontext *ctx, GLuint v1, GLuint v2)
Definition: vbrender.c:149
static void render_polygon(GLcontext *ctx, GLuint n, GLuint vlist[])
Definition: vbrender.c:362
#define START_PROFILE
Definition: vbrender.c:138
static void render_triangle(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint pv)
Definition: vbrender.c:601
void gl_reset_vb(GLcontext *ctx, GLboolean allDone)
Definition: vbrender.c:1155
#define END_PROFILE(TIMER, COUNTER, INCR)
Definition: vbrender.c:139
#define CLIP_ALL_BITS
Definition: vbrender.c:1144
static void render_clipped_polygon(GLcontext *ctx, GLuint n, GLuint vlist[])
Definition: vbrender.c:442
static void render_quad(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3, GLuint pv)
Definition: vbrender.c:670

Referenced by gl_transform_vb_part2().

◆ gl_reset_vb()

void gl_reset_vb ( GLcontext ctx,
GLboolean  allDone 
)

Definition at line 1155 of file vbrender.c.

1156{
1157 struct vertex_buffer *VB = ctx->VB;
1158
1159 /* save a few VB values for the end of this function */
1160 int oldCount = VB->Count;
1161 GLubyte clipOrMask = VB->ClipOrMask;
1162 GLboolean monoMaterial = VB->MonoMaterial;
1163 GLuint vertexSizeMask = VB->VertexSizeMask;
1164
1165 /* Special case for GL_LINE_LOOP */
1166 if (ctx->Primitive==GL_LINE_LOOP && allDone) {
1167 if (VB->ClipMask[VB->Count-1] | VB->ClipMask[0]) {
1168 render_clipped_line( ctx, VB->Count-1, 0 );
1169 }
1170 else {
1172 (*ctx->Driver.LineFunc)( ctx, VB->Count-1, 0, 0 );
1173 END_PROFILE( ctx->LineTime, ctx->LineCount, 1 )
1174 }
1175 }
1176
1177 if (allDone) {
1178 /* glEnd() was called so reset Vertex Buffer to default, empty state */
1179 VB->Start = VB->Count = 0;
1180 VB->ClipOrMask = 0;
1181 VB->ClipAndMask = CLIP_ALL_BITS;
1182 VB->MonoMaterial = GL_TRUE;
1183 VB->MonoNormal = GL_TRUE;
1184 VB->MonoColor = GL_TRUE;
1185 VB->VertexSizeMask = VERTEX3_BIT;
1186 if (VB->TexCoordSize!=2) {
1187 GLint i, n = VB->Count;
1188 for (i=0;i<n;i++) {
1189 VB->TexCoord[i][2] = 0.0F;
1190 VB->TexCoord[i][3] = 1.0F;
1191 }
1192 }
1193 if (ctx->Current.TexCoord[2]==0.0F && ctx->Current.TexCoord[3]==1.0F) {
1194 VB->TexCoordSize = 2;
1195 }
1196 else {
1197 VB->TexCoordSize = 4;
1198 }
1199 }
1200 else {
1201 /* The vertex buffer was filled but we didn't get a glEnd() call yet
1202 * have to "re-cycle" the vertex buffer.
1203 */
1204 switch (ctx->Primitive) {
1205 case GL_POINTS:
1206 ASSERT(VB->Start==0);
1207 VB->Start = VB->Count = 0;
1208 VB->ClipOrMask = 0;
1209 VB->ClipAndMask = CLIP_ALL_BITS;
1210 VB->MonoMaterial = GL_TRUE;
1211 VB->MonoNormal = GL_TRUE;
1212 break;
1213 case GL_LINES:
1214 ASSERT(VB->Start==0);
1215 VB->Start = VB->Count = 0;
1216 VB->ClipOrMask = 0;
1217 VB->ClipAndMask = CLIP_ALL_BITS;
1218 VB->MonoMaterial = GL_TRUE;
1219 VB->MonoNormal = GL_TRUE;
1220 break;
1221 case GL_LINE_STRIP:
1222 copy_vertex( VB, 0, VB->Count-1 ); /* copy last vertex to front */
1223 VB->Start = VB->Count = 1;
1224 VB->ClipOrMask = VB->ClipMask[0];
1225 VB->ClipAndMask = VB->ClipMask[0];
1226 VB->MonoMaterial = VB->MaterialMask[0] ? GL_FALSE : GL_TRUE;
1227 break;
1228 case GL_LINE_LOOP:
1229 ASSERT(VB->Count==VB_MAX);
1230 copy_vertex( VB, 1, VB_MAX-1 );
1231 VB->Start = VB->Count = 2;
1232 VB->ClipOrMask = VB->ClipMask[0] | VB->ClipMask[1];
1233 VB->ClipAndMask = VB->ClipMask[0] & VB->ClipMask[1];
1234 VB->MonoMaterial = !(VB->MaterialMask[0] | VB->MaterialMask[1]);
1235 break;
1236 case GL_TRIANGLES:
1237 ASSERT(VB->Start==0);
1238 VB->Start = VB->Count = 0;
1239 VB->ClipOrMask = 0;
1240 VB->ClipAndMask = CLIP_ALL_BITS;
1241 VB->MonoMaterial = GL_TRUE;
1242 VB->MonoNormal = GL_TRUE;
1243 break;
1244 case GL_TRIANGLE_STRIP:
1245 copy_vertex( VB, 0, VB_MAX-2 );
1246 copy_vertex( VB, 1, VB_MAX-1 );
1247 VB->Start = VB->Count = 2;
1248 VB->ClipOrMask = VB->ClipMask[0] | VB->ClipMask[1];
1249 VB->ClipAndMask = VB->ClipMask[0] & VB->ClipMask[1];
1250 VB->MonoMaterial = !(VB->MaterialMask[0] | VB->MaterialMask[1]);
1251 break;
1252 case GL_TRIANGLE_FAN:
1253 copy_vertex( VB, 1, VB_MAX-1 );
1254 VB->Start = VB->Count = 2;
1255 VB->ClipOrMask = VB->ClipMask[0] | VB->ClipMask[1];
1256 VB->ClipAndMask = VB->ClipMask[0] & VB->ClipMask[1];
1257 VB->MonoMaterial = !(VB->MaterialMask[0] | VB->MaterialMask[1]);
1258 break;
1259 case GL_QUADS:
1260 ASSERT(VB->Start==0);
1261 VB->Start = VB->Count = 0;
1262 VB->ClipOrMask = 0;
1263 VB->ClipAndMask = CLIP_ALL_BITS;
1264 VB->MonoMaterial = GL_TRUE;
1265 VB->MonoNormal = GL_TRUE;
1266 break;
1267 case GL_QUAD_STRIP:
1268 copy_vertex( VB, 0, VB_MAX-2 );
1269 copy_vertex( VB, 1, VB_MAX-1 );
1270 VB->Start = VB->Count = 2;
1271 VB->ClipOrMask = VB->ClipMask[0] | VB->ClipMask[1];
1272 VB->ClipAndMask = VB->ClipMask[0] & VB->ClipMask[1];
1273 VB->MonoMaterial = !(VB->MaterialMask[0] | VB->MaterialMask[1]);
1274 break;
1275 case GL_POLYGON:
1276 copy_vertex( VB, 1, VB_MAX-1 );
1277 VB->Start = VB->Count = 2;
1278 VB->ClipOrMask = VB->ClipMask[0] | VB->ClipMask[1];
1279 VB->ClipAndMask = VB->ClipMask[0] & VB->ClipMask[1];
1280 VB->MonoMaterial = !(VB->MaterialMask[0] | VB->MaterialMask[1]);
1281 break;
1282 default:
1283 /* should never get here */
1284 gl_problem(ctx, "Bad primitive type in gl_reset_vb()");
1285 }
1286 }
1287
1288 if (clipOrMask) {
1289 /* reset clip masks to zero */
1290 MEMSET( VB->ClipMask + VB->Start, 0,
1291 (oldCount - VB->Start) * sizeof(VB->ClipMask[0]) );
1292 }
1293
1294 if (!monoMaterial) {
1295 /* reset material masks to zero */
1296 MEMSET( VB->MaterialMask + VB->Start, 0,
1297 (oldCount - VB->Start) * sizeof(VB->MaterialMask[0]) );
1299 }
1300
1301 if (vertexSizeMask!=VERTEX3_BIT) {
1302 /* reset object W coords to one */
1303 GLint i, n;
1304 GLfloat (*obj)[4] = VB->Obj + VB->Start;
1305 n = oldCount - VB->Start;
1306 for (i=0; i<n; i++) {
1307 obj[i][3] = 1.0F;
1308 }
1309 }
1310}
unsigned char GLubyte
Definition: gl.h:157
float GLfloat
Definition: gl.h:161
int GLint
Definition: gl.h:156
GLdouble n
Definition: glext.h:7729
#define MEMSET(DST, VAL, N)
Definition: macros.h:241
#define ASSERT(a)
Definition: mode.c:44
void gl_update_lighting(GLcontext *ctx)
Definition: light.c:770
#define VB_MAX
Definition: vb.h:86
#define VERTEX3_BIT
Definition: vb.h:94
static void copy_vertex(struct vertex_buffer *vb, GLuint dst, GLuint src)
Definition: vbrender.c:742

Referenced by gl_render_vb(), and gl_transform_vb_part2().