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 | |
Brian Paul | 473e51f | 2002-09-19 16:19:43 +0000 | [diff] [blame] | 31 | Requirements: |
| 32 | - gcc version 2.95.3 for BeOS |
| 33 | You can find it here: http://www.bebits.com/app/2157 |
| 34 | |
Philippe Houdoin | b44cf6d | 2004-08-14 10:06:21 +0000 | [diff] [blame] | 35 | To build Mesa-powered BeOS libGL.so version, type this at root folder: |
| 36 | |
| 37 | $ make beos |
| 38 | |
Brian Paul | 473e51f | 2002-09-19 16:19:43 +0000 | [diff] [blame] | 39 | When it finishes the Mesa based libGL.so library for |
Philippe Houdoin | b44cf6d | 2004-08-14 10:06:21 +0000 | [diff] [blame] | 40 | BeOS will be in the lib/ directory. |
Brian Paul | 473e51f | 2002-09-19 16:19:43 +0000 | [diff] [blame] | 41 | |
| 42 | 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] | 43 | /boot/home/config/lib/ directory. All your GL/GLUT apps will use |
Brian Paul | 473e51f | 2002-09-19 16:19:43 +0000 | [diff] [blame] | 44 | the Mesa based then. |
| 45 | |
| 46 | By default, it build a non-debug version library. |
| 47 | 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] | 48 | For PowerPC BeOS flavor, sorry, Mesa don't have ppc (Altivec) optimizations |
| 49 | yet. |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 50 | |
Philippe Houdoin | b44cf6d | 2004-08-14 10:06:21 +0000 | [diff] [blame] | 51 | To build a DEBUG version, type instead this : |
| 52 | |
| 53 | $ DEBUG=1 make beos |
| 54 | |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 55 | |
Brian Paul | 473e51f | 2002-09-19 16:19:43 +0000 | [diff] [blame] | 56 | * Example Programs |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 57 | |
Brian Paul | 50f20ec | 2003-12-13 01:26:14 +0000 | [diff] [blame] | 58 | Look in the progs/beos/ directory for one or two BGLView demo |
Brian Paul | a822d1d | 1999-02-06 06:32:20 +0000 | [diff] [blame] | 59 | programs. They should have been compiled along with the Mesa |
| 60 | library. |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 61 | |
| 62 | |
Brian Paul | 473e51f | 2002-09-19 16:19:43 +0000 | [diff] [blame] | 63 | * GLUT |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 64 | |
Brian Paul | 473e51f | 2002-09-19 16:19:43 +0000 | [diff] [blame] | 65 | A beta version of GLUT 3.7 port for BeOS can be found at |
| 66 | http://anobject.com/jehamby/Code/Glut-3.7-x86.zip. |
| 67 | |
Philippe Houdoin | b44cf6d | 2004-08-14 10:06:21 +0000 | [diff] [blame] | 68 | There's is a 3.5 version in src/glut/beos/, too. |
Brian Paul | 808a013 | 1999-03-03 02:34:04 +0000 | [diff] [blame] | 69 | The original distribution can be obtained from |
Brian Paul | 7c2ce35 | 1999-02-11 03:52:24 +0000 | [diff] [blame] | 70 | http://home.beoscentral.com/jehamby/Glut-3.5-x86.zip |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 71 | |
Brian Paul | 473e51f | 2002-09-19 16:19:43 +0000 | [diff] [blame] | 72 | They are special version of GLUT adapted for the BeOS. I don't |
Brian Paul | a822d1d | 1999-02-06 06:32:20 +0000 | [diff] [blame] | 73 | believe Mark Kilgard's normal GLUT distribution includes BeOS |
| 74 | support. |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 75 | |
Brian Paul | 808a013 | 1999-03-03 02:34:04 +0000 | [diff] [blame] | 76 | |
Brian Paul | 473e51f | 2002-09-19 16:19:43 +0000 | [diff] [blame] | 77 | * Special Features |
Brian Paul | 7c2ce35 | 1999-02-11 03:52:24 +0000 | [diff] [blame] | 78 | |
| 79 | Mesa's implementation of the BGLView class has an extra member |
| 80 | function: CopySubBufferMESA(). It basically works like SwapBuffers() |
| 81 | but it only copies a sub region from the back buffer to the front |
| 82 | buffer. This is a useful optimization for some applications. |
| 83 | If you use this method in your code be sure that you check at runtime |
| 84 | that you're actually using Mesa (with glGetString) so you don't |
| 85 | cause a fatal error when running with Be's OpenGL. |
| 86 | |
| 87 | |
Brian Paul | 473e51f | 2002-09-19 16:19:43 +0000 | [diff] [blame] | 88 | * Work Left To Do |
| 89 | |
Philippe Houdoin | b44cf6d | 2004-08-14 10:06:21 +0000 | [diff] [blame] | 90 | - Switch to SGI GLU implementation.. |
| 91 | - Add to build the BeOS GLUT port. Update it to latest known (3.7 ?) |
| 92 | - BDirectWindow single buffering support is not implemented yet. |
| 93 | - Color index mode is not implemented yet. |
| 94 | - Reading pixels from the front buffer not implemented yet. |
Brian Paul | 4d69189 | 2004-08-14 15:23:51 +0000 | [diff] [blame] | 95 | - There is also a BGLScreen class in BeOS for full-screen OpenGL rendering. |
| 96 | This should also be implemented for Mesa. |
| 97 | - Multiple renderers add-ons support, first step toward hardware acceleration |
| 98 | support. |
Brian Paul | 808a013 | 1999-03-03 02:34:04 +0000 | [diff] [blame] | 99 | |
Philippe Houdoin | b44cf6d | 2004-08-14 10:06:21 +0000 | [diff] [blame] | 100 | * Other contributors to this BeOS port |
Brian Paul | 808a013 | 1999-03-03 02:34:04 +0000 | [diff] [blame] | 101 | |
Philippe Houdoin | b44cf6d | 2004-08-14 10:06:21 +0000 | [diff] [blame] | 102 | Marcin Konicki ahwayakchih <at> neoni <dot> net |
| 103 | Francois Revol revol <at> free <dot> fr |
Brian Paul | 808a013 | 1999-03-03 02:34:04 +0000 | [diff] [blame] | 104 | |
| 105 | |
Philippe Houdoin | b44cf6d | 2004-08-14 10:06:21 +0000 | [diff] [blame] | 106 | * Older BeOS Driver |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 107 | |
Brian Paul | a822d1d | 1999-02-06 06:32:20 +0000 | [diff] [blame] | 108 | Mesa 2.6 had an earlier BeOS driver. It was based on Mesa's Off-screen |
| 109 | rendering interface, not BGLView. If you're interested in the older |
| 110 | driver you should get Mesa 2.6. |
| 111 | |
| 112 | |
Brian Paul | 473e51f | 2002-09-19 16:19:43 +0000 | [diff] [blame] | 113 | * BeOS and Glide |
Brian Paul | a822d1d | 1999-02-06 06:32:20 +0000 | [diff] [blame] | 114 | |
| 115 | Mesa 3.0 supported the 3Dfx/Glide library on Beos. Download Mesa 3.0 |
| 116 | if interested. Ideally, the 3Dfx/Glide support should be updated to |
| 117 | work with the new Mesa 3.1 BGLView implementation. |
| 118 | |
Brian Paul | 4d69189 | 2004-08-14 15:23:51 +0000 | [diff] [blame] | 119 | The Glide library hasn't been updated for BeOS R4 and newer, to my knowledge, |
| 120 | as of February, 1999. |
Brian Paul | 808a013 | 1999-03-03 02:34:04 +0000 | [diff] [blame] | 121 | |
Brian Paul | a822d1d | 1999-02-06 06:32:20 +0000 | [diff] [blame] | 122 | |
| 123 | ---------------------------------------------------------------------- |
Brian Paul | 4d69189 | 2004-08-14 15:23:51 +0000 | [diff] [blame] | 124 | $Id: README.BEOS,v 1.10 2004/08/14 15:23:51 brianp Exp $ |