1848b8605Smrg
2848b8605Smrg                            Mesa 4.1 release notes
3848b8605Smrg
4848b8605Smrg                               October 29, 2002
5848b8605Smrg
6848b8605Smrg                                PLEASE READ!!!!
7848b8605Smrg
8848b8605Smrg
9848b8605Smrg
10848b8605SmrgIntroduction
11848b8605Smrg------------
12848b8605Smrg
13848b8605SmrgMesa uses an even/odd version number scheme like the Linux kernel.
14848b8605SmrgEven numbered versions (such as 4.0) designate stable releases.
15848b8605SmrgOdd numbered versions (such as 4.1) designate new developmental releases.
16848b8605Smrg
17848b8605Smrg
18848b8605SmrgNew Features in Mesa 4.1
19848b8605Smrg------------------------
20848b8605Smrg
21848b8605SmrgNew extensions.  Docs at http://oss.sgi.com/projects/ogl-sample/registry/
22848b8605Smrg
23848b8605SmrgGL_NV_vertex_program
24848b8605Smrg
25848b8605Smrg    NVIDIA's vertex programming extension
26848b8605Smrg
27848b8605SmrgGL_NV_vertex_program1_1
28848b8605Smrg
29848b8605Smrg    A few features built on top of GL_NV_vertex_program
30848b8605Smrg
31848b8605SmrgGL_ARB_window_pos
32848b8605Smrg
33848b8605Smrg    This is the ARB-approved version of GL_MESA_window_pos
34848b8605Smrg
35848b8605SmrgGL_ARB_depth_texture
36848b8605Smrg
37848b8605Smrg    This is the ARB-approved version of GL_SGIX_depth_texture.
38848b8605Smrg    It allows depth (Z buffer) data to be stored in textures.
39848b8605Smrg    This is used by GL_ARB_shadow
40848b8605Smrg
41848b8605SmrgGL_ARB_shadow
42848b8605Smrg
43848b8605Smrg    Shadow mapping with depth textures.
44848b8605Smrg    This is the ARB-approved version of GL_SGIX_shadow.
45848b8605Smrg
46848b8605SmrgGL_ARB_shadow_ambient
47848b8605Smrg
48848b8605Smrg    Allows one to specify the luminance of shadowed pixels.
49848b8605Smrg    This is the ARB-approved version of GL_SGIX_shadow_ambient.
50848b8605Smrg
51848b8605SmrgGL_EXT_shadow_funcs
52848b8605Smrg
53848b8605Smrg    Extends the set of GL_ARB_shadow texture comparision functions to
54848b8605Smrg    include all eight of standard OpenGL dept-test functions.
55848b8605Smrg
56848b8605SmrgGL_ARB_point_parameters
57848b8605Smrg
58848b8605Smrg    This is basically the same as GL_EXT_point_parameters.
59848b8605Smrg
60848b8605SmrgGL_ARB_texture_env_crossbar
61848b8605Smrg
62848b8605Smrg    Allows any texture combine stage to reference any texture source unit.
63848b8605Smrg
64848b8605SmrgGL_NV_point_sprite
65848b8605Smrg
66848b8605Smrg    For rendering points as textured quads.  Useful for particle effects.
67848b8605Smrg
68848b8605SmrgGL_NV_texture_rectangle  (new in 4.0.4 actually)
69848b8605Smrg
70848b8605Smrg    Allows one to use textures with sizes that are not powers of two.
71848b8605Smrg    Note that mipmapping and several texture wrap modes are not allowed.
72848b8605Smrg
73848b8605SmrgGL_EXT_multi_draw_arrays
74848b8605Smrg
75848b8605Smrg    Allows arrays of vertex arrays to be rendered with one call.
76848b8605Smrg
77848b8605SmrgGL_EXT_stencil_two_side
78848b8605Smrg
79848b8605Smrg   Separate stencil modes for front and back-facing polygons.
80848b8605Smrg
81848b8605SmrgGLX_SGIX_fbconfig & GLX_SGIX_pbuffer
82848b8605Smrg
83848b8605Smrg   Off-screen rendering support.
84848b8605Smrg
85848b8605SmrgGL_ATI_texture_mirror_once
86848b8605Smrg
87848b8605Smrg   Adds two new texture wrap modes: GL_MIRROR_CLAMP_ATI and
88848b8605Smrg   GL_MIRROR_CLAMP_TO_EDGE_ATI.
89848b8605Smrg
90848b8605Smrg
91848b8605Smrg
92848b8605SmrgDevice Driver Status
93848b8605Smrg--------------------
94848b8605Smrg
95848b8605SmrgA number of Mesa's software drivers haven't been actively maintained for
96848b8605Smrgsome time.  We rely on volunteers to maintain many of these drivers.
97848b8605SmrgHere's the current status of all included drivers:
98848b8605Smrg
99848b8605Smrg
100848b8605SmrgDriver			Status
101848b8605Smrg----------------------	---------------------
102848b8605SmrgXMesa (Xlib)		implements OpenGL 1.3
103848b8605SmrgOSMesa (off-screen)	implements OpenGL 1.3
104848b8605SmrgFX (3dfx Voodoo1/2)	implements OpenGL 1.3
105848b8605SmrgSVGA			implements OpenGL 1.3
106848b8605SmrgWind River UGL		implements OpenGL 1.3
107848b8605SmrgWindows/Win32		implements OpenGL 1.3
108848b8605SmrgDOS/DJGPP		implements OpenGL 1.3
109848b8605SmrgGGI			implements OpenGL 1.3
110848b8605SmrgBeOS			needs updating (underway)
111848b8605SmrgAllegro			needs updating
112848b8605SmrgD3D			needs updating
113848b8605SmrgDOS			needs updating
114848b8605Smrg
115848b8605Smrg
116848b8605Smrg
117848b8605SmrgNew features in GLUT
118848b8605Smrg--------------------
119848b8605Smrg
120848b8605Smrg1. Frames per second printing
121848b8605Smrg
122848b8605Smrg   GLUT now looks for an environment variable called "GLUT_FPS".  If it's
123848b8605Smrg   set, GLUT will print out a frames/second statistic to stderr when
124848b8605Smrg   glutSwapBuffers() is called.  By default, frames/second is computed
125848b8605Smrg   and displayed once every 5 seconds.  You can specify a different
126848b8605Smrg   interval (in milliseconds) when you set the env var.  For example
127848b8605Smrg   'export GLUT_FPS=1000' or 'setenv GLUT_FPS 1000' will set the interval
128848b8605Smrg   to one second.
129848b8605Smrg
130848b8605Smrg   NOTE: the demo or application must call the glutInit() function for
131848b8605Smrg   this to work.  Otherwise, the env var will be ignored.
132848b8605Smrg
133848b8605Smrg   Finally, this feature may not be reliable in multi-window programs.
134848b8605Smrg
135848b8605Smrg
136848b8605Smrg2. glutGetProcAddress() function
137848b8605Smrg
138848b8605Smrg   The new function:
139848b8605Smrg
140848b8605Smrg        void *glutGetProcAddress(const char *procName)
141848b8605Smrg
142848b8605Smrg   is a wrapper for glXGetProcAddressARB() and wglGetProcAddress().  It
143848b8605Smrg   lets you dynamically get the address of an OpenGL function at runtime.
144848b8605Smrg   The GLUT_API_VERSION has been bumped to 5, but I haven't bumped the
145848b8605Smrg   GLUT version number from 3.7 since that's probably Mark Kilgard's role.
146848b8605Smrg
147848b8605Smrg   This function should probably also be able to return the address of
148848b8605Smrg   GLUT functions themselves, but it doesn't do that yet.
149848b8605Smrg
150848b8605Smrg
151848b8605Smrg
152848b8605SmrgXXX Things To Do Yet XXXX
153848b8605Smrg-------------------------
154848b8605Smrg
155848b8605Smrgisosurf with vertex program exhibits some missing triangles (probably
156848b8605Smrgwhen recycling the vertex buffer for long prims).
157848b8605Smrg
158848b8605Smrg
159848b8605Smrg
160848b8605SmrgPorting Info
161848b8605Smrg------------
162848b8605Smrg
163848b8605SmrgIf you're porting a DRI or other driver from Mesa 4.0.x to Mesa 4.1 here
164848b8605Smrgare some things to change:
165848b8605Smrg
166848b8605Smrg1. ctx->Texture._ReallyEnabled is obsolete.
167848b8605Smrg
168848b8605Smrg   Since there are now 5 texture targets (1D, 2D, 3D, cube and rect) that
169848b8605Smrg   left room for only 6 units (6*5 < 32) in this field.
170848b8605Smrg   This field is being replaced by ctx->Texture._EnabledUnits which has one
171848b8605Smrg   bit per texture unit.  If the bit k of _EnabledUnits is set, that means
172848b8605Smrg   ctx->Texture.Unit[k]._ReallyEnabled is non-zero.  You'll have to look at
173848b8605Smrg   ctx->Texture.Unit[k]._ReallyEnabled to learn if the 1D, 2D, 3D, cube or
174848b8605Smrg   rect texture is enabled for unit k.
175848b8605Smrg
176848b8605Smrg   This also means that the constants TEXTURE1_*, TEXTURE2_*, etc are
177848b8605Smrg   obsolete.
178848b8605Smrg
179848b8605Smrg   The tokens TEXTURE0_* have been replaced as well (since there's no
180848b8605Smrg   significance to the "0" part:
181848b8605Smrg
182848b8605Smrg   old token           new token
183848b8605Smrg   TEXTURE0_1D         TEXTURE_1D_BIT
184848b8605Smrg   TEXTURE0_2D         TEXTURE_2D_BIT
185848b8605Smrg   TEXTURE0_3D         TEXTURE_3D_BIT
186848b8605Smrg   TEXTURE0_CUBE       TEXTURE_CUBE_BIT
187848b8605Smrg   <none>              TEXTURE_RECT_BIT
188848b8605Smrg
189848b8605Smrg   These tokens are only used for the ctx->Texture.Unit[i].Enabled and
190848b8605Smrg   ctx->Texture.Unit[i]._ReallyEnabled fields.  Exactly 0 or 1 bits will
191848b8605Smrg   be set in _ReallyEnabled at any time!
192848b8605Smrg
193848b8605Smrg   Q: "What's the purpose of Unit[i].Enabled vs Unit[i]._ReallyEnabled?"
194848b8605Smrg   A: The user can enable GL_TEXTURE_1D, GL_TEXTURE_2D, etc for any
195848b8605Smrg      texure unit all at once (an unusual thing to do).
196848b8605Smrg      OpenGL defines priorities that basically say GL_TEXTURE_2D has
197848b8605Smrg      higher priority than GL_TEXTURE_1D, etc.  Also, just because a
198848b8605Smrg      texture target is enabled by the user doesn't mean we'll actually
199848b8605Smrg      use that texture!  If a texture object is incomplete (missing mip-
200848b8605Smrg      map levels, etc) it's as if texturing is disabled for that target.
201848b8605Smrg      The _ReallyEnabled field will have a bit set ONLY if the texture
202848b8605Smrg      target is enabled and complete.  This spares the driver writer from
203848b8605Smrg      examining a _lot_ of GL state to determine which texture target is
204848b8605Smrg      to be used.
205848b8605Smrg
206848b8605Smrg
207848b8605Smrg2. Tnl tokens changes
208848b8605Smrg
209848b8605Smrg   During the implementation of GL_NV_vertex_program some of the vertex
210848b8605Smrg   buffer code was changed.  Specifically, the VERT_* bits defined in
211848b8605Smrg   tnl/t_context.h have been renamed to better match the conventions of
212848b8605Smrg   GL_NV_vertex_program.  The old names are still present but obsolete.
213848b8605Smrg   Drivers should use the newer names.
214848b8605Smrg
215848b8605Smrg   For example:  VERT_RGBA is now VERT_BIT_COLOR0 and
216848b8605Smrg   VERT_SPEC_RGB is now VERT_BIT_COLOR1.
217848b8605Smrg
218848b8605Smrg
219848b8605Smrg
220848b8605Smrg3. Read/Draw Buffer changes
221848b8605Smrg
222848b8605Smrg   The business of setting the current read/draw buffers in Mesa 4.0.x
223848b8605Smrg   was complicated.  It's much simpler now in Mesa 4.1.
224848b8605Smrg
225848b8605Smrg   Here are the changes:
226848b8605Smrg
227848b8605Smrg   - Renamed ctx->Color.DrawDestMask to ctx->Color._DrawDestMask
228848b8605Smrg   - Removed ctx->Color.DriverDrawBuffer
229848b8605Smrg   - Removed ctx->Pixel.DriverReadBuffer
230848b8605Smrg   - Removed ctx->Color.MultiDrawBuffer
231848b8605Smrg   - Removed ctx->Driver.SetDrawBuffer()
232848b8605Smrg   - Removed swrast->Driver.SetReadBuffer().
233848b8605Smrg   - Added ctx->Color._DrawDestMask - a bitmask of FRONT/BACK_LEFT/RIGHT_BIT
234848b8605Smrg     values to indicate the current draw buffers.
235848b8605Smrg   - Added ctx->Pixel._ReadSrcMask to indicate the source for pixel reading.
236848b8605Smrg     The value is _one_ of the FRONT/BACK_LEFT/RIGHT_BIT values.
237848b8605Smrg   - Added ctx->Driver.DrawBuffer() and ctx->Driver.ReadBuffer().
238848b8605Smrg     These functions exactly correspond to glDrawBuffer and glReadBuffer calls.
239848b8605Smrg     Many drivers will set ctx->Driver.DrawBuffer = _swrast_DrawBuffer and
240848b8605Smrg     leave ctx->Draw.ReadBuffer NULL.
241848b8605Smrg     DRI drivers should implement their own function for ctx->Driver.DrawBuffer
242848b8605Smrg     and use it to set the current hardware drawing buffer.  You'll probably
243848b8605Smrg     also want to check for GL_FRONT_AND_BACK mode and fall back to software.
244848b8605Smrg     Call _swrast_DrawBuffer() too, to update the swrast state.
245848b8605Smrg   - Added swrast->Driver.SetBuffer().
246848b8605Smrg     This function should be implemented by all device drivers that use swrast.
247848b8605Smrg     Mesa will call it to specify the buffer to use for span reading AND
248848b8605Smrg     writing and point/line/triangle rendering.
249848b8605Smrg     There should be no confusion between current read or draw buffer anymore.
250848b8605Smrg   - Added swrast->CurrentBuffer to indicate which color buffer to read/draw.
251848b8605Smrg     Will be FRONT_LEFT_BIT, BACK_LEFT_BIT, FRONT_RIGHT_BIT or BACK_RIGHT_BIT.
252848b8605Smrg     This value is usually passed to swrast->Driver.SetBuffer().
253848b8605Smrg
254848b8605Smrg
255848b8605Smrg4. _mesa_create_context() changes.  This function now takes a pointer to
256848b8605Smrg   a __GLimports object.  The __GLimports structure contains function
257848b8605Smrg   pointers to system functions like fprintf(), malloc(), etc.
258848b8605Smrg   The _mesa_init_default_imports() function can be used to initialize
259848b8605Smrg   a __GLimports object.  Most device drivers (like the DRI drivers)
260848b8605Smrg   should use this.
261848b8605Smrg
262848b8605Smrg
263848b8605Smrg5. In tnl's struct vertex_buffer, the field "ProjectedClipCoords"
264848b8605Smrg   has been replaced by "NdcPtr" to better match the OpenGL spec's
265848b8605Smrg   terminology.
266848b8605Smrg
267848b8605Smrg
268848b8605Smrg6. Since GL_EXT_stencil_two_side has been implemented, many of the
269848b8605Smrg   ctx->Stencil fields are now 2-element arrays.  For example,
270848b8605Smrg   "GLenum Ref" is now "GLenum Ref[2]"  The [0] elements are the front-face
271848b8605Smrg   values and the [1] elements are the back-face values.
272848b8605Smrg   ctx->Stencil.ActiveFace is 0 or 1 to indicate the current face for
273848b8605Smrg   the glStencilOp/Func/Mask() functions.
274848b8605Smrg   ctx->Stencil.TestTwoSide controls whether or not 1 or 2-sided stenciling
275848b8605Smrg   is enabled.
276848b8605Smrg
277848b8605Smrg
278848b8605Smrg7. Removed ctx->Polygon._OffsetAny.  Removed ctx->Polygon.OffsetMRD.
279848b8605Smrg
280848b8605Smrg
281848b8605Smrg8. GLfloat / GLchan changes:
282848b8605Smrg
283848b8605Smrg   - Changed ctx->Driver.ClearColor() to take GLfloat[4] instead of GLchan[4].
284848b8605Smrg     ctx->Color.ClearColor is now GLfloat[4] too.
285848b8605Smrg   - Changed ctx->Driver.AlphaRef() to take GLfloat instead of GLchan.
286848b8605Smrg   - ctx->Color.AlphaRef is now GLfloat.
287848b8605Smrg   - texObj->BorderColor is now GLfloat[4].  texObj->_BorderChan is GLchan[4].
288848b8605Smrg
289848b8605Smrg   This is part of an effort to remove all GLchan types from core Mesa so
290848b8605Smrg   that someday we can support 8, 16 and 32-bit color channels dynamically
291848b8605Smrg   at runtime, instead of at compile-time.
292848b8605Smrg
293848b8605Smrg
294848b8605Smrg9. GLboolean ctx->Tranform.ClipEnabled[MAX_CLIP_PLANES] has been replaced
295848b8605Smrg   by GLuint ctx->Transform.ClipPlanesEnabled.  The later is a bitfield.
296848b8605Smrg
297848b8605Smrg
298848b8605Smrg10. There's a new matrix_stack type in mtypes.h used for the Modelview,
299848b8605Smrg   Projection, Color and Texcoord matrix stacks.
300848b8605Smrg
301848b8605Smrg
302848b8605Smrg11. The ctx->Current.* fields have changed a lot.  Now, there's a
303848b8605Smrg   ctx->Current.Attrib[] array for all vertex attributes which matches
304848b8605Smrg   the NV vertex program conventions.
305848b8605Smrg
306848b8605Smrg
307848b8605Smrg----------------------------------------------------------------------
308