Re: TurboSphere
Reply #409 –
Now with texturing, windowing, surfaces, images, and primitives.
Some quick stats on the new graphics plugin, all taken on a late 2013 MacBook Pro:
* 4000 FlipScreens per second. This is a hard limit, just like the old 2000 FlipScreens per second in SDL_GL_Threaded.
* 16,000 primitives per second with generic Unix pipes. 32,000 with a concurrent queue (Intel TBB on Unix, MSVC concurrency namespace on Windows)
* 45,000 triangles per second
Given that I'm using OpenGL 3.3 or OpenGL 4.1 depending on the platform, all my drawing in totally asynchronous (particularly from resource uploading and downloading), and all my drawing uses full Vertex Arrays, this should be a powerful enough architecture for a long time. The new graphics API makes it clear what will and what won't be fast, too. It makes graphics object-oriented.
Sapphire also exposes functions similar to Sphere 1.x video drivers, which makes using it from another plugin easy. I'm going to rewrite the old plugins to use this new API. This will also mean that you could use the standard plugins with a different graphics plugin, so long as the exposed interface is the same.
This has taken a long time, but I'm properly proud of Sapphire+Galileo. It fixes all the things that bothered me about SDL_GL_Threaded, about how plugins worked together, and about using the old drawing API with new OpenGL. It replaces all of the APIs I proposed but had reservations about, too (SpriteBatcher, Shader), with a unified graphics API.