So.. late last night I was pouring through the mesa source distribution when I found something that I had hoped was there, but wasn't very obvious on their website.
For those who don't know, Mesa is a (in most cases) software OpenGL renderer.
There is a driver called osmesa, whose purpose is to do offscreen rendering to a memory buffer. It doesn't depend on any environment other than libc.
So.. long story short I got it compiled, and some demo stuff working. By working I mean _barely_ though, and this is where I appeal for some help. I can get the core GL stuff working, but so far using GLU to set up my perspective and stuff has resulted in the xbox rebooting on the line glFinish(). (which is required).
If anyone can hack around with this and try to get some of the GLU stuff working, please do.. I will try later next week. If we can get this working (which shouldn't be that bad since it IS compiling and vanilla GL IS working) we can start porting a huge number of OpenGL games to the XBox. Personally if glTron gets ported then I'll be happy, and that's sort of my reasoning for trying this. Again, there is a huge number of open source GL-based games out there.
Keep in mind it's software rendering and it's _bloody_ slow. The fastest I can get it to go is by passing mesa a pointer to my raw SDL_Surface screen->pixels, to avoid having to reblit after rendering. It still seems pretty slow, but I was using it at full 640x480 rendering. In the osdemo.c file you can see the three different attempts I use for blitting and feel free to comment/uncomment any of the 3 to try the different methods. Basically the methods are:
allocate buffer and create surface from buffer pointer and blit every frame
create surface as SDL_HWSURFACE and set buffer pointer to surface->pixels
point buffer to screen->pixels to avoid blitting every frame.
Anyways the binary library release is at:
http://th0mas.sixbit...libMesa-bin.tgz (extract in openxdk root)
the test code I'm using is at:
http://th0mas.sixbit...s/test-mesa.tgz (extract wherever, might need to edit makefile)
if anyone wants the mesa source as it stands I can tarball it and post it too.. It's an ugly hack to get it to compile so I'm not posting it until requested