Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4358 Serge 1
 
2
3
 
4
 
5
=======
6
7
 
8
latest setup.exe from Cygwin the GL (Mesa) libraries and include are already
9
installed in /usr/X11R6.
10
11
 
12
13
 
14
============
15
16
 
17
18
 
19
    type 'make cygwin-sl'.
20
21
 
22
    Mesa-x.y/bin directories.
23
24
 
25
 
26
    type 'make cygwin-static'.
27
    When finished, the Mesa libraries will be in the Mesa-x.y/lib/ directory.
28
29
 
30
   After you've compiled Mesa and tried the demos I recommend the following
31
   procedure for "installing" Mesa.
32
33
 
34
	cp -a include/GL /usr/X11R6/include
35
36
 
37
	cp -a lib/* /usr/X11R6ocal/lib
38
39
 
40
	cp -a lib/cyg* /usr/X11R6/bin
41
42
 
43
   If you want to use Mesa or OpenGL in your Xt/Motif program you can build
44
   the widgets found in either the widgets-mesa or widgets-sgi directories.
45
   The former were written for Mesa and the later are the original SGI
46
   widgets.  Look in those directories for more information.
47
   For the Motif widgets you must have downloaded the lesstif package.
48
49
 
50
 
51
=================
52
53
 
54
   The file src/mesa/main/config.h has many parameters which you can adjust
55
   such as maximum number of lights, clipping planes, maximum texture size,
56
   etc.  In particular, you may want to change DEPTH_BITS from 16 to 32
57
   if a 16-bit depth buffer isn't precise enough for your application.
58
59
 
60
 
61
   If you compile shared libraries (Win32 DLLS) you may have to set an
62
   environment variable to specify where the Mesa libraries are located.
63
   Set the PATH variable to include /your-dir/Mesa-2.6/bin.
64
   Otherwise, when you try to run a demo it may fail with a message saying
65
   that one or more DLL couldn't be found.
66
67
 
68
 
69
   Two versions of the Xt/Motif OpenGL drawing area widgets are included:
70
71
 
72
      widgets-mesa/	Mesa-tuned widgets
73
74
 
75
76
 
77
 
78
   Togl is an OpenGL/Mesa widget for Tcl/Tk.
79
   See http://togl.sourceforge.net for more information.
80
81
 
82
 
83
 
84
   Mesa supports RGB(A) rendering into almost any X visual type and depth.
85
86
 
87
   for the given attribute list.  However, if this doesn't suit your needs
88
   you can force Mesa to use any X visual you want (any supported by your
89
   X server that is) by setting the MESA_RGB_VISUAL and MESA_CI_VISUAL
90
   environment variables.  When an RGB visual is requested, glXChooseVisual
91
   will first look if the MESA_RGB_VISUAL variable is defined.  If so, it
92
   will try to use the specified visual.  Similarly, when a color index
93
   visual is requested, glXChooseVisual will look for the MESA_CI_VISUAL
94
   variable.
95
96
 
97
   Here are some examples:
98
99
 
100
	% setenv MESA_RGB_VISUAL "TrueColor 8"		// 8-bit TrueColor
101
	% setenv MESA_CI_VISUAL "PseudoColor 12"	// 12-bit PseudoColor
102
	% setenv MESA_RGB_VISUAL "PseudoColor 8"	// 8-bit PseudoColor
103
104
 
105
	$ export MESA_RGB_VISUAL="TrueColor 8"
106
	$ export MESA_CI_VISUAL="PseudoColor 12"
107
	$ export MESA_RGB_VISUAL="PseudoColor 8"
108
109
 
110
 
111
   Mesa can use either an X Pixmap or XImage as the backbuffer when in
112
   double buffer mode.  Using GLX, the default is to use an XImage.  The
113
   MESA_BACK_BUFFER environment variable can override this.  The valid
114
   values for MESA_BACK_BUFFER are:  Pixmap and XImage (only the first
115
   letter is checked, case doesn't matter).
116
117
 
118
   XImage is faster when Mesa has to do pixel-by-pixel rendering.  If you
119
   need depth buffering the XImage will almost surely be faster.  Exper-
120
   iment with the MESA_BACK_BUFFER variable to see which is faster for
121
   your application.
122
123
 
124
 
125
   When using Mesa directly or with GLX, it's up to the application writer
126
   to create a window with an appropriate colormap.  The aux, tk, and GLUT
127
   toolkits try to minimize colormap "flashing" by sharing colormaps when
128
   possible.  Specifically, if the visual and depth of the window matches
129
   that of the root window, the root window's colormap will be shared by
130
   the Mesa window.  Otherwise, a new, private colormap will be allocated.
131
132
 
133
   it needs, resulting in poor color quality.  This can happen when a
134
   large number of colorcells in the root colormap are already allocated.
135
   To prevent colormap sharing in aux, tk and GLUT, define the environment
136
   variable MESA_PRIVATE_CMAP.  The value isn't significant.
137
138
 
139
 
140
   To compensate for the nonlinear relationship between pixel values
141
   and displayed intensities, there is a gamma correction feature in
142
   Mesa.  Some systems, such as Silicon Graphics, support gamma
143
   correction in hardware (man gamma) so you won't need to use Mesa's
144
   gamma facility.  Other systems, however, may need gamma adjustment
145
   to produce images which look correct.  If in the past you thought
146
   Mesa's images were too dim, read on.
147
148
 
149
   variable.  Its value is of the form "Gr Gg Gb" or just "G" where
150
   Gr is the red gamma value, Gg is the green gamma value, Gb is the
151
   blue gamma value and G is one gamma value to use for all three
152
   channels.  Each value is a positive real number typically in the
153
   range 1.0 to 2.5.  The defaults are all 1.0, effectively disabling
154
   gamma correction.  Examples using csh:
155
156
 
157
	% setenv MESA_GAMMA "2.0"		// same gamma for R,G,B
158
159
 
160
   value for your display.  With correct gamma values, the color intensities
161
   displayed in the top row (drawn by dithering) should nearly match those
162
   in the bottom row (drawn as grays).
163
164
 
165
   on HP displays using the HP-ColorRecovery technology.
166
167
 
168
   a "linear" pixel value to a gamma-corrected pixel value.  There is a
169
   small performance penalty.  Gamma correction only works in RGB mode.
170
   Also be aware that pixel values read back from the frame buffer will
171
   not be "un-corrected" so glReadPixels may not return the same data
172
   drawn with glDrawPixels.
173
174
 
175
   http://www.inforamp.net/~poynton/notes/colour_and_gamma/GammaFAQ.html
176
177
 
178
 
179
180
 
181
   hardware and X server support.  To determine if your X server has
182
   overlay support you can test for the SERVER_OVERLAY_VISUALS property:
183
184
 
185
186
 
187
 
188
189
 
190
   will be used when clearing the color buffer.  This is only applicable
191
   to HP systems with the HPCR (Color Recovery) system.
192
193
 
194
 
195
==========
196
   There are three Mesa-specific GLX extensions at this time.
197
198
 
199
200
 
201
202
 
203
                                           Pixmap pixmap, Colormap cmap )
204
205
 
206
      Since Mesa supports RGB rendering into any X visual, not just True-
207
      Color or DirectColor, Mesa needs colormap information to convert RGB
208
      values into pixel values.  An X window carries this information but a
209
      pixmap does not.  This function associates a colormap to a GLX pixmap.
210
      See the xdemos/glxpixmap.c file for an example of how to use this
211
      extension.
212
213
 
214
215
 
216
      alpha) buffers with each X window it draws into.  These ancillary
217
      buffers are allocated for each X window the first time the X window
218
      is passed to glXMakeCurrent().  Mesa, however, can't detect when an
219
      X window has been destroyed in order to free the ancillary buffers.
220
221
 
222
      the client calls the glXCreateContext() or glXDestroyContext()
223
      functions.  This may not be sufficient in all situations though.
224
225
 
226
      deallocate the ancillary buffers by calling glxReleaseBuffersMESA()
227
      just before an X window is destroyed.  For example:
228
229
 
230
            glXReleaseBuffersMESA( dpy, window );
231
         #endif
232
         XDestroyWindow( dpy, window );
233
234
 
235
236
 
237
238
 
239
      like glXSwapBuffers() but only copies a sub-region of the window
240
      instead of the whole window.
241
242
 
243
244
 
245
 
246
 
247
   MESA_RGB_VISUAL - specifies the X visual and depth for RGB mode (X only)
248
   MESA_CI_VISUAL - specifies the X visual and depth for CI mode (X only)
249
   MESA_BACK_BUFFER - specifies how to implement the back color buffer (X only)
250
   MESA_PRIVATE_CMAP - force aux/tk libraries to use private colormaps (X only)
251
   MESA_GAMMA - gamma correction coefficients (X only)
252
253
 
254
 
255
README.CYGWIN - lassauge April 2004 - based on README.X11
256