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 | a822d1d | 1999-02-06 06:32:20 +0000 | [diff] [blame] | 6 | Introduction |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 7 | |
Brian Paul | a822d1d | 1999-02-06 06:32:20 +0000 | [diff] [blame] | 8 | Mesa 3.1 features a new driver for the BeOS. The new driver implements |
| 9 | a clone of the BGLView class. This class, derived from BView, allows |
| 10 | OpenGL rendering into a BeOS window. |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 11 | |
Brian Paul | a822d1d | 1999-02-06 06:32:20 +0000 | [diff] [blame] | 12 | Any application which uses the BGLView should be able to use Mesa |
| 13 | instead of Be's OpenGL without changing any code. |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 14 | |
Brian Paul | a822d1d | 1999-02-06 06:32:20 +0000 | [diff] [blame] | 15 | Since Be's OpenGL implementation (as of R4) is basically just the |
| 16 | SGI sample implementation, it's pretty slow. You'll see that Mesa |
| 17 | is considerably faster. |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 18 | |
| 19 | |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 20 | |
Brian Paul | a822d1d | 1999-02-06 06:32:20 +0000 | [diff] [blame] | 21 | Source Code |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 22 | |
Brian Paul | a822d1d | 1999-02-06 06:32:20 +0000 | [diff] [blame] | 23 | The source code for the driver is in Mesa-3.1/src/BeOS/GLView.cpp |
| 24 | 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] | 25 | working. No optimizations have been made at this time. |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 26 | |
| 27 | |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 28 | |
Brian Paul | a822d1d | 1999-02-06 06:32:20 +0000 | [diff] [blame] | 29 | Compiling |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 30 | |
Brian Paul | a89dccf | 1999-11-27 01:40:40 +0000 | [diff] [blame^] | 31 | In the Mesa-3.x directory type "make -f Makefile.X11 beos-r4". |
Brian Paul | a822d1d | 1999-02-06 06:32:20 +0000 | [diff] [blame] | 32 | When it finishes the libMesaGL.so and libMesaGLU.so libraries for |
| 33 | BeOS will be in the Mesa-3.x/lib/ directory. |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 34 | |
| 35 | |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 36 | |
Brian Paul | a822d1d | 1999-02-06 06:32:20 +0000 | [diff] [blame] | 37 | Example Programs |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 38 | |
Brian Paul | a822d1d | 1999-02-06 06:32:20 +0000 | [diff] [blame] | 39 | Look in the Mesa-3.x/BeOS/ directory for one or two BGLView demo |
| 40 | programs. They should have been compiled along with the Mesa |
| 41 | library. |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 42 | |
| 43 | |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 44 | |
Brian Paul | a822d1d | 1999-02-06 06:32:20 +0000 | [diff] [blame] | 45 | GLUT |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 46 | |
Brian Paul | 808a013 | 1999-03-03 02:34:04 +0000 | [diff] [blame] | 47 | A version of GLUT 2.5 for BeOS can be found in src-glut.beos/. |
| 48 | The original distribution can be obtained from |
Brian Paul | 7c2ce35 | 1999-02-11 03:52:24 +0000 | [diff] [blame] | 49 | http://home.beoscentral.com/jehamby/Glut-3.5-x86.zip |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 50 | |
Brian Paul | a822d1d | 1999-02-06 06:32:20 +0000 | [diff] [blame] | 51 | This is a special version of GLUT adapted for the BeOS. I don't |
| 52 | believe Mark Kilgard's normal GLUT distribution includes BeOS |
| 53 | support. |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 54 | |
Brian Paul | 808a013 | 1999-03-03 02:34:04 +0000 | [diff] [blame] | 55 | It seems that you have to recompile GLUT with libMesaGL.so instead |
| 56 | of libGL.so in order for everything to work. I'm not sure why. |
| 57 | |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 58 | |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 59 | |
Brian Paul | 7c2ce35 | 1999-02-11 03:52:24 +0000 | [diff] [blame] | 60 | Special Features |
| 61 | |
| 62 | Mesa's implementation of the BGLView class has an extra member |
| 63 | function: CopySubBufferMESA(). It basically works like SwapBuffers() |
| 64 | but it only copies a sub region from the back buffer to the front |
| 65 | buffer. This is a useful optimization for some applications. |
| 66 | If you use this method in your code be sure that you check at runtime |
| 67 | that you're actually using Mesa (with glGetString) so you don't |
| 68 | cause a fatal error when running with Be's OpenGL. |
| 69 | |
| 70 | |
| 71 | |
Brian Paul | 808a013 | 1999-03-03 02:34:04 +0000 | [diff] [blame] | 72 | Work Left To Do |
| 73 | |
| 74 | Color index mode is not implemented yet. |
| 75 | |
| 76 | Reading pixels from the front buffer not implemented yet. |
| 77 | |
| 78 | There is also a BGLScreen class in BeOS for full-screen OpenGL |
| 79 | rendering. This should also be implemented for Mesa. |
| 80 | |
| 81 | |
| 82 | |
Brian Paul | a822d1d | 1999-02-06 06:32:20 +0000 | [diff] [blame] | 83 | Old BeOS Driver |
Brian Paul | ee6ba02 | 1999-01-30 03:59:03 +0000 | [diff] [blame] | 84 | |
Brian Paul | a822d1d | 1999-02-06 06:32:20 +0000 | [diff] [blame] | 85 | Mesa 2.6 had an earlier BeOS driver. It was based on Mesa's Off-screen |
| 86 | rendering interface, not BGLView. If you're interested in the older |
| 87 | driver you should get Mesa 2.6. |
| 88 | |
| 89 | |
| 90 | |
| 91 | BeOS and Glide |
| 92 | |
| 93 | Mesa 3.0 supported the 3Dfx/Glide library on Beos. Download Mesa 3.0 |
| 94 | if interested. Ideally, the 3Dfx/Glide support should be updated to |
| 95 | work with the new Mesa 3.1 BGLView implementation. |
| 96 | |
Brian Paul | 808a013 | 1999-03-03 02:34:04 +0000 | [diff] [blame] | 97 | The Glide library hasn't been updated for BeOS R4, to my knowledge, as |
| 98 | of February, 1999. |
| 99 | |
Brian Paul | a822d1d | 1999-02-06 06:32:20 +0000 | [diff] [blame] | 100 | |
| 101 | ---------------------------------------------------------------------- |
Brian Paul | a89dccf | 1999-11-27 01:40:40 +0000 | [diff] [blame^] | 102 | $Id: README.BEOS,v 1.6 1999/11/27 01:40:40 brianp Exp $ |