Bitmap: Fix #get_pixel returning bogus values
We never bound the Bitmap FBO to the READ binding point, so glReadPixels was blindly reading data off of whatever was last bound there.
This commit is contained in:
		
							parent
							
								
									643000d4a0
								
							
						
					
					
						commit
						96d2707edb
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -693,7 +693,7 @@ Vec4 Bitmap::getPixel(int x, int y) const
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	flush();
 | 
						flush();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	p->bindFBO();
 | 
						FBO::bind(p->gl.fbo, FBO::Read);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	glState.viewport.pushSet(IntRect(0, 0, width(), height()));
 | 
						glState.viewport.pushSet(IntRect(0, 0, width(), height()));
 | 
				
			||||||
	Vec4 pixel = FBO::getPixel(x, y);
 | 
						Vec4 pixel = FBO::getPixel(x, y);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue