Brian Paul | 324af0b | 1999-01-30 04:00:31 +0000 | [diff] [blame] | 1 | |
Brian Paul | a822d1d | 1999-02-06 06:32:20 +0000 | [diff] [blame] | 2 | Mesa / BeOS Information |
Brian Paul | 324af0b | 1999-01-30 04:00:31 +0000 | [diff] [blame] | 3 | |
| 4 | |
| 5 | |
Brian Paul | 473e51f | 2002-09-19 16:19:43 +0000 | [diff] [blame] | 6 | * Introduction |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 7 | |
Brian Paul | 4d69189 | 2004-08-14 15:23:51 +0000 | [diff] [blame] | 8 | Brian Paul added in Mesa 3.1 a driver for BeOS R4.5 operating system. |
| 9 | This driver implements a clone of the BGLView class. This class, |
| 10 | derived from BView, allows OpenGL rendering into any BeOS window. His |
| 11 | driver was updated in Mesa 4.1 and again in version 6.1 by Philippe |
| 12 | Houdoin, who's maintaining this driver since. |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 13 | |
Brian Paul | a822d1d | 1999-02-06 06:32:20 +0000 | [diff] [blame] | 14 | Any application which uses the BGLView should be able to use Mesa |
| 15 | instead of Be's OpenGL without changing any code. |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 16 | |
Brian Paul | 473e51f | 2002-09-19 16:19:43 +0000 | [diff] [blame] | 17 | Since Be's OpenGL implementation (as of R5) is basically just the |
Brian Paul | a822d1d | 1999-02-06 06:32:20 +0000 | [diff] [blame] | 18 | SGI sample implementation, it's pretty slow. You'll see that Mesa |
| 19 | is considerably faster. |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 20 | |
| 21 | |
Brian Paul | 473e51f | 2002-09-19 16:19:43 +0000 | [diff] [blame] | 22 | * Source Code |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 23 | |
Brian Paul | 50f20ec | 2003-12-13 01:26:14 +0000 | [diff] [blame] | 24 | The source code for the driver is in src/mesa/drivers/beos/ directory. |
Brian Paul | a822d1d | 1999-02-06 06:32:20 +0000 | [diff] [blame] | 25 | It's not 100% finished at this time but many GLUT-based demos are |
Brian Paul | 808a013 | 1999-03-03 02:34:04 +0000 | [diff] [blame] | 26 | working. No optimizations have been made at this time. |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 27 | |
| 28 | |
Brian Paul | 473e51f | 2002-09-19 16:19:43 +0000 | [diff] [blame] | 29 | * Compiling |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 30 | |
Philippe Houdoin | fd7f62a | 2004-10-13 00:35:55 +0000 | [diff] [blame] | 31 | Since Mesa 6.x, it can be build under BeOS with both the R5 builtin gcc version |
| 32 | or more recent gcc versions available for BeOS, like this gcc version 2.95.3 for BeOS |
| 33 | you can find at http://www.bebits.com/app/2157. |
| 34 | Anyway, keep in mind that to take full advantage of Mesa x86 optimizations, you better |
| 35 | want to use gcc 2.95.3 or sooner versions... |
Brian Paul | 473e51f | 2002-09-19 16:19:43 +0000 | [diff] [blame] | 36 | |
Philippe Houdoin | 0f539de | 2004-08-24 08:31:57 +0000 | [diff] [blame] | 37 | To build Mesa-powered BeOS libGL.so version, open an Terminal window, |
| 38 | move to Mesa root folder and type this command: |
Philippe Houdoin | b44cf6d | 2004-08-14 10:06:21 +0000 | [diff] [blame] | 39 | |
| 40 | $ make beos |
| 41 | |
Philippe Houdoin | 0f539de | 2004-08-24 08:31:57 +0000 | [diff] [blame] | 42 | Note that the "beos" argument is only needed the first time to setup build config. |
| 43 | Next times, typing "make" will be enough. |
| 44 | |
Brian Paul | 473e51f | 2002-09-19 16:19:43 +0000 | [diff] [blame] | 45 | When it finishes the Mesa based libGL.so library for |
Philippe Houdoin | 0f539de | 2004-08-24 08:31:57 +0000 | [diff] [blame] | 46 | BeOS will be in the lib/ directory, along libglut.so library. |
| 47 | Several demo/test programs should have been build too under progs/* folders. |
| 48 | If it stop when building one of the progs/* programs, you may want to ignore it |
| 49 | and force make to move on next target by adding the -k make option: |
| 50 | |
| 51 | $ cd progs |
| 52 | $ make -k |
Brian Paul | 473e51f | 2002-09-19 16:19:43 +0000 | [diff] [blame] | 53 | |
| 54 | To install it as Be's default libGL.so replacement, put it in your |
Brian Paul | 50f20ec | 2003-12-13 01:26:14 +0000 | [diff] [blame] | 55 | /boot/home/config/lib/ directory. All your GL/GLUT apps will use |
Brian Paul | 473e51f | 2002-09-19 16:19:43 +0000 | [diff] [blame] | 56 | the Mesa based then. |
| 57 | |
| 58 | By default, it build a non-debug version library. |
| 59 | The x86 (MMX, SSE and 3DNOW) optimizations are also supported for x86 target. |
Brian Paul | 4d69189 | 2004-08-14 15:23:51 +0000 | [diff] [blame] | 60 | For PowerPC BeOS flavor, sorry, Mesa don't have ppc (Altivec) optimizations |
| 61 | yet. |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 62 | |
Philippe Houdoin | b44cf6d | 2004-08-14 10:06:21 +0000 | [diff] [blame] | 63 | To build a DEBUG version, type instead this : |
| 64 | |
Philippe Houdoin | 0f539de | 2004-08-24 08:31:57 +0000 | [diff] [blame] | 65 | $ DEBUG=1 make |
Philippe Houdoin | b44cf6d | 2004-08-14 10:06:21 +0000 | [diff] [blame] | 66 | |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 67 | |
Brian Paul | 473e51f | 2002-09-19 16:19:43 +0000 | [diff] [blame] | 68 | * Example Programs |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 69 | |
Philippe Houdoin | 0f539de | 2004-08-24 08:31:57 +0000 | [diff] [blame] | 70 | Look under progs/beos/ for some BGLView-based programs. |
| 71 | You should find under progs/samples and progs/redbook directories GLUT-based programs too. |
| 72 | They all should have been compiled along with the Mesa library. |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 73 | |
| 74 | |
Brian Paul | 473e51f | 2002-09-19 16:19:43 +0000 | [diff] [blame] | 75 | * GLUT |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 76 | |
Philippe Houdoin | 0f539de | 2004-08-24 08:31:57 +0000 | [diff] [blame] | 77 | A beta version of GLUT 3.7 port for BeOS, made by Jake Hamby, can be found at |
Brian Paul | 473e51f | 2002-09-19 16:19:43 +0000 | [diff] [blame] | 78 | http://anobject.com/jehamby/Code/Glut-3.7-x86.zip. |
Philippe Houdoin | 0f539de | 2004-08-24 08:31:57 +0000 | [diff] [blame] | 79 | This is the version currently included in Mesa source code, and |
| 80 | build in lib/libglut.so. |
Brian Paul | 473e51f | 2002-09-19 16:19:43 +0000 | [diff] [blame] | 81 | |
Philippe Houdoin | 0f539de | 2004-08-24 08:31:57 +0000 | [diff] [blame] | 82 | A previous 3.5 version of this GLUT BeOS port used to be available at |
| 83 | http://home.beoscentral.com/jehamby/Glut-3.5-x86.zip. |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 84 | |
Philippe Houdoin | 0f539de | 2004-08-24 08:31:57 +0000 | [diff] [blame] | 85 | They're special versions of GLUT for the BeOS platform. I don't |
Brian Paul | a822d1d | 1999-02-06 06:32:20 +0000 | [diff] [blame] | 86 | believe Mark Kilgard's normal GLUT distribution includes BeOS |
| 87 | support. |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 88 | |
Brian Paul | 808a013 | 1999-03-03 02:34:04 +0000 | [diff] [blame] | 89 | |
Brian Paul | 473e51f | 2002-09-19 16:19:43 +0000 | [diff] [blame] | 90 | * Special Features |
Brian Paul | 7c2ce35 | 1999-02-11 03:52:24 +0000 | [diff] [blame] | 91 | |
| 92 | Mesa's implementation of the BGLView class has an extra member |
| 93 | function: CopySubBufferMESA(). It basically works like SwapBuffers() |
| 94 | but it only copies a sub region from the back buffer to the front |
| 95 | buffer. This is a useful optimization for some applications. |
| 96 | If you use this method in your code be sure that you check at runtime |
| 97 | that you're actually using Mesa (with glGetString) so you don't |
| 98 | cause a fatal error when running with Be's OpenGL. |
| 99 | |
| 100 | |
Brian Paul | 473e51f | 2002-09-19 16:19:43 +0000 | [diff] [blame] | 101 | * Work Left To Do |
| 102 | |
Philippe Houdoin | b44cf6d | 2004-08-14 10:06:21 +0000 | [diff] [blame] | 103 | - BDirectWindow single buffering support is not implemented yet. |
| 104 | - Color index mode is not implemented yet. |
| 105 | - Reading pixels from the front buffer not implemented yet. |
Brian Paul | 4d69189 | 2004-08-14 15:23:51 +0000 | [diff] [blame] | 106 | - There is also a BGLScreen class in BeOS for full-screen OpenGL rendering. |
| 107 | This should also be implemented for Mesa. |
| 108 | - Multiple renderers add-ons support, first step toward hardware acceleration |
| 109 | support. |
Brian Paul | 808a013 | 1999-03-03 02:34:04 +0000 | [diff] [blame] | 110 | |
Philippe Houdoin | b44cf6d | 2004-08-14 10:06:21 +0000 | [diff] [blame] | 111 | * Other contributors to this BeOS port |
Brian Paul | 808a013 | 1999-03-03 02:34:04 +0000 | [diff] [blame] | 112 | |
Philippe Houdoin | 0f539de | 2004-08-24 08:31:57 +0000 | [diff] [blame] | 113 | Jake Hamby jhamby <at> anobject <dot> com |
| 114 | Marcin Konicki ahwayakchih <at> neoni <dot> net |
Philippe Houdoin | b44cf6d | 2004-08-14 10:06:21 +0000 | [diff] [blame] | 115 | Francois Revol revol <at> free <dot> fr |
Philippe Houdoin | fd7f62a | 2004-10-13 00:35:55 +0000 | [diff] [blame] | 116 | Nathan Whitehorn nathanw <at> uchicago <dot> edu |
Brian Paul | 808a013 | 1999-03-03 02:34:04 +0000 | [diff] [blame] | 117 | |
| 118 | |
Philippe Houdoin | b44cf6d | 2004-08-14 10:06:21 +0000 | [diff] [blame] | 119 | * Older BeOS Driver |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 120 | |
Brian Paul | a822d1d | 1999-02-06 06:32:20 +0000 | [diff] [blame] | 121 | Mesa 2.6 had an earlier BeOS driver. It was based on Mesa's Off-screen |
| 122 | rendering interface, not BGLView. If you're interested in the older |
| 123 | driver you should get Mesa 2.6. |
| 124 | |
| 125 | |
Brian Paul | 473e51f | 2002-09-19 16:19:43 +0000 | [diff] [blame] | 126 | * BeOS and Glide |
Brian Paul | a822d1d | 1999-02-06 06:32:20 +0000 | [diff] [blame] | 127 | |
| 128 | Mesa 3.0 supported the 3Dfx/Glide library on Beos. Download Mesa 3.0 |
| 129 | if interested. Ideally, the 3Dfx/Glide support should be updated to |
| 130 | work with the new Mesa 3.1 BGLView implementation. |
| 131 | |
Brian Paul | 4d69189 | 2004-08-14 15:23:51 +0000 | [diff] [blame] | 132 | The Glide library hasn't been updated for BeOS R4 and newer, to my knowledge, |
| 133 | as of February, 1999. |
Brian Paul | 808a013 | 1999-03-03 02:34:04 +0000 | [diff] [blame] | 134 | |
Brian Paul | a822d1d | 1999-02-06 06:32:20 +0000 | [diff] [blame] | 135 | |
| 136 | ---------------------------------------------------------------------- |