Graphics: Use proper resizing function for TEXFBOs
Manually resizing the contained TEX objects skips updating the width/height TEXFBO properties, which GLMeta::blit relies on.
This commit is contained in:
		
							parent
							
								
									006f701fec
								
							
						
					
					
						commit
						cab453ac3a
					
				
					 1 changed files with 5 additions and 10 deletions
				
			
		| 
						 | 
					@ -92,11 +92,9 @@ struct PingPong
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		screenW = width;
 | 
							screenW = width;
 | 
				
			||||||
		screenH = height;
 | 
							screenH = height;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		for (int i = 0; i < 2; ++i)
 | 
							for (int i = 0; i < 2; ++i)
 | 
				
			||||||
		{
 | 
								TEXFBO::allocEmpty(rt[i], width, height);
 | 
				
			||||||
			TEX::bind(rt[i].tex);
 | 
					 | 
				
			||||||
			TEX::allocEmpty(width, height);
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	void startRender()
 | 
						void startRender()
 | 
				
			||||||
| 
						 | 
					@ -946,16 +944,13 @@ void Graphics::resizeScreen(int width, int height)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	p->screen.setResolution(width, height);
 | 
						p->screen.setResolution(width, height);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	TEX::bind(p->frozenScene.tex);
 | 
						TEXFBO::allocEmpty(p->frozenScene, width, height);
 | 
				
			||||||
	TEX::allocEmpty(width, height);
 | 
						TEXFBO::allocEmpty(p->currentScene, width, height);
 | 
				
			||||||
	TEX::bind(p->currentScene.tex);
 | 
					 | 
				
			||||||
	TEX::allocEmpty(width, height);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	FloatRect screenRect(0, 0, width, height);
 | 
						FloatRect screenRect(0, 0, width, height);
 | 
				
			||||||
	p->screenQuad.setTexPosRect(screenRect, screenRect);
 | 
						p->screenQuad.setTexPosRect(screenRect, screenRect);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	TEX::bind(p->transBuffer.tex);
 | 
						TEXFBO::allocEmpty(p->transBuffer, width, height);
 | 
				
			||||||
	TEX::allocEmpty(width, height);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	shState->eThread().requestWindowResize(width, height);
 | 
						shState->eThread().requestWindowResize(width, height);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue