Skip to content

Commit

Permalink
We need to rebind the framebuffer prior to painting layers.
Browse files Browse the repository at this point in the history
Otherwise a surface drawing call in paint() will bind that surface's frame
buffer and we'll render our layers there instead of to the default frame
buffer. Obviously not desired.

It turns out that IOSGLContext was already doing the right thing.
  • Loading branch information
samskivert committed Oct 3, 2012
1 parent aabdf36 commit 137ce50
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/src/playn/core/gl/GL20Context.java
Expand Up @@ -65,6 +65,7 @@ public void preparePaint(GroupLayerGL rootLayer) {

public void paintLayers(GroupLayerGL rootLayer) {
checkGLError("paintLayers");
bindFramebuffer();
rootLayer.paint(rootXform, 1, null); // paint all the layers
useShader(null, false); // flush any pending shader
}
Expand Down

0 comments on commit 137ce50

Please sign in to comment.