OK, let's do it again 😀
This time I'm attaching full patch to SDL-1.2.11. It includes the previously mentioned changes with some differences:
- texture doublebuffering will obviously not work since dosbox does not update complete lines. Since supporting this would require having an extra surface and an extra blit, this would negate all the speed advantages of texture doublebuffering (if there are any at all). Texture doublebuffering can be selected by passing SDL_DOUBLEBUF in SDL_SetVideoMode() call if desired.
- opengl doublebuffering is not on by default, but requires setting SDL_OPENGLHQ_DOUBLEBUF environment variable. This has been tied to fulldouble option in dosbox patch. Opengl doublebuffering requires that pass 3 of the fragment shader runs at full res and that it updates the entire backbuffer (previously it only updated the changes). This is probably slower on some slower cards, but ogl doublebuffering might have other advantages...I don't know, left for the user to decide 😀
- pass SDL_ANYFORMAT flag in dosbox SDL_SetVideoMode call. This gets rid of ShadowSurface SDL creates in some cases. Possibly a speed advantage. SDL_HWPALETTE isn't needed (this will also force creation of shadow surface), 8-bit ogl output is supported on very few cards anyway.
The SDL patch has been updated to apply to SDL-1.2.11. One difference though is that since 1.2.11 uses a single Makefile for complete SDL, I haven't been able to hack it to create the required *.h files. After applying sdl patch, you need to run make in src/video/openglhq before running configure. You also need to run autogen before configure 😀