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
parent 1478e1e0f9
commit 006f701fec
4 changed files with 14 additions and 0 deletions

View File

@ -124,6 +124,15 @@
# 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
# Limit the maximum size (width, height) of # Limit the maximum size (width, height) of
# most textures mkxp will create (exceptions are # most textures mkxp will create (exceptions are
# rendering backbuffers and similar). # rendering backbuffers and similar).

View File

@ -166,6 +166,7 @@ void Config::read(int argc, char *argv[])
PO_DESC(syncToRefreshrate, bool, false) \ PO_DESC(syncToRefreshrate, bool, false) \
PO_DESC(solidFonts, bool, false) \ PO_DESC(solidFonts, bool, false) \
PO_DESC(subImageFix, bool, false) \ PO_DESC(subImageFix, bool, false) \
PO_DESC(enableBlitting, bool, true) \
PO_DESC(maxTextureSize, int, 0) \ PO_DESC(maxTextureSize, int, 0) \
PO_DESC(gameFolder, std::string, ".") \ PO_DESC(gameFolder, std::string, ".") \
PO_DESC(anyAltToggleFS, bool, false) \ PO_DESC(anyAltToggleFS, bool, false) \

View File

@ -49,6 +49,7 @@ struct Config
bool solidFonts; bool solidFonts;
bool subImageFix; bool subImageFix;
bool enableBlitting;
int maxTextureSize; int maxTextureSize;
std::string gameFolder; std::string gameFolder;

View File

@ -102,6 +102,9 @@ int rgssThreadFun(void *userdata)
return 0; return 0;
} }
if (!conf.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);