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
f956f21ce1
commit
b6a299541f
|
@ -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