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
|
@ -693,7 +693,7 @@ Vec4 Bitmap::getPixel(int x, int y) const
|
|||
|
||||
flush();
|
||||
|
||||
p->bindFBO();
|
||||
FBO::bind(p->gl.fbo, FBO::Read);
|
||||
|
||||
glState.viewport.pushSet(IntRect(0, 0, width(), height()));
|
||||
Vec4 pixel = FBO::getPixel(x, y);
|
||||
|
|
Loading…
Reference in New Issue