I have some questions
1. Can I copy the OpenGL lib from the Haiku image and use it on BeOS/Zeta?
2. What files do I need and are the add-ons/opengl right place for the OpenGL "addons" (don't know what to call them)?
I wouldn't suggest doing it either way - not worth it.
Haiku is using Mesa 6.5.3
Zeta uses Mesa 6.2.1? ( or you can install this version from Bebits ).
Shouldn't make much of a difference in features.
Testing with Gears ( glxgears ) on Athlon XP.
Haiku OpenGL: 162 fps avg
Zeta OpenGL: 223 fps avg
Looking at Jamfile, OpenGL compiled for Haiku disables SSE? It still takes advantage of MMX & 3DNOW.
Best way to get newer OpenGL on Zeta is to download & compile source from:
Mesa 7.0 is out now. Haiku will probably get this checked in soon enough, in the following week(s) ( or months ).
I tried to compile Mesa 7.0 but gives errors in mesa/drivers/beos directory. Problems with compiling GLView.cpp.
Mesa on http://mesa3d.org/ hasn't been updated since 6.2.1
Haiku OpenGL: 162 fps avg
Zeta OpenGL: 223 fps avg
the one for Haiku are that one built with dano as the target platform?
I'm more intrested in how well the "new" OpengGL "framework" works but then we would need some more addons, like Nvidia, ATI, Matrox, Intel and VIA (would love to have a micro-ITX with BeOS and full OpenGL support)
Sorry for such late reply from my side, I'm just exiting an exausting kids-decease-share-week, I miss you question about Mesa 7.0 on its BeBits's talkback.
Mesa 7.0 is basically the v6.5.3 plus a few last patches promoted as a stable release. For a strange reason, Brian Paul didn't follow his usual versioning rules (which logically would have give v6.6) but goes for a whole new major version. Maybe he wants to spot more light on OpenGL "2.1" API supports (aka up-to-date) the former v6.5.x adds above the 6.4.x one.
The best way to build a BeOS/Zeta/Haiku OpenGL stack based on the most recent Mesa version is using Haiku build tree and Jam. Except for the "haiku" target platform, SSE assembly should be enabled everytime. If you build for BONE, dano or plain r5 targets, it should give you a quite up-to-date (modulo the 7.0 late additions) Mesa-based OpenGL stack and software renderer add-on for your platform:
$ cd haiku/trunk/src
$ TARGET_PLATFORM=r5 jam libGL.so Mesa\ Software\ Renderer
Then just copy/move the libGL.so and the Mesa Software Renderer add-on binaries generated under... hum... from memory under haiku/trunk/generated/objects/release/x86/kits/opengl/libGL.so and haiku/trunk/generated/objects/release/x86/add-ons/opengl/mesa_software_renderer/Mesa Software Renderer and install these in your ~/config/lib and ~/config/add-ons/opengl directories, respectively.
I'm curious about the reasons behind this FPS difference between a 6.2.1 on Zeta and 6.5.3 on BeOS. If these ~160 FPS is under Haiku, not BeOS, I'm not surprised or even worried. I also guess Mesa for Zeta was compiled with a GCC 3.x compiler, which could explain such speed difference too.
Or we could have introduced a small bottleneck in Haiku version while fixing a locking issue maybe.
Sadly, software FPS give you nothing very usefull these days, as much OpenGL apps does use this API far more heavily, which needs hardware acceleration to be usefull.
But that's another story. The next one for BeOS/Haiku, I hope.
Philippe Houdoin, occasional OpenGL & Networking team leader ;-)
To answer you two questions at top:
1) No, you can't, as these binaries are build for "haiku" target, which break binary compatibility with older ABI. Our binary compatibility only work in the older -> newer way. Plus, as already reported, the SSE assembly is disabled on haiku version, as our kernel seems to have still some issues with SSE at interrupts save/restore. You must (re)build these binaries for your specific target ("dano" in your case, I guess).
2) Yes and no. The library should goes in one of the places look by the system when a library is searched: your app "lib" sub folder, ~/config/lib or /boot/system/lib, ~/config/lib being the best solution in most case.
The Haiku's OpenGL stack, aka its libGL.so library, search renderer(s) add-on(s) in ~/config/add-ons/opengl and in /boot/system/add-ons/opengl, in that order. The former being the best solution for the moment, too.
I'm (well, before going sick, I was at least) right in the middle of migrating my beos system to a all new machine. Consequencelly, I can't for the moment look how I do to bypass the Mesa makefiles dependency on mkdepend. I can't remember if I have mkdepend available on my beos and where did I get it in such case or if I did an obscure workaround ATM.
For what it worth, there is a MkDepend tool available for BeOS, maybe it could be twisted: http://www.bebits.com/app/218.
Other possible download sources: http://www.google.com/search?q=beos+mkdepend.
A lazy solution is lying to make about the MKDEP value:
$ cd src/mesa/drivers/beos
$ MKDEP="true" make
I'm just exiting an exausting kids-decease-share-week
ohh thouse are not funny, good to have you back :)
How about glu and glut do I need new once or are those on Zeta good?
I will probably found out with an error but I don't whant to report bad things when they not exist :)
AFAIK, GLU have seen no modification since years.
But GLUT has. In particular, some missing GLUT functions related to mouse wheeling and special keys are now supported.
What matter more are the include files, if you're developing, not just trying to run OpenGL applications. If you want to use the latest API, you MUST use the include files corresponding to the libGL.so built.
For Haiku's libGL.so, these includes are located under headers/os/opengl/GL/*
PS: my reply regarding MkDepend/MKDEP issue is for tonestone57, BTW.
Ok I decided to redo the benchmarks to be more accurate.
Haiku is using Mesa 6.5.3 ( did svn up a couple of days ago ).
Zeta is using Mesa 6.2.1.
All OpenGL libs tested on Zeta 1.21 with resolution of 1024x768x16 @ 75hz on Athlon XP 2400.
Zeta 288 fps
Haiku 195 fps
Dano* 177 fps
*Dano OpenGL lib was taken from BeOS 5.1 dano and is here for comparison.
Compiled Haiku OpenGL for Dano.
I beleive the speed difference between Zeta & Haiku might be from optimizations ( Zeta's OpenGL is compiled for i686 & O2? ). Could be the cause of the speed difference.
Software OpenGL is only good for GLTeapot & Gears :-)
It's too slow for gaming.
Edit: I booted into Haiku to run the same test. Checked the resolution to make sure it matched.
Running Haiku: Gears 194 fps
Haiku's OpenGL is not compiling with SSE on dano??? Performance numbers, for Haiku's OpenGL, were the same when tested on Haiku & Zeta. Shouldn't there have been some kind of difference if SSE was being used? Hmm, something to think about.
I noticed that Haiku has makedepend in buildtools. I compiled it and used that on dano. Had to change the config from -fdepend to -odepend.
I didn't realize there was a Mkdepend on Bebits.
Good point about the OpenGL header files. I haven't updated mine yet and can't say if yT has done it on Zeta ( will have to check ).
I was trying to build Mesa ( from source ) on dano but I may try it on Zeta when I get a chance and see if I fair better.
As I've never used Zeta, I dunno but is Zeta enable correctly SSE feature on Athlon XP, as this driver does: http://bebits.com/app/2833
Another explication could be that our Jamfiles are broken and SSE is never enable (!?) whatever target platform. You may want to build for Dano the small testing tool GLInfo located under src/tests/kit/opengl/glinfo. This will display your GL_RENDERER string, which report what assembly acceleration is enabled...
I'm pretty sure Zeta enables SSE. I see it recognizing SSE in syslog. And GLTeapot gets *high* fps ( 180 to 200 ) with Zeta OpenGL. Haiku libOpenGL does 150-170. But Teapot fps counter goes too fast to get accurate numbers.
Already have glinfo installed. Checked it but didn't see any GL_RENDERER string. Lots of extensions ( GL_ARB, GL_EXT, GL_ATI, GL_MESA, GL_SGI, GL_NV, etc. ).
If it's building without SSE then I'm sure it'll get fixed once Haiku gets SSE working. ( Or my other guess is that Zeta's is using optimization O2 i686 but can't say for sure how much difference in fps that would make versus Haiku's unoptimized ).
Just for fun I also downloaded from your Bebits page Mesa R5 OpenGL and tested it in Zeta.
R5 OpenGL: Gears 235 fps
PS No worries about the speed differences. Just found it interesting. It'll get more exciting once Haiku gets hardware accelerated OpenGL ( 3d drivers ).
I have Haiku 6.5.3 OpenGL binaries for Zeta. If you want I can email them to you. 2 files: libOpenGL.so 1MB, Mesa Software Renderer 2MB; You need both for Haiku's OGL to work.
Otherwise you have to download Haiku source and build it yourself.
Yes please :) email@example.com
libOpenGL.so? not libGL.so?
My mistake. You're right. The library is called libGL.so ( not libOpenGL.so ).
Emailed you OpenGL libs.
Is this information on OpenGL/Mesa still valid for recent versions of Haiku? Is Haiku still unable to support SSE optimizations?
I doubt it. At least there are quite a few SSE related files in haiku/trunk/src/libs/mesa/mesa/x86/.
And I know for sure that David McPaul did quite a few SSE optimizations in media codecs.
That would be a good thing. Maybe tonestones can re-benchmark openGl for the Haiku win.
I sold off that system. I user another computer for Haiku but packed away and no time for it now. Kinda busy to re-benchmark.
OpenGL is still software based on Haiku so only good for basic/simple stuff. Need 3D drivers to get real OpenGL support to enjoy it.
glxgears will work on Haiku & Linux. Someone could do a benchmark on both and post results just to compare. Maybe a Quake 2 timedemo might be good too.
SDL+OpenGL for simple 3D games doesn't work yet
But I did a few tests and seems that is a total SDL bwindow implementation guilt.
Edit: These tests are done with both vesa & rudolf nvidia drivers
I use a p4 with a Radeon card, no hardware acceleration supported.
I use Haiku GCC4 Hybird.
I just downloaded the game Powermanga... a SDL Game... together with the SDL Game Libs.
Now this game is playable... but it behaves not lieke in R5 or Zeta.
The time I got hit by an objekt I have to press the move-button twice to get control of the space ship again.
That is like I said not the case with R5 or Zeta, where i can just hold down the button to move no matter I got shoot or have a collision with flying objects.
This is what I recognized long ago but thought not worth reporting... but maybe it is worth posting...