@@ -723,7 +723,7 @@ class GlDriver extends Driver {
override function captureRenderBuffer( pixels : hxd.Pixels ) {
if( curTarget == null )
throw "Can't capture main render buffer in GL";
- #if js
+ #if (js || hl)
gl.readPixels(0, 0, pixels.width, pixels.height, GL.RGBA, GL.UNSIGNED_BYTE, @:privateAccess pixels.bytes.b);
pixels.format = RGBA;
#end
@@ -68,9 +68,7 @@ class GraphicsDraw extends hxd.App {
// test capture bitmap
bclone = new h2d.Bitmap(h2d.Tile.fromTexture(new h3d.mat.Texture(256, 256)), s2d);
bclone.blendMode = None; // prevent residual alpha bugs
- #end
bclone.y = 512;
// set up graphics instance for use in redraw()
@@ -90,7 +88,7 @@ class GraphicsDraw extends hxd.App {
}
pg.drawTo(t);
- var pix = t.capturePixels();
+ var pix = t.capturePixels(true);
bclone.tile.getTexture().uploadPixels(pix);
pix.dispose();