Brian Paul | 976c26c | 2001-08-20 16:07:10 +0000 | [diff] [blame] | 1 | |
Brian Paul | a573803 | 2001-09-23 16:10:02 +0000 | [diff] [blame] | 2 | WindML Driver for Mesa 4.0 |
Brian Paul | 976c26c | 2001-08-20 16:07:10 +0000 | [diff] [blame] | 3 | |
| 4 | |
| 5 | Requirements |
| 6 | ------------ |
| 7 | |
| 8 | Tornado 2 + WindML, Cumulative Patchs are recommended. |
| 9 | |
| 10 | I suppose you have a valid WindML installation. Double buffer hardware |
| 11 | gives better performance than double buffer software so if you can |
| 12 | compile your WindML driver with this option, just do it. I/O |
| 13 | redirection is adviced in target server. |
| 14 | |
Brian Paul | 3069330 | 2001-09-10 19:21:13 +0000 | [diff] [blame] | 15 | |
Brian Paul | 976c26c | 2001-08-20 16:07:10 +0000 | [diff] [blame] | 16 | Tested on |
| 17 | --------- |
| 18 | |
| 19 | During the development, my main target was a CoolMonster: |
| 20 | - Video card: CT69000 |
| 21 | - CPU: PENTIUM 266MHz |
| 22 | |
| 23 | and my host a Windows NT + Tornado 2. |
| 24 | |
| 25 | |
| 26 | Installation |
| 27 | ------------ |
| 28 | |
| 29 | 1. Mesa sources must be in root directory (C:\) |
| 30 | |
| 31 | 2. Add the following line to your torVars.bat: |
| 32 | set MESA_BASE=C:\Mesa |
| 33 | |
| 34 | OR copy the new torVars.bat in your bin path: |
| 35 | c:/Mesa/src/ugl/tornado/torVars.sample -> |
| 36 | /mnt/nt/Tornado/host/x86-win32/bin/torVars (for example) |
| 37 | |
| 38 | 3. In a command prompt: |
| 39 | $ torVars |
| 40 | $ cd c:\Mesa |
| 41 | $ make -f Makefile.ugl CPU=PENTIUM |
| 42 | |
| 43 | Take a long while... |
| 44 | |
| 45 | 5. Include all the files from ugldemos folder to build some downloadable |
| 46 | application modules |
| 47 | |
| 48 | 4. Download UGL/Mesa object files on target |
| 49 | |
| 50 | For example via the WindShell: |
| 51 | ld < c:\Tornado\target\lib\objMesaGL.o |
| 52 | ld < c:\Tornado\target\lib\objMesaUGL.o |
| 53 | ld < c:\Tornado\target\lib\objMesaGLU.o |
| 54 | ld < c:\Tornado\target\lib\objGLUTshapes.o |
| 55 | ld < c:\Tornado\target\lib\objMesaOS.o |
| 56 | |
Brian Paul | 3069330 | 2001-09-10 19:21:13 +0000 | [diff] [blame] | 57 | You can put the previous lines in a file and use: |
| 58 | < filename |
| 59 | |
Brian Paul | 976c26c | 2001-08-20 16:07:10 +0000 | [diff] [blame] | 60 | 6. Download the application modules. |
| 61 | |
| 62 | 7. In WindShell, run: |
| 63 | -> uglalldemos |
| 64 | |
| 65 | During the show some messages will appear, it provides some useful |
| 66 | information on key management. |
| 67 | |
| 68 | |
| 69 | Coding |
| 70 | ------ |
| 71 | |
| 72 | Sample Usage: |
| 73 | |
| 74 | In addition to the usual ugl calls to initialize UGL, (may be find an |
| 75 | input driver), you must do the following to use the UGL/Mesa interface: |
| 76 | |
| 77 | 1. Call uglMesaCreateContext() to create a UGL/Mesa rendering context, |
| 78 | given the display format. |
| 79 | |
| 80 | 2. Call uglMesaMakeCurrent() to bind the UGL/Mesa buffers to an |
| 81 | UGL/Mesa Context and to make the context the current one. |
| 82 | |
| 83 | 3. Make gl* calls to render your graphics. |
| 84 | |
| 85 | 4. Use uglMesaSwapBuffers() when double buffering to swap front/back buffers. |
| 86 | |
| 87 | 5. Before the UGL is destroyed, call MesaDestroyContext(). |
| 88 | |
Brian Paul | 3069330 | 2001-09-10 19:21:13 +0000 | [diff] [blame] | 89 | 6. Before exiting, call if required uglEventQDestroy and then |
| 90 | uglDeinitialize(); |
Brian Paul | 976c26c | 2001-08-20 16:07:10 +0000 | [diff] [blame] | 91 | |
| 92 | Limitations |
| 93 | ----------- |
| 94 | |
| 95 | I found the following limitations in my driver : |
| 96 | - Color Indexed management is only in 8 bits |
Brian Paul | 3069330 | 2001-09-10 19:21:13 +0000 | [diff] [blame] | 97 | - It's possible to mix UGL/OpenGL application with a software |
| 98 | double buffer |
Brian Paul | 976c26c | 2001-08-20 16:07:10 +0000 | [diff] [blame] | 99 | |
| 100 | Modifications |
| 101 | ------------ |
| 102 | |
| 103 | New files in Mesa: |
| 104 | - Makefile.ugl |
| 105 | - rules.windmlmesa |
| 106 | - docs/README.UGL |
| 107 | - include/GL/uglmesa.h |
| 108 | - si-glu/Makefile.ugl |
| 109 | - src/Makefile.ugl |
| 110 | - src/ugl/torGLUTShapesInit.c |
| 111 | - src/ugl/torMesaUGLInit.c |
| 112 | - src/ugl/ugl_api.c |
| 113 | - src/ugl/ugl_dd.c |
| 114 | - src/ugl/ugl_glutshapes.c |
| 115 | - src/ugl/ugl_line.c |
| 116 | - src/ugl/ugl_span.c |
| 117 | - src/ugl/ugl_tri.c |
| 118 | - src/ugl/uglmesaP.h |
| 119 | - ugldemos/* |
| 120 | |
| 121 | Modified files in Tornado 2.0: |
| 122 | - c:\Tornado\host\x86-win32\bin\torVars.bat |
| 123 | rem Command line build environments |
| 124 | set WIND_HOST_TYPE=x86-win32 |
| 125 | set WIND_BASE=C:\Tornado |
| 126 | set MESA_BASE=C:\Mesa |
| 127 | set PATH=%WIND_BASE%\host\%WIND_HOST_TYPE%\bin;%PATH% |
| 128 | - c:\Tornado\target\config\comps\VxWorks\01uglmesa.cdf |
| 129 | - c:\Tornado\target\h\GL\* |
| 130 | |
| 131 | Todo |
| 132 | ---- |
| 133 | - GCC 2.96, ASM compilation |
| 134 | |
| 135 | Thanks to: |
| 136 | ---------- |
| 137 | |
| 138 | Precision Insight team for their great job around Mesa, XFree, and DRI. |
| 139 | Wind River Systems to take me as an intern. |
| 140 | |
| 141 | |
| 142 | Stephane Raimbault |
| 143 | <stephane.raimbault@windriver.com> |
| 144 | <stephane.raimbault@deesse.univ-lemans.fr> |
| 145 | |
| 146 | July 24, 2001 |