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.

56 lines
1.5 KiB

  1. #include <windows.h>
  2. #include <gl\gl.h>
  3. #include <gl\glaux.h>
  4. #include <stdio.h>
  5. #include "skeltest.h"
  6. #include "hugetest.h"
  7. #include "teapot.h"
  8. #include "tptlght.h"
  9. TeapotLightTest::TeapotLightTest()
  10. {
  11. SetThisType("Teapot - Light");
  12. SetThisVersion("1.0");
  13. td.swapbuffers = TRUE;
  14. td.iDuration = 30000;
  15. td.iX = 0;
  16. td.iY = 0;
  17. td.iW = 640;
  18. td.iH = 480;
  19. sprintf(td.acName, "Teapot w/ Lighting (demo)");
  20. sprintf(td.acTestStatName, "Frames");
  21. bd.uiClear = GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT;
  22. bd.fClearColor[0] = 0.0f;
  23. bd.fClearColor[1] = 0.0f;
  24. bd.fClearColor[2] = 0.0f;
  25. bd.fClearColor[3] = 0.0f;
  26. bd.cColorBits = 24;
  27. bd.cDepthBits = 16;
  28. bd.bDepthTestEnable = TRUE;
  29. bd.iDepthFunction = LEQUAL;
  30. bd.bNormalize = TRUE;
  31. bd.bAutoNormal = TRUE;
  32. bd.iShadeModel = SMOOTH;
  33. ld.bEnable = TRUE;
  34. ld.aLights[0].bEnable = TRUE;
  35. ld.aLights[0].afAmbient[0] = 0.3f;
  36. ld.aLights[0].afAmbient[1] = 0.3f;
  37. ld.aLights[0].afAmbient[2] = 0.3f;
  38. ld.aLights[0].afAmbient[3] = 1.0f;
  39. ld.aLights[0].afDiffuse[0] = 0.8f;
  40. ld.aLights[0].afDiffuse[1] = 0.4f;
  41. ld.aLights[0].afDiffuse[2] = 0.0f;
  42. ld.aLights[0].afDiffuse[3] = 1.0f;
  43. ld.aLights[0].afSpecular[0] = 1.0f;
  44. ld.aLights[0].afSpecular[1] = 1.0f;
  45. ld.aLights[0].afSpecular[2] = 1.0f;
  46. ld.aLights[0].afSpecular[3] = 1.0f;
  47. ld.aLights[0].afPosition[0] = -50.0f;
  48. ld.aLights[0].afPosition[1] = 100.0f;
  49. ld.aLights[0].afPosition[2] = 150.0f;
  50. ld.aLights[0].afPosition[3] = 0.0f;
  51. }