Clone of mesa.
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.

MESA_pack_invert.spec 3.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. Name
  2. MESA_pack_invert
  3. Name Strings
  4. GL_MESA_pack_invert
  5. Contact
  6. Brian Paul, Tungsten Graphics, Inc. (brian.paul 'at' tungstengraphics.com)
  7. Keith Whitwell, Tungsten Graphics, Inc. (keith 'at' tungstengraphics.com)
  8. Status
  9. Shipping (Mesa 4.0.4 and later)
  10. Version
  11. 1.0
  12. Number
  13. TBD
  14. Dependencies
  15. OpenGL 1.0 or later is required
  16. This extensions is written against the OpenGL 1.4 Specification.
  17. Overview
  18. This extension adds a new pixel storage parameter to indicate that
  19. images are to be packed in top-to-bottom order instead of OpenGL's
  20. conventional bottom-to-top order. Only pixel packing can be
  21. inverted (i.e. for glReadPixels, glGetTexImage, glGetConvolutionFilter,
  22. etc).
  23. Almost all known image file formats store images in top-to-bottom
  24. order. As it is, OpenGL reads images from the frame buffer in
  25. bottom-to-top order. Thus, images usually have to be inverted before
  26. writing them to a file with image I/O libraries. This extension
  27. allows images to be read such that inverting isn't needed.
  28. IP Status
  29. None
  30. Issues
  31. 1. Should we also defined UNPACK_INVERT_MESA for glDrawPixels, etc?
  32. Resolved: No, we're only concerned with pixel packing. There are other
  33. solutions for inverting images when using glDrawPixels (negative Y pixel
  34. zoom) or glTexImage (invert the vertex T coordinates). It would be easy
  35. enough to define a complementary extension for pixel packing in the
  36. future if needed.
  37. New Procedures and Functions
  38. None
  39. New Tokens
  40. Accepted by the <pname> parameter of PixelStorei and PixelStoref
  41. and the <pname> parameter of GetIntegerv, GetFloatv, GetDoublev
  42. and GetBooleanv:
  43. PACK_INVERT_MESA 0x8758
  44. Additions to Chapter 2 of the OpenGL 1.4 Specification (OpenGL Operation)
  45. None
  46. Additions to Chapter 3 of the OpenGL 1.4 Specification (Rasterization)
  47. None
  48. Additions to Chapter 4 of the OpenGL 1.4 Specification (Per-Fragment
  49. Operations and the Frame Buffer)
  50. Add the following entry to table 4.4 (PixelStore parameters) on page 182:
  51. Parameter Name Type Initial Value Valid Range
  52. ---------------------------------------------------------
  53. PACK_INVERT_MESA boolean FALSE TRUE/FALSE
  54. In the section labeled "Placement in Client Memory" on page 184
  55. insert the following text into the paragraph before the sentence
  56. that starts with "If the format is RED, GREEN, BLUE...":
  57. "The parameter PACK_INVERT_MESA controls whether the image is packed
  58. in bottom-to-top order (the default) or top-to-bottom order. Equation
  59. 3.8 is modified as follows:
  60. ... the first element of the Nth row is indicated by
  61. p + Nk, if PACK_INVERT_MESA is false
  62. p + k * (H - 1) - Nk, if PACK_INVERT_MESA is true, where H is the
  63. image height
  64. "
  65. Additions to Chapter 5 of the OpenGL 1.4 Specification (Special Functions)
  66. None
  67. Additions to Chapter 6 of the OpenGL 1.4 Specification (State and
  68. State Requests)
  69. None
  70. Additions to Appendix A of the OpenGL 1.4 Specification (Invariance)
  71. None
  72. Additions to the AGL/GLX/WGL Specifications
  73. None
  74. GLX Protocol
  75. None
  76. Errors
  77. None
  78. New State
  79. Add the following entry to table 6.20 (Pixels) on page 235:
  80. Get Value Type Get Cmd Initial Value Description Sec Attribute
  81. --------------------------------------------------------------------------------------------------
  82. PACK_INVERT_MESA boolean GetBoolean FALSE Value of PACK_INVERT_MESA 4.3.2 pixel-store
  83. Revision History
  84. 21 September 2002 - Initial draft