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.

46 lines
778 B

  1. #ifndef WAVE_H
  2. #define WAVE_H
  3. extern "C" {
  4. #include <windows.h>
  5. #include <gl\gl.h>
  6. };
  7. typedef struct {
  8. float color[3];
  9. float normal[3];
  10. } FACET;
  11. typedef struct {
  12. float vertex[3];
  13. float normal[3];
  14. } WCOORD;
  15. typedef struct {
  16. GLint numFacets;
  17. GLint numCoords;
  18. WCOORD *coords;
  19. FACET *facets;
  20. } MESH;
  21. class WAVE {
  22. public:
  23. WAVE();
  24. // WAVE( int widthX, int widthY, int checkerSize, float height, int frames );
  25. ~WAVE();
  26. void Draw();
  27. private:
  28. int iWidthX, iWidthY;
  29. int iCheckerSize;
  30. int nFrames;
  31. int iCurFrame;
  32. float fHeight;
  33. MESH mesh;
  34. BOOL bSmooth; // Smooth or flat shading
  35. BOOL bLighting;
  36. void InitMaterials() {} ;
  37. void InitMesh();
  38. };
  39. #endif // WAVE_H