blob: efd84e888cba808d75fc9392ddc93c0e14334052 [file] [log] [blame]
Brian Paul324af0b1999-01-30 04:00:31 +00001
Brian Paula822d1d1999-02-06 06:32:20 +00002 Mesa / BeOS Information
Brian Paul324af0b1999-01-30 04:00:31 +00003
4
5
Brian Paul473e51f2002-09-19 16:19:43 +00006* Introduction
Brian Paulee6ba021999-01-30 03:59:03 +00007
Brian Paul4d691892004-08-14 15:23:51 +00008Brian Paul added in Mesa 3.1 a driver for BeOS R4.5 operating system.
9This driver implements a clone of the BGLView class. This class,
10derived from BView, allows OpenGL rendering into any BeOS window. His
11driver was updated in Mesa 4.1 and again in version 6.1 by Philippe
12Houdoin, who's maintaining this driver since.
Brian Paulee6ba021999-01-30 03:59:03 +000013
Brian Paula822d1d1999-02-06 06:32:20 +000014Any application which uses the BGLView should be able to use Mesa
15instead of Be's OpenGL without changing any code.
Brian Paulee6ba021999-01-30 03:59:03 +000016
Brian Paul473e51f2002-09-19 16:19:43 +000017Since Be's OpenGL implementation (as of R5) is basically just the
Brian Paula822d1d1999-02-06 06:32:20 +000018SGI sample implementation, it's pretty slow. You'll see that Mesa
19is considerably faster.
Brian Paulee6ba021999-01-30 03:59:03 +000020
21
Brian Paul473e51f2002-09-19 16:19:43 +000022* Source Code
Brian Paulee6ba021999-01-30 03:59:03 +000023
Brian Paul50f20ec2003-12-13 01:26:14 +000024The source code for the driver is in src/mesa/drivers/beos/ directory.
Brian Paula822d1d1999-02-06 06:32:20 +000025It's not 100% finished at this time but many GLUT-based demos are
Brian Paul808a0131999-03-03 02:34:04 +000026working. No optimizations have been made at this time.
Brian Paulee6ba021999-01-30 03:59:03 +000027
28
Brian Paul473e51f2002-09-19 16:19:43 +000029* Compiling
Brian Paulee6ba021999-01-30 03:59:03 +000030
Philippe Houdoinfd7f62a2004-10-13 00:35:55 +000031Since Mesa 6.x, it can be build under BeOS with both the R5 builtin gcc version
32or more recent gcc versions available for BeOS, like this gcc version 2.95.3 for BeOS
33you can find at http://www.bebits.com/app/2157.
34Anyway, keep in mind that to take full advantage of Mesa x86 optimizations, you better
35want to use gcc 2.95.3 or sooner versions...
Brian Paul473e51f2002-09-19 16:19:43 +000036
Philippe Houdoin0f539de2004-08-24 08:31:57 +000037To build Mesa-powered BeOS libGL.so version, open an Terminal window,
38move to Mesa root folder and type this command:
Philippe Houdoinb44cf6d2004-08-14 10:06:21 +000039
40$ make beos
41
Philippe Houdoin0f539de2004-08-24 08:31:57 +000042Note that the "beos" argument is only needed the first time to setup build config.
43Next times, typing "make" will be enough.
44
Brian Paul473e51f2002-09-19 16:19:43 +000045When it finishes the Mesa based libGL.so library for
Philippe Houdoin0f539de2004-08-24 08:31:57 +000046BeOS will be in the lib/ directory, along libglut.so library.
47Several demo/test programs should have been build too under progs/* folders.
48If it stop when building one of the progs/* programs, you may want to ignore it
49and force make to move on next target by adding the -k make option:
50
51$ cd progs
52$ make -k
Brian Paul473e51f2002-09-19 16:19:43 +000053
54To install it as Be's default libGL.so replacement, put it in your
Brian Paul50f20ec2003-12-13 01:26:14 +000055/boot/home/config/lib/ directory. All your GL/GLUT apps will use
Brian Paul473e51f2002-09-19 16:19:43 +000056the Mesa based then.
57
58By default, it build a non-debug version library.
59The x86 (MMX, SSE and 3DNOW) optimizations are also supported for x86 target.
Brian Paul4d691892004-08-14 15:23:51 +000060For PowerPC BeOS flavor, sorry, Mesa don't have ppc (Altivec) optimizations
61yet.
Brian Paulee6ba021999-01-30 03:59:03 +000062
Philippe Houdoinb44cf6d2004-08-14 10:06:21 +000063To build a DEBUG version, type instead this :
64
Philippe Houdoin0f539de2004-08-24 08:31:57 +000065$ DEBUG=1 make
Philippe Houdoinb44cf6d2004-08-14 10:06:21 +000066
Brian Paulee6ba021999-01-30 03:59:03 +000067
Brian Paul473e51f2002-09-19 16:19:43 +000068* Example Programs
Brian Paulee6ba021999-01-30 03:59:03 +000069
Philippe Houdoin0f539de2004-08-24 08:31:57 +000070Look under progs/beos/ for some BGLView-based programs.
71You should find under progs/samples and progs/redbook directories GLUT-based programs too.
72They all should have been compiled along with the Mesa library.
Brian Paulee6ba021999-01-30 03:59:03 +000073
74
Brian Paul473e51f2002-09-19 16:19:43 +000075* GLUT
Brian Paulee6ba021999-01-30 03:59:03 +000076
Philippe Houdoin0f539de2004-08-24 08:31:57 +000077A beta version of GLUT 3.7 port for BeOS, made by Jake Hamby, can be found at
Brian Paul473e51f2002-09-19 16:19:43 +000078http://anobject.com/jehamby/Code/Glut-3.7-x86.zip.
Philippe Houdoin0f539de2004-08-24 08:31:57 +000079This is the version currently included in Mesa source code, and
80build in lib/libglut.so.
Brian Paul473e51f2002-09-19 16:19:43 +000081
Philippe Houdoin0f539de2004-08-24 08:31:57 +000082A previous 3.5 version of this GLUT BeOS port used to be available at
83http://home.beoscentral.com/jehamby/Glut-3.5-x86.zip.
Brian Paulee6ba021999-01-30 03:59:03 +000084
Philippe Houdoin0f539de2004-08-24 08:31:57 +000085They're special versions of GLUT for the BeOS platform. I don't
Brian Paula822d1d1999-02-06 06:32:20 +000086believe Mark Kilgard's normal GLUT distribution includes BeOS
87support.
Brian Paulee6ba021999-01-30 03:59:03 +000088
Brian Paul808a0131999-03-03 02:34:04 +000089
Brian Paul473e51f2002-09-19 16:19:43 +000090* Special Features
Brian Paul7c2ce351999-02-11 03:52:24 +000091
92Mesa's implementation of the BGLView class has an extra member
93function: CopySubBufferMESA(). It basically works like SwapBuffers()
94but it only copies a sub region from the back buffer to the front
95buffer. This is a useful optimization for some applications.
96If you use this method in your code be sure that you check at runtime
97that you're actually using Mesa (with glGetString) so you don't
98cause a fatal error when running with Be's OpenGL.
99
100
Brian Paul473e51f2002-09-19 16:19:43 +0000101* Work Left To Do
102
Philippe Houdoinb44cf6d2004-08-14 10:06:21 +0000103- 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 Paul4d691892004-08-14 15:23:51 +0000106- 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 Paul808a0131999-03-03 02:34:04 +0000110
Philippe Houdoinb44cf6d2004-08-14 10:06:21 +0000111* Other contributors to this BeOS port
Brian Paul808a0131999-03-03 02:34:04 +0000112
Philippe Houdoin0f539de2004-08-24 08:31:57 +0000113Jake Hamby jhamby <at> anobject <dot> com
114Marcin Konicki ahwayakchih <at> neoni <dot> net
Philippe Houdoinb44cf6d2004-08-14 10:06:21 +0000115Francois Revol revol <at> free <dot> fr
Philippe Houdoinfd7f62a2004-10-13 00:35:55 +0000116Nathan Whitehorn nathanw <at> uchicago <dot> edu
Brian Paul808a0131999-03-03 02:34:04 +0000117
118
Philippe Houdoinb44cf6d2004-08-14 10:06:21 +0000119* Older BeOS Driver
Brian Paulee6ba021999-01-30 03:59:03 +0000120
Brian Paula822d1d1999-02-06 06:32:20 +0000121Mesa 2.6 had an earlier BeOS driver. It was based on Mesa's Off-screen
122rendering interface, not BGLView. If you're interested in the older
123driver you should get Mesa 2.6.
124
125
Brian Paul473e51f2002-09-19 16:19:43 +0000126* BeOS and Glide
Brian Paula822d1d1999-02-06 06:32:20 +0000127
128Mesa 3.0 supported the 3Dfx/Glide library on Beos. Download Mesa 3.0
129if interested. Ideally, the 3Dfx/Glide support should be updated to
130work with the new Mesa 3.1 BGLView implementation.
131
Brian Paul4d691892004-08-14 15:23:51 +0000132The Glide library hasn't been updated for BeOS R4 and newer, to my knowledge,
133as of February, 1999.
Brian Paul808a0131999-03-03 02:34:04 +0000134
Brian Paula822d1d1999-02-06 06:32:20 +0000135
136----------------------------------------------------------------------