Skip to content

Commit

Permalink
Fix GL scissor box in h2d.Scene.captureBitmap
Browse files Browse the repository at this point in the history
  • Loading branch information
pkhead authored and TothBenoit committed Feb 25, 2025
1 parent e477fcd commit 2d0a7cd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions h2d/Scene.hx
Original file line number Diff line number Diff line change
Expand Up @@ -905,11 +905,12 @@ class Scene extends Layers implements h3d.IDrawable implements hxd.SceneEvents.I
var tex = new h3d.mat.Texture(width, height, [Target]);
target = new Tile(tex,0, 0, width, height);
}

var tex = target.getTexture();
engine.begin();
engine.pushTarget(tex);
engine.setRenderZone(Std.int(target.x), Std.int(target.y), hxd.Math.ceil(target.width), hxd.Math.ceil(target.height));

var tex = target.getTexture();
engine.pushTarget(tex);
var ow = width, oh = height, ova = viewportA, ovd = viewportD, ovx = viewportX, ovy = viewportY;
width = tex.width;
height = tex.height;
Expand Down

0 comments on commit 2d0a7cd

Please sign in to comment.