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
1.4 KiB

  1. /******************************Module*Header*******************************\
  2. * Module Name: util.hxx
  3. *
  4. * Copyright (c) 1997 Microsoft Corporation
  5. *
  6. \**************************************************************************/
  7. #ifndef __uidemo_util_hxx__
  8. #define __uidemo_util_hxx__
  9. #include "mtk.hxx"
  10. class VIEW {
  11. public:
  12. // void CalcWindowRect( ISIZE *pWinSize, GLRECT *pRect );
  13. float fViewDist;
  14. float fovy;
  15. float fAspect;
  16. };
  17. //#define QUAD_SIZE 2.0f
  18. #define QUAD_SIZE 2.5f
  19. #define InvertY( y, height ) \
  20. ( height - y - 1 )
  21. // Defines for get matrix updates
  22. #define UPDATE_MODELVIEW_MATRIX_BIT 1
  23. #define UPDATE_PROJECTION_MATRIX_BIT (1 << 1)
  24. #define UPDATE_VIEWPORT_BIT (1 << 2)
  25. #define UPDATE_ALL (UPDATE_MODELVIEW_MATRIX_BIT | \
  26. UPDATE_PROJECTION_MATRIX_BIT | \
  27. UPDATE_VIEWPORT_BIT )
  28. extern GLuint defaultQuad; // display list for quad
  29. extern void DrawRect( FSIZE *fSize );
  30. extern void DrawDefaultQuad();
  31. extern void AddSwapHintRect( GLIRECT *pRect );
  32. extern void CalcRect( POINT3D *ptr, POINT3D *pbl, GLIRECT *pRect );
  33. extern void CalcMinMaxRect( POINT3D *pts, GLIRECT *pRect, int nPts );
  34. extern void UpdateLocalTransforms( int bits );
  35. extern void TransformObjectToWindow( POINT3D *pIn, POINT3D *pOut, int nPts );
  36. extern void TransformWindowToObject( POINT3D *pIn, POINT3D *pOut );
  37. #endif // __uidemo_util_hxx__