1af69d88dSmrg
2af69d88dSmrg                            Mesa 4.1 release notes
3af69d88dSmrg
4af69d88dSmrg                               October 29, 2002
5af69d88dSmrg
6af69d88dSmrg                                PLEASE READ!!!!
7af69d88dSmrg
8af69d88dSmrg
9af69d88dSmrg
10af69d88dSmrgIntroduction
11af69d88dSmrg------------
12af69d88dSmrg
13af69d88dSmrgMesa uses an even/odd version number scheme like the Linux kernel.
14af69d88dSmrgEven numbered versions (such as 4.0) designate stable releases.
15af69d88dSmrgOdd numbered versions (such as 4.1) designate new developmental releases.
16af69d88dSmrg
17af69d88dSmrg
18af69d88dSmrgNew Features in Mesa 4.1
19af69d88dSmrg------------------------
20af69d88dSmrg
21af69d88dSmrgNew extensions.  Docs at http://oss.sgi.com/projects/ogl-sample/registry/
22af69d88dSmrg
23af69d88dSmrgGL_NV_vertex_program
24af69d88dSmrg
25af69d88dSmrg    NVIDIA's vertex programming extension
26af69d88dSmrg
27af69d88dSmrgGL_NV_vertex_program1_1
28af69d88dSmrg
29af69d88dSmrg    A few features built on top of GL_NV_vertex_program
30af69d88dSmrg
31af69d88dSmrgGL_ARB_window_pos
32af69d88dSmrg
33af69d88dSmrg    This is the ARB-approved version of GL_MESA_window_pos
34af69d88dSmrg
35af69d88dSmrgGL_ARB_depth_texture
36af69d88dSmrg
37af69d88dSmrg    This is the ARB-approved version of GL_SGIX_depth_texture.
38af69d88dSmrg    It allows depth (Z buffer) data to be stored in textures.
39af69d88dSmrg    This is used by GL_ARB_shadow
40af69d88dSmrg
41af69d88dSmrgGL_ARB_shadow
42af69d88dSmrg
43af69d88dSmrg    Shadow mapping with depth textures.
44af69d88dSmrg    This is the ARB-approved version of GL_SGIX_shadow.
45af69d88dSmrg
46af69d88dSmrgGL_ARB_shadow_ambient
47af69d88dSmrg
48af69d88dSmrg    Allows one to specify the luminance of shadowed pixels.
49af69d88dSmrg    This is the ARB-approved version of GL_SGIX_shadow_ambient.
50af69d88dSmrg
51af69d88dSmrgGL_EXT_shadow_funcs
52af69d88dSmrg
53af69d88dSmrg    Extends the set of GL_ARB_shadow texture comparision functions to
54af69d88dSmrg    include all eight of standard OpenGL dept-test functions.
55af69d88dSmrg
56af69d88dSmrgGL_ARB_point_parameters
57af69d88dSmrg
58af69d88dSmrg    This is basically the same as GL_EXT_point_parameters.
59af69d88dSmrg
60af69d88dSmrgGL_ARB_texture_env_crossbar
61af69d88dSmrg
62af69d88dSmrg    Allows any texture combine stage to reference any texture source unit.
63af69d88dSmrg
64af69d88dSmrgGL_NV_point_sprite
65af69d88dSmrg
66af69d88dSmrg    For rendering points as textured quads.  Useful for particle effects.
67af69d88dSmrg
68af69d88dSmrgGL_NV_texture_rectangle  (new in 4.0.4 actually)
69af69d88dSmrg
70af69d88dSmrg    Allows one to use textures with sizes that are not powers of two.
71af69d88dSmrg    Note that mipmapping and several texture wrap modes are not allowed.
72af69d88dSmrg
73af69d88dSmrgGL_EXT_multi_draw_arrays
74af69d88dSmrg
75af69d88dSmrg    Allows arrays of vertex arrays to be rendered with one call.
76af69d88dSmrg
77af69d88dSmrgGL_EXT_stencil_two_side
78af69d88dSmrg
79af69d88dSmrg   Separate stencil modes for front and back-facing polygons.
80af69d88dSmrg
81af69d88dSmrgGLX_SGIX_fbconfig & GLX_SGIX_pbuffer
82af69d88dSmrg
83af69d88dSmrg   Off-screen rendering support.
84af69d88dSmrg
85af69d88dSmrgGL_ATI_texture_mirror_once
86af69d88dSmrg
87af69d88dSmrg   Adds two new texture wrap modes: GL_MIRROR_CLAMP_ATI and
88af69d88dSmrg   GL_MIRROR_CLAMP_TO_EDGE_ATI.
89af69d88dSmrg
90af69d88dSmrg
91af69d88dSmrg
92af69d88dSmrgDevice Driver Status
93af69d88dSmrg--------------------
94af69d88dSmrg
95af69d88dSmrgA number of Mesa's software drivers haven't been actively maintained for
96af69d88dSmrgsome time.  We rely on volunteers to maintain many of these drivers.
97af69d88dSmrgHere's the current status of all included drivers:
98af69d88dSmrg
99af69d88dSmrg
100af69d88dSmrgDriver			Status
101af69d88dSmrg----------------------	---------------------
102af69d88dSmrgXMesa (Xlib)		implements OpenGL 1.3
103af69d88dSmrgOSMesa (off-screen)	implements OpenGL 1.3
104af69d88dSmrgFX (3dfx Voodoo1/2)	implements OpenGL 1.3
105af69d88dSmrgSVGA			implements OpenGL 1.3
106af69d88dSmrgWind River UGL		implements OpenGL 1.3
107af69d88dSmrgWindows/Win32		implements OpenGL 1.3
108af69d88dSmrgDOS/DJGPP		implements OpenGL 1.3
109af69d88dSmrgGGI			implements OpenGL 1.3
110af69d88dSmrgBeOS			needs updating (underway)
111af69d88dSmrgAllegro			needs updating
112af69d88dSmrgD3D			needs updating
113af69d88dSmrgDOS			needs updating
114af69d88dSmrg
115af69d88dSmrg
116af69d88dSmrg
117af69d88dSmrgNew features in GLUT
118af69d88dSmrg--------------------
119af69d88dSmrg
120af69d88dSmrg1. Frames per second printing
121af69d88dSmrg
122af69d88dSmrg   GLUT now looks for an environment variable called "GLUT_FPS".  If it's
123af69d88dSmrg   set, GLUT will print out a frames/second statistic to stderr when
124af69d88dSmrg   glutSwapBuffers() is called.  By default, frames/second is computed
125af69d88dSmrg   and displayed once every 5 seconds.  You can specify a different
126af69d88dSmrg   interval (in milliseconds) when you set the env var.  For example
127af69d88dSmrg   'export GLUT_FPS=1000' or 'setenv GLUT_FPS 1000' will set the interval
128af69d88dSmrg   to one second.
129af69d88dSmrg
130af69d88dSmrg   NOTE: the demo or application must call the glutInit() function for
131af69d88dSmrg   this to work.  Otherwise, the env var will be ignored.
132af69d88dSmrg
133af69d88dSmrg   Finally, this feature may not be reliable in multi-window programs.
134af69d88dSmrg
135af69d88dSmrg
136af69d88dSmrg2. glutGetProcAddress() function
137af69d88dSmrg
138af69d88dSmrg   The new function:
139af69d88dSmrg
140af69d88dSmrg        void *glutGetProcAddress(const char *procName)
141af69d88dSmrg
142af69d88dSmrg   is a wrapper for glXGetProcAddressARB() and wglGetProcAddress().  It
143af69d88dSmrg   lets you dynamically get the address of an OpenGL function at runtime.
144af69d88dSmrg   The GLUT_API_VERSION has been bumped to 5, but I haven't bumped the
145af69d88dSmrg   GLUT version number from 3.7 since that's probably Mark Kilgard's role.
146af69d88dSmrg
147af69d88dSmrg   This function should probably also be able to return the address of
148af69d88dSmrg   GLUT functions themselves, but it doesn't do that yet.
149af69d88dSmrg
150af69d88dSmrg
151af69d88dSmrg
152af69d88dSmrgXXX Things To Do Yet XXXX
153af69d88dSmrg-------------------------
154af69d88dSmrg
155af69d88dSmrgisosurf with vertex program exhibits some missing triangles (probably
156af69d88dSmrgwhen recycling the vertex buffer for long prims).
157af69d88dSmrg
158af69d88dSmrg
159af69d88dSmrg
160af69d88dSmrgPorting Info
161af69d88dSmrg------------
162af69d88dSmrg
163af69d88dSmrgIf you're porting a DRI or other driver from Mesa 4.0.x to Mesa 4.1 here
164af69d88dSmrgare some things to change:
165af69d88dSmrg
166af69d88dSmrg1. ctx->Texture._ReallyEnabled is obsolete.
167af69d88dSmrg
168af69d88dSmrg   Since there are now 5 texture targets (1D, 2D, 3D, cube and rect) that
169af69d88dSmrg   left room for only 6 units (6*5 < 32) in this field.
170af69d88dSmrg   This field is being replaced by ctx->Texture._EnabledUnits which has one
171af69d88dSmrg   bit per texture unit.  If the bit k of _EnabledUnits is set, that means
172af69d88dSmrg   ctx->Texture.Unit[k]._ReallyEnabled is non-zero.  You'll have to look at
173af69d88dSmrg   ctx->Texture.Unit[k]._ReallyEnabled to learn if the 1D, 2D, 3D, cube or
174af69d88dSmrg   rect texture is enabled for unit k.
175af69d88dSmrg
176af69d88dSmrg   This also means that the constants TEXTURE1_*, TEXTURE2_*, etc are
177af69d88dSmrg   obsolete.
178af69d88dSmrg
179af69d88dSmrg   The tokens TEXTURE0_* have been replaced as well (since there's no
180af69d88dSmrg   significance to the "0" part:
181af69d88dSmrg
182af69d88dSmrg   old token           new token
183af69d88dSmrg   TEXTURE0_1D         TEXTURE_1D_BIT
184af69d88dSmrg   TEXTURE0_2D         TEXTURE_2D_BIT
185af69d88dSmrg   TEXTURE0_3D         TEXTURE_3D_BIT
186af69d88dSmrg   TEXTURE0_CUBE       TEXTURE_CUBE_BIT
187af69d88dSmrg   <none>              TEXTURE_RECT_BIT
188af69d88dSmrg
189af69d88dSmrg   These tokens are only used for the ctx->Texture.Unit[i].Enabled and
190af69d88dSmrg   ctx->Texture.Unit[i]._ReallyEnabled fields.  Exactly 0 or 1 bits will
191af69d88dSmrg   be set in _ReallyEnabled at any time!
192af69d88dSmrg
193af69d88dSmrg   Q: "What's the purpose of Unit[i].Enabled vs Unit[i]._ReallyEnabled?"
194af69d88dSmrg   A: The user can enable GL_TEXTURE_1D, GL_TEXTURE_2D, etc for any
195af69d88dSmrg      texure unit all at once (an unusual thing to do).
196af69d88dSmrg      OpenGL defines priorities that basically say GL_TEXTURE_2D has
197af69d88dSmrg      higher priority than GL_TEXTURE_1D, etc.  Also, just because a
198af69d88dSmrg      texture target is enabled by the user doesn't mean we'll actually
199af69d88dSmrg      use that texture!  If a texture object is incomplete (missing mip-
200af69d88dSmrg      map levels, etc) it's as if texturing is disabled for that target.
201af69d88dSmrg      The _ReallyEnabled field will have a bit set ONLY if the texture
202af69d88dSmrg      target is enabled and complete.  This spares the driver writer from
203af69d88dSmrg      examining a _lot_ of GL state to determine which texture target is
204af69d88dSmrg      to be used.
205af69d88dSmrg
206af69d88dSmrg
207af69d88dSmrg2. Tnl tokens changes
208af69d88dSmrg
209af69d88dSmrg   During the implementation of GL_NV_vertex_program some of the vertex
210af69d88dSmrg   buffer code was changed.  Specifically, the VERT_* bits defined in
211af69d88dSmrg   tnl/t_context.h have been renamed to better match the conventions of
212af69d88dSmrg   GL_NV_vertex_program.  The old names are still present but obsolete.
213af69d88dSmrg   Drivers should use the newer names.
214af69d88dSmrg
215af69d88dSmrg   For example:  VERT_RGBA is now VERT_BIT_COLOR0 and
216af69d88dSmrg   VERT_SPEC_RGB is now VERT_BIT_COLOR1.
217af69d88dSmrg
218af69d88dSmrg
219af69d88dSmrg
220af69d88dSmrg3. Read/Draw Buffer changes
221af69d88dSmrg
222af69d88dSmrg   The business of setting the current read/draw buffers in Mesa 4.0.x
223af69d88dSmrg   was complicated.  It's much simpler now in Mesa 4.1.
224af69d88dSmrg
225af69d88dSmrg   Here are the changes:
226af69d88dSmrg
227af69d88dSmrg   - Renamed ctx->Color.DrawDestMask to ctx->Color._DrawDestMask
228af69d88dSmrg   - Removed ctx->Color.DriverDrawBuffer
229af69d88dSmrg   - Removed ctx->Pixel.DriverReadBuffer
230af69d88dSmrg   - Removed ctx->Color.MultiDrawBuffer
231af69d88dSmrg   - Removed ctx->Driver.SetDrawBuffer()
232af69d88dSmrg   - Removed swrast->Driver.SetReadBuffer().
233af69d88dSmrg   - Added ctx->Color._DrawDestMask - a bitmask of FRONT/BACK_LEFT/RIGHT_BIT
234af69d88dSmrg     values to indicate the current draw buffers.
235af69d88dSmrg   - Added ctx->Pixel._ReadSrcMask to indicate the source for pixel reading.
236af69d88dSmrg     The value is _one_ of the FRONT/BACK_LEFT/RIGHT_BIT values.
237af69d88dSmrg   - Added ctx->Driver.DrawBuffer() and ctx->Driver.ReadBuffer().
238af69d88dSmrg     These functions exactly correspond to glDrawBuffer and glReadBuffer calls.
239af69d88dSmrg     Many drivers will set ctx->Driver.DrawBuffer = _swrast_DrawBuffer and
240af69d88dSmrg     leave ctx->Draw.ReadBuffer NULL.
241af69d88dSmrg     DRI drivers should implement their own function for ctx->Driver.DrawBuffer
242af69d88dSmrg     and use it to set the current hardware drawing buffer.  You'll probably
243af69d88dSmrg     also want to check for GL_FRONT_AND_BACK mode and fall back to software.
244af69d88dSmrg     Call _swrast_DrawBuffer() too, to update the swrast state.
245af69d88dSmrg   - Added swrast->Driver.SetBuffer().
246af69d88dSmrg     This function should be implemented by all device drivers that use swrast.
247af69d88dSmrg     Mesa will call it to specify the buffer to use for span reading AND
248af69d88dSmrg     writing and point/line/triangle rendering.
249af69d88dSmrg     There should be no confusion between current read or draw buffer anymore.
250af69d88dSmrg   - Added swrast->CurrentBuffer to indicate which color buffer to read/draw.
251af69d88dSmrg     Will be FRONT_LEFT_BIT, BACK_LEFT_BIT, FRONT_RIGHT_BIT or BACK_RIGHT_BIT.
252af69d88dSmrg     This value is usually passed to swrast->Driver.SetBuffer().
253af69d88dSmrg
254af69d88dSmrg
255af69d88dSmrg4. _mesa_create_context() changes.  This function now takes a pointer to
256af69d88dSmrg   a __GLimports object.  The __GLimports structure contains function
257af69d88dSmrg   pointers to system functions like fprintf(), malloc(), etc.
258af69d88dSmrg   The _mesa_init_default_imports() function can be used to initialize
259af69d88dSmrg   a __GLimports object.  Most device drivers (like the DRI drivers)
260af69d88dSmrg   should use this.
261af69d88dSmrg
262af69d88dSmrg
263af69d88dSmrg5. In tnl's struct vertex_buffer, the field "ProjectedClipCoords"
264af69d88dSmrg   has been replaced by "NdcPtr" to better match the OpenGL spec's
265af69d88dSmrg   terminology.
266af69d88dSmrg
267af69d88dSmrg
268af69d88dSmrg6. Since GL_EXT_stencil_two_side has been implemented, many of the
269af69d88dSmrg   ctx->Stencil fields are now 2-element arrays.  For example,
270af69d88dSmrg   "GLenum Ref" is now "GLenum Ref[2]"  The [0] elements are the front-face
271af69d88dSmrg   values and the [1] elements are the back-face values.
272af69d88dSmrg   ctx->Stencil.ActiveFace is 0 or 1 to indicate the current face for
273af69d88dSmrg   the glStencilOp/Func/Mask() functions.
274af69d88dSmrg   ctx->Stencil.TestTwoSide controls whether or not 1 or 2-sided stenciling
275af69d88dSmrg   is enabled.
276af69d88dSmrg
277af69d88dSmrg
278af69d88dSmrg7. Removed ctx->Polygon._OffsetAny.  Removed ctx->Polygon.OffsetMRD.
279af69d88dSmrg
280af69d88dSmrg
281af69d88dSmrg8. GLfloat / GLchan changes:
282af69d88dSmrg
283af69d88dSmrg   - Changed ctx->Driver.ClearColor() to take GLfloat[4] instead of GLchan[4].
284af69d88dSmrg     ctx->Color.ClearColor is now GLfloat[4] too.
285af69d88dSmrg   - Changed ctx->Driver.AlphaRef() to take GLfloat instead of GLchan.
286af69d88dSmrg   - ctx->Color.AlphaRef is now GLfloat.
287af69d88dSmrg   - texObj->BorderColor is now GLfloat[4].  texObj->_BorderChan is GLchan[4].
288af69d88dSmrg
289af69d88dSmrg   This is part of an effort to remove all GLchan types from core Mesa so
290af69d88dSmrg   that someday we can support 8, 16 and 32-bit color channels dynamically
291af69d88dSmrg   at runtime, instead of at compile-time.
292af69d88dSmrg
293af69d88dSmrg
294af69d88dSmrg9. GLboolean ctx->Tranform.ClipEnabled[MAX_CLIP_PLANES] has been replaced
295af69d88dSmrg   by GLuint ctx->Transform.ClipPlanesEnabled.  The later is a bitfield.
296af69d88dSmrg
297af69d88dSmrg
298af69d88dSmrg10. There's a new matrix_stack type in mtypes.h used for the Modelview,
299af69d88dSmrg   Projection, Color and Texcoord matrix stacks.
300af69d88dSmrg
301af69d88dSmrg
302af69d88dSmrg11. The ctx->Current.* fields have changed a lot.  Now, there's a
303af69d88dSmrg   ctx->Current.Attrib[] array for all vertex attributes which matches
304af69d88dSmrg   the NV vertex program conventions.
305af69d88dSmrg
306af69d88dSmrg
307af69d88dSmrg----------------------------------------------------------------------
308