Check for SYS/GL during library init. Reason is that
[AROS.git] / workbench / libs / mesa / docs / MESA_pack_invert.spec
blob33fb3c7bf806bc9ed7995efae06f70c299b7af63
1 Name
3 MESA_pack_invert
5 Name Strings
7 GL_MESA_pack_invert
9 Contact
11 Brian Paul, Tungsten Graphics, Inc. (brian.paul 'at' tungstengraphics.com)
12 Keith Whitwell, Tungsten Graphics, Inc. (keith 'at' tungstengraphics.com)
14 Status
16 Shipping (Mesa 4.0.4 and later)
18 Version
20 1.0
22 Number
24 TBD
26 Dependencies
28 OpenGL 1.0 or later is required
29 This extensions is written against the OpenGL 1.4 Specification.
31 Overview
33 This extension adds a new pixel storage parameter to indicate that
34 images are to be packed in top-to-bottom order instead of OpenGL's
35 conventional bottom-to-top order. Only pixel packing can be
36 inverted (i.e. for glReadPixels, glGetTexImage, glGetConvolutionFilter,
37 etc).
39 Almost all known image file formats store images in top-to-bottom
40 order. As it is, OpenGL reads images from the frame buffer in
41 bottom-to-top order. Thus, images usually have to be inverted before
42 writing them to a file with image I/O libraries. This extension
43 allows images to be read such that inverting isn't needed.
45 IP Status
47 None
49 Issues
51 1. Should we also define UNPACK_INVERT_MESA for glDrawPixels, etc?
53 Resolved: No, we're only concerned with pixel packing. There are other
54 solutions for inverting images when using glDrawPixels (negative Y pixel
55 zoom) or glTexImage (invert the vertex T coordinates). It would be easy
56 enough to define a complementary extension for pixel packing in the
57 future if needed.
59 New Procedures and Functions
61 None
63 New Tokens
65 Accepted by the <pname> parameter of PixelStorei and PixelStoref
66 and the <pname> parameter of GetIntegerv, GetFloatv, GetDoublev
67 and GetBooleanv:
69 PACK_INVERT_MESA 0x8758
71 Additions to Chapter 2 of the OpenGL 1.4 Specification (OpenGL Operation)
73 None
75 Additions to Chapter 3 of the OpenGL 1.4 Specification (Rasterization)
77 None
79 Additions to Chapter 4 of the OpenGL 1.4 Specification (Per-Fragment
80 Operations and the Frame Buffer)
82 Add the following entry to table 4.4 (PixelStore parameters) on page 182:
84 Parameter Name Type Initial Value Valid Range
85 ---------------------------------------------------------
86 PACK_INVERT_MESA boolean FALSE TRUE/FALSE
88 In the section labeled "Placement in Client Memory" on page 184
89 insert the following text into the paragraph before the sentence
90 that starts with "If the format is RED, GREEN, BLUE...":
92 "The parameter PACK_INVERT_MESA controls whether the image is packed
93 in bottom-to-top order (the default) or top-to-bottom order. Equation
94 3.8 is modified as follows:
96 ... the first element of the Nth row is indicated by
98 p + Nk, if PACK_INVERT_MESA is false
99 p + k * (H - 1) - Nk, if PACK_INVERT_MESA is true, where H is the
100 image height
103 Additions to Chapter 5 of the OpenGL 1.4 Specification (Special Functions)
105 None
107 Additions to Chapter 6 of the OpenGL 1.4 Specification (State and
108 State Requests)
110 None
112 Additions to Appendix A of the OpenGL 1.4 Specification (Invariance)
114 None
116 Additions to the AGL/GLX/WGL Specifications
118 None
120 GLX Protocol
122 None
124 Errors
126 None
128 New State
130 Add the following entry to table 6.20 (Pixels) on page 235:
132 Get Value Type Get Cmd Initial Value Description Sec Attribute
133 --------------------------------------------------------------------------------------------------
134 PACK_INVERT_MESA boolean GetBoolean FALSE Value of PACK_INVERT_MESA 4.3.2 pixel-store
136 Revision History
138 21 September 2002 - Initial draft