Mentioned a fix for the next release in another post: That
SDL_surface::unused1 field is initialized to 0 in SDL 1.2.5, to avoid
trouble when you create surfaces with code not compiled with glSDL.
However, it turns out that I was stoopid and used 0xffffffff instead
of 0 to mean “no OpenGL texture for this surface”…
There’s new code for screen->surface and screen->screen bliting in the
new glSDL as well, but IIRC, it doesn’t work properly yet. Doesn’t
seem like anyone is missing it very much, since those operations are
dog slow on most h/w surface displays anyway, but I want 100% correct
emulation of the SDL API.
Actually, this stuff not working is the reason why Kobo Deluxe can’t
take screenshots in OpenGL mode. Screenshots are probably the main
reason to have it, no matter how slow it is. (As long as it doesn’t
impact normal rendering - and it doesn’t.)
Anyway, I still need a better texture space suballocator. The current
one doesn’t tile two ways, so you can’t surfaces that are both
wider and taller than the maximum texture size of your accelerator.
If you have a reasonably modern card, this isn’t much of an issue, as
these can generally handle 2048x2048, but if you have some old card
with a 256x256 limit, you’re in trouble…
Another limitation is that it can only tile a surface over one or more
textures; not the other way around. Surfaces own entire textures,
rather than lists of areas inside textures, which means there can
never be pixels form different surfaces in the same texture. This may
be inefficient in some cases, though I’m not sure it matters if
tiling is made more intelligent. (By splitting surfaces recursively
in a few levels, one could have near 100% texture space utilization
in every texture, I think. Currently, all tiles of one surface are of
the same size.)
Didn’t someone around here have some tiling code BTW…?
//David Olofson - Programmer, Composer, Open Source Advocate
.- The Return of Audiality! --------------------------------.
| Free/Open Source Audio Engine for use in Games or Studio. |
| RT and off-line synth. Scripting. Sample accurate timing. |
`---------------------------> http://olofson.net/audiality -’
— http://olofson.net — http://www.reologica.se —