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