Changeset 3597 for trunk/src/opengl/mesa/render_tmp.h
- Timestamp:
- May 23, 2000, 10:35:01 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/opengl/mesa/render_tmp.h
r2938 r3597 1 /* $Id: render_tmp.h,v 1. 1 2000-02-29 00:48:37 sandervlExp $ */1 /* $Id: render_tmp.h,v 1.2 2000-05-23 20:34:55 jeroen Exp $ */ 2 2 3 3 /* … … 40 40 #define NEED_EDGEFLAG_SETUP 0 41 41 #define EDGEFLAG_TRI(a,b,c,d,e) 42 #define EDGEFLAG_POLY_TRI_PRE(a,b,c,d) 43 #define EDGEFLAG_POLY_TRI_POST(a,b,c,d) 42 44 #define EDGEFLAG_QUAD(a,b,c,d,e) 43 45 #endif … … 49 51 50 52 static void TAG(render_vb_points)( struct vertex_buffer *VB, 51 52 53 53 GLuint start, 54 GLuint count, 55 GLuint parity ) 54 56 { 55 57 LOCAL_VARS; … … 61 63 62 64 static void TAG(render_vb_lines)( struct vertex_buffer *VB, 63 64 65 65 GLuint start, 66 GLuint count, 67 GLuint parity ) 66 68 { 67 69 GLuint j; … … 79 81 80 82 static void TAG(render_vb_line_strip)( struct vertex_buffer *VB, 81 82 83 83 GLuint start, 84 GLuint count, 85 GLuint parity ) 84 86 { 85 87 GLuint j; … … 91 93 RENDER_LINE( j-1, j ); 92 94 } 93 RESET_STIPPLE; 95 96 if (VB->Flag[count] & VERT_END) { 97 RESET_STIPPLE; 98 } 94 99 POSTFIX; 95 100 } … … 97 102 98 103 static void TAG(render_vb_line_loop)( struct vertex_buffer *VB, 99 100 101 102 { 103 GLuint i = start < VB->Start ? VB->Start : start + 1; 104 GLuint start, 105 GLuint count, 106 GLuint parity ) 107 { 108 GLuint i = start < VB->Start ? VB->Start : start + 1; 104 109 LOCAL_VARS; 105 110 (void) parity; … … 112 117 if (VB->Flag[count] & VERT_END) { 113 118 RENDER_LINE( i-1, start ); 114 }115 116 RESET_STIPPLE; 119 RESET_STIPPLE; 120 } 121 117 122 POSTFIX; 118 123 } … … 120 125 121 126 static void TAG(render_vb_triangles)( struct vertex_buffer *VB, 122 123 124 127 GLuint start, 128 GLuint count, 129 GLuint parity ) 125 130 { 126 131 GLuint j; … … 139 144 140 145 static void TAG(render_vb_tri_strip)( struct vertex_buffer *VB, 141 142 143 146 GLuint start, 147 GLuint count, 148 GLuint parity ) 144 149 { 145 150 GLuint j; … … 149 154 if (NEED_EDGEFLAG_SETUP) { 150 155 for (j=start+2;j<count;j++,parity^=1) { 151 152 153 156 EDGEFLAG_TRI( j-2, j-1, j, j, parity ); 157 RENDER_TRI( j-2, j-1, j, j, parity ); 158 RESET_STIPPLE; 154 159 } 155 160 } else { 156 161 for (j=start+2;j<count;j++,parity^=1) { 157 162 RENDER_TRI( j-2, j-1, j, j, parity ); 158 163 } 159 164 } … … 163 168 164 169 static void TAG(render_vb_tri_fan)( struct vertex_buffer *VB, 165 166 167 170 GLuint start, 171 GLuint count, 172 GLuint parity ) 168 173 { 169 174 GLuint j; … … 173 178 if (NEED_EDGEFLAG_SETUP) { 174 179 for (j=start+2;j<count;j++) { 175 176 177 180 EDGEFLAG_TRI( start, j-1, j, j, 0 ); 181 RENDER_TRI( start, j-1, j, j, 0 ); 182 RESET_STIPPLE; 178 183 } 179 184 } else { 180 185 for (j=start+2;j<count;j++) { 181 186 RENDER_TRI( start, j-1, j, j, 0 ); 182 187 } 183 188 } … … 188 193 189 194 static void TAG(render_vb_poly)( struct vertex_buffer *VB, 190 GLuint start, 191 GLuint count, 192 GLuint parity ) 193 { 194 GLuint j; 195 LOCAL_VARS; 196 (void) parity; 197 INIT(GL_POLYGON); 198 for (j=start+2;j<count;j++) { 199 RENDER_TRI( start, j-1, j, start, 0 ); 195 GLuint start, 196 GLuint count, 197 GLuint parity ) 198 { 199 GLuint j; 200 LOCAL_VARS; 201 (void) parity; 202 INIT(GL_POLYGON); 203 if (NEED_EDGEFLAG_SETUP) { 204 for (j=start+2;j<count;j++) { 205 EDGEFLAG_POLY_TRI_PRE( start, j-1, j, start ); 206 RENDER_TRI( start, j-1, j, start, 0 ); 207 EDGEFLAG_POLY_TRI_POST( start, j-1, j, start ); 208 } 209 } 210 else { 211 for (j=start+2;j<count;j++) { 212 RENDER_TRI( start, j-1, j, start, 0 ); 213 } 200 214 } 201 215 RESET_STIPPLE; … … 205 219 206 220 static void TAG(render_vb_quads)( struct vertex_buffer *VB, 207 208 209 221 GLuint start, 222 GLuint count, 223 GLuint parity ) 210 224 { 211 225 GLuint j; … … 221 235 222 236 static void TAG(render_vb_quad_strip)( struct vertex_buffer *VB, 223 224 225 237 GLuint start, 238 GLuint count, 239 GLuint parity ) 226 240 { 227 241 GLuint j; … … 231 245 if (NEED_EDGEFLAG_SETUP) { 232 246 for (j=start+3;j<count;j+=2) { 233 234 235 247 EDGEFLAG_QUAD( j-3, j-2, j, j-1, j ); 248 RENDER_QUAD( j-3, j-2, j, j-1, j ); 249 RESET_STIPPLE; 236 250 } 237 251 } else { 238 252 for (j=start+3;j<count;j+=2) { 239 253 RENDER_QUAD( j-3, j-2, j, j-1, j ); 240 254 } 241 255 } … … 244 258 245 259 static void TAG(render_vb_noop)( struct vertex_buffer *VB, 246 247 248 260 GLuint start, 261 GLuint count, 262 GLuint parity ) 249 263 { 250 264 (void) VB;
Note:
See TracChangeset
for help on using the changeset viewer.