Changeset 2962 for trunk/src/opengl/mesa/api2.c
- Timestamp:
- Mar 1, 2000, 7:50:02 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/opengl/mesa/api2.c
r2938 r2962 1 /* $Id: api2.c,v 1. 1 2000-02-29 00:49:58 sandervlExp $ */1 /* $Id: api2.c,v 1.2 2000-03-01 18:49:23 jeroen Exp $ */ 2 2 3 3 /* … … 37 37 #endif 38 38 #include "api.h" 39 #include "types.h" 39 40 #include "context.h" 40 41 #include "varray.h" … … 43 44 #include "matrix.h" 44 45 #include "teximage.h" 45 #include "types.h"46 46 #include "vb.h" 47 47 #endif … … 663 663 } 664 664 665 #define TEXCOORD1(s) 666 { 667 GLuint count; 668 GLfloat *tc; 669 GET_IMMEDIATE; 670 count = IM->Count; 671 IM->Flag[count] |= VERT_TEX0_1; 672 tc = IM->TexCoord[0][count]; 673 ASSIGN_4V(tc,s,0,0,1); 674 } 675 676 #define TEXCOORD2(s,t) 677 { 678 GLuint count; 679 GLfloat *tc; 680 GET_IMMEDIATE; 681 count = IM->Count; 682 IM->Flag[count] |= VERT_TEX0_12; 683 tc = IM->TexCoord[0][count]; 684 ASSIGN_4V(tc, s,t,0,1); 685 } 686 687 #define TEXCOORD3(s,t,u) 688 { 689 GLuint count; 690 GLfloat *tc; 691 GET_IMMEDIATE; 692 count = IM->Count; 693 IM->Flag[count] |= VERT_TEX0_123; 694 tc = IM->TexCoord[0][count]; 695 ASSIGN_4V(tc, s,t,u,1); 696 } 697 698 #define TEXCOORD4(s,t,u,v) 699 { 700 GLuint count; 701 GLfloat *tc; 702 GET_IMMEDIATE; 703 count = IM->Count; 704 IM->Flag[count] |= VERT_TEX0_1234; 705 tc = IM->TexCoord[0][count]; 706 ASSIGN_4V(tc, s,t,u,v); 665 #define TEXCOORD1(s) \ 666 { \ 667 GLuint count; \ 668 GLfloat *tc; \ 669 GET_IMMEDIATE; \ 670 count = IM->Count; \ 671 IM->Flag[count] |= VERT_TEX0_1; \ 672 tc = IM->TexCoord[0][count]; \ 673 ASSIGN_4V(tc,s,0,0,1); \ 674 } 675 676 #define TEXCOORD2(s,t) \ 677 { \ 678 GLuint count; \ 679 GLfloat *tc; \ 680 GET_IMMEDIATE; \ 681 count = IM->Count; \ 682 IM->Flag[count] |= VERT_TEX0_12; \ 683 tc = IM->TexCoord[0][count]; \ 684 ASSIGN_4V(tc, s,t,0,1); \ 685 } 686 687 #define TEXCOORD3(s,t,u) \ 688 { \ 689 GLuint count; \ 690 GLfloat *tc; \ 691 GET_IMMEDIATE; \ 692 count = IM->Count; \ 693 IM->Flag[count] |= VERT_TEX0_123; \ 694 tc = IM->TexCoord[0][count]; \ 695 ASSIGN_4V(tc, s,t,u,1); \ 696 } 697 698 #define TEXCOORD4(s,t,u,v) \ 699 { \ 700 GLuint count; \ 701 GLfloat *tc; \ 702 GET_IMMEDIATE; \ 703 count = IM->Count; \ 704 IM->Flag[count] |= VERT_TEX0_1234; \ 705 tc = IM->TexCoord[0][count]; \ 706 ASSIGN_4V(tc, s,t,u,v); \ 707 707 } 708 708 … … 1146 1146 * the incoming vertices. 1147 1147 */ 1148 #define VERTEX2(IM, x,y) 1149 { 1150 GLuint count = IM->Count++; 1151 GLfloat *dest = IM->Obj[count]; 1152 IM->Flag[count] |= VERT_OBJ_2; 1153 ASSIGN_4V(dest, x, y, 0, 1); 1154 if (dest == IM->Obj[VB_MAX-1]) 1155 IM->maybe_transform_vb( IM ); 1156 } 1157 1158 #define VERTEX3(IM,x,y,z) 1159 { 1160 GLuint count = IM->Count++; 1161 GLfloat *dest = IM->Obj[count]; 1162 IM->Flag[count] |= VERT_OBJ_23; 1163 ASSIGN_4V(dest, x, y, z, 1); 1164 if (dest == IM->Obj[VB_MAX-1]) 1165 IM->maybe_transform_vb( IM ); 1166 } 1167 1168 #define VERTEX4(IM, x,y,z,w) 1169 { 1170 GLuint count = IM->Count++; 1171 GLfloat *dest = IM->Obj[count]; 1172 IM->Flag[count] |= VERT_OBJ_234; 1173 ASSIGN_4V(dest, x, y, z, w); 1174 if (dest == IM->Obj[VB_MAX-1]) 1175 IM->maybe_transform_vb( IM ); 1148 #define VERTEX2(IM, x,y) \ 1149 { \ 1150 GLuint count = IM->Count++; \ 1151 GLfloat *dest = IM->Obj[count]; \ 1152 IM->Flag[count] |= VERT_OBJ_2; \ 1153 ASSIGN_4V(dest, x, y, 0, 1); \ 1154 if (dest == IM->Obj[VB_MAX-1]) \ 1155 IM->maybe_transform_vb( IM ); \ 1156 } 1157 1158 #define VERTEX3(IM,x,y,z) \ 1159 { \ 1160 GLuint count = IM->Count++; \ 1161 GLfloat *dest = IM->Obj[count]; \ 1162 IM->Flag[count] |= VERT_OBJ_23; \ 1163 ASSIGN_4V(dest, x, y, z, 1); \ 1164 if (dest == IM->Obj[VB_MAX-1]) \ 1165 IM->maybe_transform_vb( IM ); \ 1166 } 1167 1168 #define VERTEX4(IM, x,y,z,w) \ 1169 { \ 1170 GLuint count = IM->Count++; \ 1171 GLfloat *dest = IM->Obj[count]; \ 1172 IM->Flag[count] |= VERT_OBJ_234; \ 1173 ASSIGN_4V(dest, x, y, z, w); \ 1174 if (dest == IM->Obj[VB_MAX-1]) \ 1175 IM->maybe_transform_vb( IM ); \ 1176 1176 } 1177 1177 … … 1324 1324 GET_IMMEDIATE; 1325 1325 VERTEX4( IM, 1326 1327 1326 (GLfloat) v[0], (GLfloat) v[1], 1327 (GLfloat) v[2], (GLfloat) v[3] ); 1328 1328 } 1329 1329 … … 1340 1340 GET_IMMEDIATE; 1341 1341 VERTEX4( IM, 1342 1343 1342 (GLfloat) v[0], (GLfloat) v[1], 1343 (GLfloat) v[2], (GLfloat) v[3] ); 1344 1344 } 1345 1345 … … 1349 1349 GET_IMMEDIATE; 1350 1350 VERTEX4( IM, 1351 1352 1351 (GLfloat) v[0], (GLfloat) v[1], 1352 (GLfloat) v[2], (GLfloat) v[3] ); 1353 1353 } 1354 1354
Note:
See TracChangeset
for help on using the changeset viewer.