Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.6 KiB

  1. /******************************Module*Header*******************************\
  2. * Module Name: texspan3.h
  3. *
  4. * Advance the required interpolants, and do the subdivision if needed.
  5. *
  6. * 22-Nov-1995 ottob Created
  7. *
  8. * Copyright (c) 1995 Microsoft Corporation
  9. \**************************************************************************/
  10. #if (SMOOTH_SHADING)
  11. rAccum += GENACCEL(gengc).spanDelta.r;
  12. gAccum += GENACCEL(gengc).spanDelta.g;
  13. bAccum += GENACCEL(gengc).spanDelta.b;
  14. #if (ALPHA)
  15. aAccum += GENACCEL(gengc).spanDelta.a;
  16. #endif
  17. #endif
  18. #if (BPP != 32)
  19. pPix += (BPP / 8);
  20. #else
  21. pPix += pixAdj;
  22. #endif
  23. if (--subDivCount < 0) {
  24. if (!bOrtho) {
  25. __GL_FLOAT_SIMPLE_END_DIVIDE(qwInv);
  26. sResult = sResultNew;
  27. tResult = tResultNew;
  28. sResultNew = FTOL((__GLfloat)sAccum * qwInv);
  29. tResultNew = ((FTOL((__GLfloat)tAccum * qwInv)) >> TSHIFT_SUBDIV) & ~7;
  30. qwAccum += GENACCEL(gengc).qwStepX;
  31. if (CASTINT(qwAccum) <= 0)
  32. qwAccum -= GENACCEL(gengc).qwStepX;
  33. __GL_FLOAT_SIMPLE_BEGIN_DIVIDE(__glOne, qwAccum, qwInv);
  34. } else {
  35. sResult = sResultNew;
  36. tResult = tResultNew;
  37. sResultNew = sAccum;
  38. tResultNew = (tAccum >> TSHIFT_SUBDIV) & ~7;
  39. }
  40. sAccum += GENACCEL(gengc).sStepX;
  41. tAccum += GENACCEL(gengc).tStepX;
  42. subDs = (sResultNew - sResult) >> 3;
  43. subDt = (tResultNew - tResult) >> 3;
  44. subDivCount = 7;
  45. }