Config: Add "enableBlitting" entry to toggle GL_EXT_framebuffer_blit
This commit is contained in:
		
							parent
							
								
									1478e1e0f9
								
							
						
					
					
						commit
						006f701fec
					
				
					 4 changed files with 14 additions and 0 deletions
				
			
		| 
						 | 
					@ -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).
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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) \
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue