Changeset 3598 for trunk/src/opengl/mesa/lines.c
- Timestamp:
- May 23, 2000, 10:41:28 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/opengl/mesa/lines.c
r2962 r3598 1 /* $Id: lines.c,v 1. 2 2000-03-01 18:49:31jeroen Exp $ */1 /* $Id: lines.c,v 1.3 2000-05-23 20:40:39 jeroen Exp $ */ 2 2 3 3 /* 4 4 * Mesa 3-D graphics library 5 * Version: 3. 15 * Version: 3.3 6 6 * 7 7 * Copyright (C) 1999 Brian Paul All Rights Reserved. … … 32 32 #include "all.h" 33 33 #else 34 #ifndef XFree86Server 35 #include <assert.h> 36 #else 37 #include "GL/xf86glx.h" 38 #endif 34 #include "glheader.h" 39 35 #include "types.h" 40 36 #include "context.h" … … 51 47 52 48 53 void gl_LineWidth( GLcontext *ctx, GLfloat width ) 54 { 49 void 50 _mesa_LineWidth( GLfloat width ) 51 { 52 GET_CURRENT_CONTEXT(ctx); 55 53 if (width<=0.0) { 56 54 gl_error( ctx, GL_INVALID_VALUE, "glLineWidth" ); … … 64 62 if (width != 1.0) ctx->TriangleCaps |= DD_LINE_WIDTH; 65 63 ctx->NewState |= NEW_RASTER_OPS; 66 } 67 } 68 69 70 71 void gl_LineStipple( GLcontext *ctx, GLint factor, GLushort pattern ) 72 { 64 if (ctx->Driver.LineWidth) 65 (*ctx->Driver.LineWidth)(ctx, width); 66 } 67 } 68 69 70 71 void 72 _mesa_LineStipple( GLint factor, GLushort pattern ) 73 { 74 GET_CURRENT_CONTEXT(ctx); 73 75 ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glLineStipple"); 74 76 ctx->Line.StippleFactor = CLAMP( factor, 1, 256 ); 75 77 ctx->Line.StipplePattern = pattern; 76 78 ctx->NewState |= NEW_RASTER_OPS; 79 80 if (ctx->Driver.LineStipple) 81 ctx->Driver.LineStipple( ctx, factor, pattern ); 77 82 } 78 83 … … 123 128 #define INTERP_XY 1 124 129 125 #define PLOT(X,Y) 126 pbx[count] = X;\127 pby[count] = Y;\128 130 #define PLOT(X,Y) \ 131 pbx[count] = X; \ 132 pby[count] = Y; \ 133 count++; 129 134 130 135 #include "linetemp.h" … … 150 155 #define INTERP_Z 1 151 156 152 #define PLOT(X,Y) 153 pbx[count] = X;\154 pby[count] = Y;\155 pbz[count] = Z;\156 157 #define PLOT(X,Y) \ 158 pbx[count] = X; \ 159 pby[count] = Y; \ 160 pbz[count] = Z; \ 161 count++; 157 162 158 163 #include "linetemp.h" … … 177 182 #define INTERP_XY 1 178 183 179 #define PLOT(X,Y) 180 pbx[count] = X;\181 pby[count] = Y;\182 184 #define PLOT(X,Y) \ 185 pbx[count] = X; \ 186 pby[count] = Y; \ 187 count++; 183 188 184 189 #include "linetemp.h" … … 205 210 #define INTERP_Z 1 206 211 207 #define PLOT(X,Y) 208 pbx[count] = X;\209 pby[count] = Y;\210 pbz[count] = Z;\211 212 #define PLOT(X,Y) \ 213 pbx[count] = X; \ 214 pby[count] = Y; \ 215 pbz[count] = Z; \ 216 count++; 212 217 213 218 #include "linetemp.h" … … 232 237 #define INTERP_INDEX 1 233 238 234 #define PLOT(X,Y) 235 pbx[count] = X;\236 pby[count] = Y;\237 pbi[count] = I;\238 239 #define PLOT(X,Y) \ 240 pbx[count] = X; \ 241 pby[count] = Y; \ 242 pbi[count] = I; \ 243 count++; 239 244 240 245 #include "linetemp.h" … … 261 266 #define INTERP_INDEX 1 262 267 263 #define PLOT(X,Y) 264 pbx[count] = X;\265 pby[count] = Y;\266 pbz[count] = Z;\267 pbi[count] = I;\268 268 #define PLOT(X,Y) \ 269 pbx[count] = X; \ 270 pby[count] = Y; \ 271 pbz[count] = Z; \ 272 pbi[count] = I; \ 273 count++; 269 274 270 275 #include "linetemp.h" … … 278 283 /* Smooth-shaded, RGBA line */ 279 284 static void smooth_rgba_line( GLcontext *ctx, 280 285 GLuint vert0, GLuint vert1, GLuint pvert ) 281 286 { 282 287 GLint count = ctx->PB->count; … … 290 295 #define INTERP_ALPHA 1 291 296 292 #define PLOT(X,Y) 293 pbx[count] = X;\294 pby[count] = Y;\295 pbrgba[count][RCOMP] = FixedToInt(r0);\296 pbrgba[count][GCOMP] = FixedToInt(g0);\297 pbrgba[count][BCOMP] = FixedToInt(b0);\298 pbrgba[count][ACOMP] = FixedToInt(a0);\299 297 #define PLOT(X,Y) \ 298 pbx[count] = X; \ 299 pby[count] = Y; \ 300 pbrgba[count][RCOMP] = FixedToInt(r0); \ 301 pbrgba[count][GCOMP] = FixedToInt(g0); \ 302 pbrgba[count][BCOMP] = FixedToInt(b0); \ 303 pbrgba[count][ACOMP] = FixedToInt(a0); \ 304 count++; 300 305 301 306 #include "linetemp.h" … … 309 314 /* Smooth-shaded, RGBA line with Z interpolation/testing */ 310 315 static void smooth_rgba_z_line( GLcontext *ctx, 311 316 GLuint vert0, GLuint vert1, GLuint pvert ) 312 317 { 313 318 GLint count = ctx->PB->count; … … 323 328 #define INTERP_ALPHA 1 324 329 325 #define PLOT(X,Y) 326 pbx[count] = X;\327 pby[count] = Y;\328 pbz[count] = Z;\329 pbrgba[count][RCOMP] = FixedToInt(r0);\330 pbrgba[count][GCOMP] = FixedToInt(g0);\331 pbrgba[count][BCOMP] = FixedToInt(b0);\332 pbrgba[count][ACOMP] = FixedToInt(a0);\333 334 335 #include "linetemp.h" 336 337 ctx->PB->count = count; 338 gl_flush_pb(ctx); 339 } 340 341 342 #define CHECK_FULL(count) 343 if (count >= PB_SIZE-MAX_WIDTH) {\344 ctx->PB->count = count;\345 gl_flush_pb(ctx);\346 count = ctx->PB->count;\347 330 #define PLOT(X,Y) \ 331 pbx[count] = X; \ 332 pby[count] = Y; \ 333 pbz[count] = Z; \ 334 pbrgba[count][RCOMP] = FixedToInt(r0); \ 335 pbrgba[count][GCOMP] = FixedToInt(g0); \ 336 pbrgba[count][BCOMP] = FixedToInt(b0); \ 337 pbrgba[count][ACOMP] = FixedToInt(a0); \ 338 count++; 339 340 #include "linetemp.h" 341 342 ctx->PB->count = count; 343 gl_flush_pb(ctx); 344 } 345 346 347 #define CHECK_FULL(count) \ 348 if (count >= PB_SIZE-MAX_WIDTH) { \ 349 ctx->PB->count = count; \ 350 gl_flush_pb(ctx); \ 351 count = ctx->PB->count; \ 352 } 348 353 349 354 … … 351 356 /* Smooth shaded, color index, any width, maybe stippled */ 352 357 static void general_smooth_ci_line( GLcontext *ctx, 353 358 GLuint vert0, GLuint vert1, GLuint pvert ) 354 359 { 355 360 GLint count = ctx->PB->count; … … 367 372 #define WIDE 1 368 373 #define STIPPLE 1 369 #define PLOT(X,Y) 370 pbx[count] = X;\371 pby[count] = Y;\372 pbz[count] = Z;\373 pbi[count] = I;\374 count++;\375 374 #define PLOT(X,Y) \ 375 pbx[count] = X; \ 376 pby[count] = Y; \ 377 pbz[count] = Z; \ 378 pbi[count] = I; \ 379 count++; \ 380 CHECK_FULL(count); 376 381 #include "linetemp.h" 377 382 } … … 383 388 #define INTERP_Z 1 384 389 #define INTERP_INDEX 1 385 #define XMAJOR_PLOT(X,Y) 386 pbx[count] = X; pbx[count+1] = X;\387 pby[count] = Y; pby[count+1] = Y+1;\388 pbz[count] = Z; pbz[count+1] = Z;\389 pbi[count] = I; pbi[count+1] = I;\390 count += 2;\391 392 #define YMAJOR_PLOT(X,Y) 393 pbx[count] = X; pbx[count+1] = X+1;\394 pby[count] = Y; pby[count+1] = Y;\395 pbz[count] = Z; pbz[count+1] = Z;\396 pbi[count] = I; pbi[count+1] = I;\397 count += 2;\398 390 #define XMAJOR_PLOT(X,Y) \ 391 pbx[count] = X; pbx[count+1] = X; \ 392 pby[count] = Y; pby[count+1] = Y+1; \ 393 pbz[count] = Z; pbz[count+1] = Z; \ 394 pbi[count] = I; pbi[count+1] = I; \ 395 count += 2; \ 396 CHECK_FULL(count); 397 #define YMAJOR_PLOT(X,Y) \ 398 pbx[count] = X; pbx[count+1] = X+1; \ 399 pby[count] = Y; pby[count+1] = Y; \ 400 pbz[count] = Z; pbz[count+1] = Z; \ 401 pbi[count] = I; pbi[count+1] = I; \ 402 count += 2; \ 403 CHECK_FULL(count); 399 404 #include "linetemp.h" 400 405 } … … 405 410 #define INTERP_INDEX 1 406 411 #define WIDE 1 407 #define PLOT(X,Y) 408 pbx[count] = X;\409 pby[count] = Y;\410 pbz[count] = Z;\411 pbi[count] = I;\412 count++;\413 412 #define PLOT(X,Y) \ 413 pbx[count] = X; \ 414 pby[count] = Y; \ 415 pbz[count] = Z; \ 416 pbi[count] = I; \ 417 count++; \ 418 CHECK_FULL(count); 414 419 #include "linetemp.h" 415 420 } … … 438 443 #define WIDE 1 439 444 #define STIPPLE 1 440 #define PLOT(X,Y) 441 pbx[count] = X;\442 pby[count] = Y;\443 pbz[count] = Z;\444 count++;\445 445 #define PLOT(X,Y) \ 446 pbx[count] = X; \ 447 pby[count] = Y; \ 448 pbz[count] = Z; \ 449 count++; \ 450 CHECK_FULL(count); 446 451 #include "linetemp.h" 447 452 } … … 452 457 #define INTERP_XY 1 453 458 #define INTERP_Z 1 454 #define XMAJOR_PLOT(X,Y) 455 pbx[count] = X; pbx[count+1] = X;\456 pby[count] = Y; pby[count+1] = Y+1;\457 pbz[count] = Z; pbz[count+1] = Z;\458 count += 2;\459 460 #define YMAJOR_PLOT(X,Y) 461 pbx[count] = X; pbx[count+1] = X+1;\462 pby[count] = Y; pby[count+1] = Y;\463 pbz[count] = Z; pbz[count+1] = Z;\464 count += 2;\465 459 #define XMAJOR_PLOT(X,Y) \ 460 pbx[count] = X; pbx[count+1] = X; \ 461 pby[count] = Y; pby[count+1] = Y+1; \ 462 pbz[count] = Z; pbz[count+1] = Z; \ 463 count += 2; \ 464 CHECK_FULL(count); 465 #define YMAJOR_PLOT(X,Y) \ 466 pbx[count] = X; pbx[count+1] = X+1; \ 467 pby[count] = Y; pby[count+1] = Y; \ 468 pbz[count] = Z; pbz[count+1] = Z; \ 469 count += 2; \ 470 CHECK_FULL(count); 466 471 #include "linetemp.h" 467 472 } … … 471 476 #define INTERP_Z 1 472 477 #define WIDE 1 473 #define PLOT(X,Y) 474 pbx[count] = X;\475 pby[count] = Y;\476 pbz[count] = Z;\477 count++;\478 478 #define PLOT(X,Y) \ 479 pbx[count] = X; \ 480 pby[count] = Y; \ 481 pbz[count] = Z; \ 482 count++; \ 483 CHECK_FULL(count); 479 484 #include "linetemp.h" 480 485 } … … 505 510 #define WIDE 1 506 511 #define STIPPLE 1 507 #define PLOT(X,Y) 508 pbx[count] = X;\509 pby[count] = Y;\510 pbz[count] = Z;\511 pbrgba[count][RCOMP] = FixedToInt(r0);\512 pbrgba[count][GCOMP] = FixedToInt(g0);\513 pbrgba[count][BCOMP] = FixedToInt(b0);\514 pbrgba[count][ACOMP] = FixedToInt(a0);\515 count++;\516 512 #define PLOT(X,Y) \ 513 pbx[count] = X; \ 514 pby[count] = Y; \ 515 pbz[count] = Z; \ 516 pbrgba[count][RCOMP] = FixedToInt(r0); \ 517 pbrgba[count][GCOMP] = FixedToInt(g0); \ 518 pbrgba[count][BCOMP] = FixedToInt(b0); \ 519 pbrgba[count][ACOMP] = FixedToInt(a0); \ 520 count++; \ 521 CHECK_FULL(count); 517 522 #include "linetemp.h" 518 523 } … … 525 530 #define INTERP_RGB 1 526 531 #define INTERP_ALPHA 1 527 #define XMAJOR_PLOT(X,Y) 528 pbx[count] = X; pbx[count+1] = X;\529 pby[count] = Y; pby[count+1] = Y+1;\530 pbz[count] = Z; pbz[count+1] = Z;\531 pbrgba[count][RCOMP] = FixedToInt(r0);\532 pbrgba[count][GCOMP] = FixedToInt(g0);\533 pbrgba[count][BCOMP] = FixedToInt(b0);\534 pbrgba[count][ACOMP] = FixedToInt(a0);\535 pbrgba[count+1][RCOMP] = FixedToInt(r0);\536 pbrgba[count+1][GCOMP] = FixedToInt(g0);\537 pbrgba[count+1][BCOMP] = FixedToInt(b0);\538 pbrgba[count+1][ACOMP] = FixedToInt(a0);\539 count += 2;\540 541 #define YMAJOR_PLOT(X,Y) 542 pbx[count] = X; pbx[count+1] = X+1;\543 pby[count] = Y; pby[count+1] = Y;\544 pbz[count] = Z; pbz[count+1] = Z;\545 pbrgba[count][RCOMP] = FixedToInt(r0);\546 pbrgba[count][GCOMP] = FixedToInt(g0);\547 pbrgba[count][BCOMP] = FixedToInt(b0);\548 pbrgba[count][ACOMP] = FixedToInt(a0);\549 pbrgba[count+1][RCOMP] = FixedToInt(r0);\550 pbrgba[count+1][GCOMP] = FixedToInt(g0);\551 pbrgba[count+1][BCOMP] = FixedToInt(b0);\552 pbrgba[count+1][ACOMP] = FixedToInt(a0);\553 count += 2;\554 532 #define XMAJOR_PLOT(X,Y) \ 533 pbx[count] = X; pbx[count+1] = X; \ 534 pby[count] = Y; pby[count+1] = Y+1; \ 535 pbz[count] = Z; pbz[count+1] = Z; \ 536 pbrgba[count][RCOMP] = FixedToInt(r0); \ 537 pbrgba[count][GCOMP] = FixedToInt(g0); \ 538 pbrgba[count][BCOMP] = FixedToInt(b0); \ 539 pbrgba[count][ACOMP] = FixedToInt(a0); \ 540 pbrgba[count+1][RCOMP] = FixedToInt(r0); \ 541 pbrgba[count+1][GCOMP] = FixedToInt(g0); \ 542 pbrgba[count+1][BCOMP] = FixedToInt(b0); \ 543 pbrgba[count+1][ACOMP] = FixedToInt(a0); \ 544 count += 2; \ 545 CHECK_FULL(count); 546 #define YMAJOR_PLOT(X,Y) \ 547 pbx[count] = X; pbx[count+1] = X+1; \ 548 pby[count] = Y; pby[count+1] = Y; \ 549 pbz[count] = Z; pbz[count+1] = Z; \ 550 pbrgba[count][RCOMP] = FixedToInt(r0); \ 551 pbrgba[count][GCOMP] = FixedToInt(g0); \ 552 pbrgba[count][BCOMP] = FixedToInt(b0); \ 553 pbrgba[count][ACOMP] = FixedToInt(a0); \ 554 pbrgba[count+1][RCOMP] = FixedToInt(r0); \ 555 pbrgba[count+1][GCOMP] = FixedToInt(g0); \ 556 pbrgba[count+1][BCOMP] = FixedToInt(b0); \ 557 pbrgba[count+1][ACOMP] = FixedToInt(a0); \ 558 count += 2; \ 559 CHECK_FULL(count); 555 560 #include "linetemp.h" 556 561 } … … 562 567 #define INTERP_ALPHA 1 563 568 #define WIDE 1 564 #define PLOT(X,Y) 565 pbx[count] = X;\566 pby[count] = Y;\567 pbz[count] = Z;\568 pbrgba[count][RCOMP] = FixedToInt(r0);\569 pbrgba[count][GCOMP] = FixedToInt(g0);\570 pbrgba[count][BCOMP] = FixedToInt(b0);\571 pbrgba[count][ACOMP] = FixedToInt(a0);\572 count++;\573 569 #define PLOT(X,Y) \ 570 pbx[count] = X; \ 571 pby[count] = Y; \ 572 pbz[count] = Z; \ 573 pbrgba[count][RCOMP] = FixedToInt(r0); \ 574 pbrgba[count][GCOMP] = FixedToInt(g0); \ 575 pbrgba[count][BCOMP] = FixedToInt(b0); \ 576 pbrgba[count][ACOMP] = FixedToInt(a0); \ 577 count++; \ 578 CHECK_FULL(count); 574 579 #include "linetemp.h" 575 580 } … … 598 603 #define WIDE 1 599 604 #define STIPPLE 1 600 #define PLOT(X,Y) 601 pbx[count] = X;\602 pby[count] = Y;\603 pbz[count] = Z;\604 count++;\605 605 #define PLOT(X,Y) \ 606 pbx[count] = X; \ 607 pby[count] = Y; \ 608 pbz[count] = Z; \ 609 count++; \ 610 CHECK_FULL(count); 606 611 #include "linetemp.h" 607 612 } … … 612 617 #define INTERP_XY 1 613 618 #define INTERP_Z 1 614 #define XMAJOR_PLOT(X,Y) 615 pbx[count] = X; pbx[count+1] = X;\616 pby[count] = Y; pby[count+1] = Y+1;\617 pbz[count] = Z; pbz[count+1] = Z;\618 count += 2;\619 620 #define YMAJOR_PLOT(X,Y) 621 pbx[count] = X; pbx[count+1] = X+1;\622 pby[count] = Y; pby[count+1] = Y;\623 pbz[count] = Z; pbz[count+1] = Z;\624 count += 2;\625 619 #define XMAJOR_PLOT(X,Y) \ 620 pbx[count] = X; pbx[count+1] = X; \ 621 pby[count] = Y; pby[count+1] = Y+1; \ 622 pbz[count] = Z; pbz[count+1] = Z; \ 623 count += 2; \ 624 CHECK_FULL(count); 625 #define YMAJOR_PLOT(X,Y) \ 626 pbx[count] = X; pbx[count+1] = X+1; \ 627 pby[count] = Y; pby[count+1] = Y; \ 628 pbz[count] = Z; pbz[count+1] = Z; \ 629 count += 2; \ 630 CHECK_FULL(count); 626 631 #include "linetemp.h" 627 632 } … … 631 636 #define INTERP_Z 1 632 637 #define WIDE 1 633 #define PLOT(X,Y) 634 pbx[count] = X;\635 pby[count] = Y;\636 pbz[count] = Z;\637 count++;\638 638 #define PLOT(X,Y) \ 639 pbx[count] = X; \ 640 pby[count] = Y; \ 641 pbz[count] = Z; \ 642 count++; \ 643 CHECK_FULL(count); 639 644 #include "linetemp.h" 640 645 } … … 668 673 #define WIDE 1 669 674 #define STIPPLE 1 670 #define PLOT(X,Y) 671 {\672 pbx[count] = X;\673 pby[count] = Y;\674 pbz[count] = Z;\675 pbs[count] = s;\676 pbt[count] = t;\677 pbu[count] = u;\678 count++;\679 CHECK_FULL(count);\680 675 #define PLOT(X,Y) \ 676 { \ 677 pbx[count] = X; \ 678 pby[count] = Y; \ 679 pbz[count] = Z; \ 680 pbs[count] = s; \ 681 pbt[count] = t; \ 682 pbu[count] = u; \ 683 count++; \ 684 CHECK_FULL(count); \ 685 } 681 686 #include "linetemp.h" 682 687 } … … 687 692 #define INTERP_STUV0 1 688 693 #define WIDE 1 689 #define PLOT(X,Y) 690 {\691 pbx[count] = X;\692 pby[count] = Y;\693 pbz[count] = Z;\694 pbs[count] = s;\695 pbt[count] = t;\696 pbu[count] = u;\697 count++;\698 CHECK_FULL(count);\699 694 #define PLOT(X,Y) \ 695 { \ 696 pbx[count] = X; \ 697 pby[count] = Y; \ 698 pbz[count] = Z; \ 699 pbs[count] = s; \ 700 pbt[count] = t; \ 701 pbu[count] = u; \ 702 count++; \ 703 CHECK_FULL(count); \ 704 } 700 705 #include "linetemp.h" 701 706 } … … 730 735 #define WIDE 1 731 736 #define STIPPLE 1 732 #define PLOT(X,Y) 733 {\734 pbx[count] = X;\735 pby[count] = Y;\736 pbz[count] = Z;\737 pbs[count] = s;\738 pbt[count] = t;\739 pbu[count] = u;\740 pbrgba[count][RCOMP] = FixedToInt(r0);\741 pbrgba[count][GCOMP] = FixedToInt(g0);\742 pbrgba[count][BCOMP] = FixedToInt(b0);\743 pbrgba[count][ACOMP] = FixedToInt(a0);\744 count++;\745 CHECK_FULL(count);\746 737 #define PLOT(X,Y) \ 738 { \ 739 pbx[count] = X; \ 740 pby[count] = Y; \ 741 pbz[count] = Z; \ 742 pbs[count] = s; \ 743 pbt[count] = t; \ 744 pbu[count] = u; \ 745 pbrgba[count][RCOMP] = FixedToInt(r0); \ 746 pbrgba[count][GCOMP] = FixedToInt(g0); \ 747 pbrgba[count][BCOMP] = FixedToInt(b0); \ 748 pbrgba[count][ACOMP] = FixedToInt(a0); \ 749 count++; \ 750 CHECK_FULL(count); \ 751 } 747 752 #include "linetemp.h" 748 753 } … … 755 760 #define INTERP_STUV0 1 756 761 #define WIDE 1 757 #define PLOT(X,Y) 758 {\759 pbx[count] = X;\760 pby[count] = Y;\761 pbz[count] = Z;\762 pbs[count] = s;\763 pbt[count] = t;\764 pbu[count] = u;\765 pbrgba[count][RCOMP] = FixedToInt(r0);\766 pbrgba[count][GCOMP] = FixedToInt(g0);\767 pbrgba[count][BCOMP] = FixedToInt(b0);\768 pbrgba[count][ACOMP] = FixedToInt(a0);\769 count++;\770 CHECK_FULL(count);\771 762 #define PLOT(X,Y) \ 763 { \ 764 pbx[count] = X; \ 765 pby[count] = Y; \ 766 pbz[count] = Z; \ 767 pbs[count] = s; \ 768 pbt[count] = t; \ 769 pbu[count] = u; \ 770 pbrgba[count][RCOMP] = FixedToInt(r0); \ 771 pbrgba[count][GCOMP] = FixedToInt(g0); \ 772 pbrgba[count][BCOMP] = FixedToInt(b0); \ 773 pbrgba[count][ACOMP] = FixedToInt(a0); \ 774 count++; \ 775 CHECK_FULL(count); \ 776 } 772 777 #include "linetemp.h" 773 778 } … … 809 814 #define WIDE 1 810 815 #define STIPPLE 1 811 #define PLOT(X,Y) 812 {\813 pbx[count] = X;\814 pby[count] = Y;\815 pbz[count] = Z;\816 pbs[count] = s;\817 pbt[count] = t;\818 pbu[count] = u;\819 pbs1[count] = s1;\820 pbt1[count] = t1;\821 pbu1[count] = u1;\822 pbrgba[count][RCOMP] = FixedToInt(r0);\823 pbrgba[count][GCOMP] = FixedToInt(g0);\824 pbrgba[count][BCOMP] = FixedToInt(b0);\825 pbrgba[count][ACOMP] = FixedToInt(a0);\826 pbspec[count][RCOMP] = FixedToInt(sr0);\827 pbspec[count][GCOMP] = FixedToInt(sg0);\828 pbspec[count][BCOMP] = FixedToInt(sb0);\829 count++;\830 CHECK_FULL(count);\831 816 #define PLOT(X,Y) \ 817 { \ 818 pbx[count] = X; \ 819 pby[count] = Y; \ 820 pbz[count] = Z; \ 821 pbs[count] = s; \ 822 pbt[count] = t; \ 823 pbu[count] = u; \ 824 pbs1[count] = s1; \ 825 pbt1[count] = t1; \ 826 pbu1[count] = u1; \ 827 pbrgba[count][RCOMP] = FixedToInt(r0); \ 828 pbrgba[count][GCOMP] = FixedToInt(g0); \ 829 pbrgba[count][BCOMP] = FixedToInt(b0); \ 830 pbrgba[count][ACOMP] = FixedToInt(a0); \ 831 pbspec[count][RCOMP] = FixedToInt(sr0); \ 832 pbspec[count][GCOMP] = FixedToInt(sg0); \ 833 pbspec[count][BCOMP] = FixedToInt(sb0); \ 834 count++; \ 835 CHECK_FULL(count); \ 836 } 832 837 #include "linetemp.h" 833 838 } … … 842 847 #define INTERP_STUV1 1 843 848 #define WIDE 1 844 #define PLOT(X,Y) 845 {\846 pbx[count] = X;\847 pby[count] = Y;\848 pbz[count] = Z;\849 pbs[count] = s;\850 pbt[count] = t;\851 pbu[count] = u;\852 pbs1[count] = s1;\853 pbt1[count] = t1;\854 pbu1[count] = u1;\855 pbrgba[count][RCOMP] = FixedToInt(r0);\856 pbrgba[count][GCOMP] = FixedToInt(g0);\857 pbrgba[count][BCOMP] = FixedToInt(b0);\858 pbrgba[count][ACOMP] = FixedToInt(a0);\859 pbspec[count][RCOMP] = FixedToInt(sr0);\860 pbspec[count][GCOMP] = FixedToInt(sg0);\861 pbspec[count][BCOMP] = FixedToInt(sb0);\862 count++;\863 CHECK_FULL(count);\864 849 #define PLOT(X,Y) \ 850 { \ 851 pbx[count] = X; \ 852 pby[count] = Y; \ 853 pbz[count] = Z; \ 854 pbs[count] = s; \ 855 pbt[count] = t; \ 856 pbu[count] = u; \ 857 pbs1[count] = s1; \ 858 pbt1[count] = t1; \ 859 pbu1[count] = u1; \ 860 pbrgba[count][RCOMP] = FixedToInt(r0); \ 861 pbrgba[count][GCOMP] = FixedToInt(g0); \ 862 pbrgba[count][BCOMP] = FixedToInt(b0); \ 863 pbrgba[count][ACOMP] = FixedToInt(a0); \ 864 pbspec[count][RCOMP] = FixedToInt(sr0); \ 865 pbspec[count][GCOMP] = FixedToInt(sg0); \ 866 pbspec[count][BCOMP] = FixedToInt(sb0); \ 867 count++; \ 868 CHECK_FULL(count); \ 869 } 865 870 #include "linetemp.h" 866 871 } … … 898 903 #define INTERP_RGBA 1 899 904 #define INTERP_STUV0 1 900 #define PLOT(x, y) 901 { 902 PB_WRITE_TEX_PIXEL( pb, (x), (y), z, red, green, blue, coverage, 903 s, t, u ); 905 #define PLOT(x, y) \ 906 { \ 907 PB_WRITE_TEX_PIXEL( pb, (x), (y), z, red, green, blue, coverage, \ 908 s, t, u ); \ 904 909 } 905 910 #include "lnaatemp.h" … … 921 926 #define INTERP_STUV0 1 922 927 #define INTERP_STUV1 1 923 #define PLOT(x, y) 924 { 925 PB_WRITE_MULTITEX_SPEC_PIXEL( pb, (x), (y), z, 926 red, green, blue, coverage, specRed, specGreen, specBlue, 927 s, t, u, s1, t1, u1 ); 928 #define PLOT(x, y) \ 929 { \ 930 PB_WRITE_MULTITEX_SPEC_PIXEL( pb, (x), (y), z, \ 931 red, green, blue, coverage, specRed, specGreen, specBlue, \ 932 s, t, u, s1, t1, u1 ); \ 928 933 } 929 934 #include "lnaatemp.h" … … 938 943 { 939 944 #define INTERP_INDEX 1 940 #define PLOT(x, y) 941 { 942 PB_WRITE_CI_PIXEL( pb, (x), (y), z, index + coverage ); 945 #define PLOT(x, y) \ 946 { \ 947 PB_WRITE_CI_PIXEL( pb, (x), (y), z, index + coverage ); \ 943 948 } 944 949 #include "lnaatemp.h" … … 974 979 if (ctx->Driver.LineFunc) { 975 980 /* Device driver will draw lines. */ 976 981 return; 977 982 } 978 983 … … 1026 1031 } 1027 1032 else { 1028 1029 1033 if (ctx->Light.ShadeModel==GL_SMOOTH) { 1034 /* Width==1, non-stippled, smooth-shaded */ 1030 1035 if (ctx->Depth.Test || ctx->FogMode == FOG_FRAGMENT) { 1031 1036 if (rgbmode) … … 1040 1045 ctx->Driver.LineFunc = smooth_ci_line; 1041 1046 } 1042 1047 } 1043 1048 else { 1044 1049 /* Width==1, non-stippled, flat-shaded */ 1045 1050 if (ctx->Depth.Test || ctx->FogMode == FOG_FRAGMENT) { 1046 1051 if (rgbmode)
Note:
See TracChangeset
for help on using the changeset viewer.