Ensure texture exists in 2d view

This commit is contained in:
luboslenco
2020-03-26 22:07:58 +01:00
parent 4c9e6e4f21
commit a0340a638d
2 changed files with 9 additions and 9 deletions
+1
View File
@@ -853,6 +853,7 @@ class UISidebar {
if (UIView2D.inst.type != type) UIView2D.inst.show = true;
else UIView2D.inst.show = !UIView2D.inst.show;
UIView2D.inst.type = type;
UIView2D.inst.hwnd.redraws = 2;
App.resize();
}
+8 -9
View File
@@ -126,15 +126,14 @@ class UIView2D {
var th = tw;
if (tex != null) {
th = tw * (tex.height / tex.width);
}
if (type == View2DLayer) {
ui.g.pipeline = pipe;
drawLayer(tex, tx, ty, tw, th, channel);
ui.g.pipeline = null;
}
else {
ui.g.drawScaledImage(tex, tx, ty, tw, th);
if (type == View2DLayer) {
ui.g.pipeline = pipe;
drawLayer(tex, tx, ty, tw, th, channel);
ui.g.pipeline = null;
}
else {
ui.g.drawScaledImage(tex, tx, ty, tw, th);
}
}
// UV map