Config: Add "enableBlitting" entry to toggle GL_EXT_framebuffer_blit

This commit is contained in:
Jonas Kulla 2017-04-23 14:32:11 +02:00 committed by David Salvisberg
parent 5378cca875
commit ac42667975
4 changed files with 12 additions and 0 deletions

View File

@ -95,6 +95,13 @@
# subImageFix=false # subImageFix=false
# Enable framebuffer blitting if the driver is
# capable of it. Some drivers carry buggy
# implementations of this functionality, so
# disabling it can be used as a workaround
# (default: enabled)
#
# enableBlitting=true
# Set the base path of the game to '/path/to/game' # Set the base path of the game to '/path/to/game'
# (default: executable directory) # (default: executable directory)
# #

View File

@ -388,6 +388,7 @@ void Config::read(int argc, char *argv[])
PO_DESC(frameSkip, bool) \ PO_DESC(frameSkip, bool) \
PO_DESC(solidFonts, bool) \ PO_DESC(solidFonts, bool) \
PO_DESC(subImageFix, bool) \ PO_DESC(subImageFix, bool) \
PO_DESC(enableBlitting, bool) \
PO_DESC(gameFolder, std::string) \ PO_DESC(gameFolder, std::string) \
PO_DESC(anyAltToggleFS, bool) \ PO_DESC(anyAltToggleFS, bool) \
PO_DESC(enableReset, bool) \ PO_DESC(enableReset, bool) \

View File

@ -46,6 +46,7 @@ struct Config
bool solidFonts; bool solidFonts;
bool subImageFix; bool subImageFix;
bool enableBlitting;
std::string gameFolder; std::string gameFolder;
bool anyAltToggleFS; bool anyAltToggleFS;

View File

@ -99,6 +99,9 @@ int rgssThreadFun(void *userdata)
return 0; return 0;
} }
if (!threadData->config.enableBlitting)
gl.BlitFramebuffer = 0;
gl.ClearColor(0, 0, 0, 1); gl.ClearColor(0, 0, 0, 1);
gl.Clear(GL_COLOR_BUFFER_BIT); gl.Clear(GL_COLOR_BUFFER_BIT);
SDL_GL_SwapWindow(win); SDL_GL_SwapWindow(win);