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.

81 lines
2.5 KiB

  1. /*
  2. ** Copyright 1995-2095, Silicon Graphics, Inc.
  3. ** All Rights Reserved.
  4. **
  5. ** This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  6. ** the contents of this file may not be disclosed to third parties, copied or
  7. ** duplicated in any form, in whole or in part, without the prior written
  8. ** permission of Silicon Graphics, Inc.
  9. **
  10. ** RESTRICTED RIGHTS LEGEND:
  11. ** Use, duplication or disclosure by the Government is subject to restrictions
  12. ** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  13. ** and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  14. ** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  15. ** rights reserved under the Copyright Laws of the United States.
  16. */
  17. extern const GLubyte __glsCharType[256];
  18. #define __GLS_CHAR_GRAPHIC_BIT 0x01
  19. #define __GLS_CHAR_SPACE_BIT 0x02
  20. #define __GLS_CHAR_TOKEN_BIT 0x04
  21. #define __GLS_CHAR_IS_GRAPHIC(inChar) \
  22. (__glsCharType[inChar] & __GLS_CHAR_GRAPHIC_BIT)
  23. #define __GLS_CHAR_IS_SPACE(inChar) \
  24. (__glsCharType[inChar] & __GLS_CHAR_SPACE_BIT)
  25. #define __GLS_CHAR_IS_TOKEN(inChar) \
  26. (__glsCharType[inChar] & __GLS_CHAR_TOKEN_BIT)
  27. #if __GLS_MSB_FIRST
  28. #define __GLS_BINARY_SWAP0 GLS_BINARY_MSB_FIRST
  29. #define __GLS_BINARY_SWAP1 GLS_BINARY_LSB_FIRST
  30. #define __GLS_COUNT_SMALL(inWord) (inWord & 0x0000ffff)
  31. #define __GLS_OP_SMALL(inWord) (inWord >> 16)
  32. #else /* !__GLS_MSB_FIRST */
  33. #define __GLS_BINARY_SWAP0 GLS_BINARY_LSB_FIRST
  34. #define __GLS_BINARY_SWAP1 GLS_BINARY_MSB_FIRST
  35. #define __GLS_COUNT_SMALL(inWord) (inWord >> 16)
  36. #define __GLS_OP_SMALL(inWord) (inWord & 0x0000ffff)
  37. #endif /* __GLS_MSB_FIRST */
  38. #define __GLS_COMMAND_JUMP(inPC) ((__GLSbinCommand_jump *)inPC)
  39. #define __GLS_HEAD_LARGE(inPC) ((__GLSbinCommandHead_large *)inPC)
  40. #define __GLS_JUMP_ALLOC (sizeof(__GLSbinCommand_jump) + 4)
  41. typedef struct {
  42. GLushort opSmall;
  43. GLushort countSmall;
  44. } __GLSbinCommandHead_small;
  45. typedef struct {
  46. GLushort opSmall;
  47. GLushort countSmall;
  48. GLuint opLarge;
  49. GLuint countLarge;
  50. } __GLSbinCommandHead_large;
  51. typedef struct {
  52. GLint major;
  53. GLint minor;
  54. } __GLSversion;
  55. typedef struct {
  56. __GLSbinCommandHead_large head;
  57. __GLSversion version;
  58. } __GLSbinCommand_BeginGLS;
  59. extern GLSenum __glsBinCommand_BeginGLS_getType(
  60. __GLSbinCommand_BeginGLS *inCommand, __GLSversion *outVersion
  61. );
  62. typedef struct {
  63. __GLSbinCommandHead_large head;
  64. GLuint pad;
  65. GLubyte *dest;
  66. } __GLSbinCommand_jump;
  67. typedef struct {
  68. __GLSbinCommandHead_small head;
  69. } __GLSbinCommand_pad;