fix window yoga framebuffer resize bug
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
This commit is contained in:
parent
7c9c15ff05
commit
03baa714d8
@ -1749,6 +1749,7 @@ Fix server life tree missing nullcheck
|
||||
Inventory interaction type
|
||||
Debug ui for natural inventory on entity view
|
||||
Can open ui menu to view inventories of other entities on client
|
||||
Fix windows not resizing internal framebuffer when yoga changes their dimensions
|
||||
|
||||
|
||||
|
||||
|
||||
@ -452,6 +452,14 @@ public class Window implements DrawableElement, ContainerElement, NavigableEleme
|
||||
float topRaw = Yoga.YGNodeLayoutGetTop(yogaNode);
|
||||
float widthRaw = Yoga.YGNodeLayoutGetWidth(yogaNode);
|
||||
float heightRaw = Yoga.YGNodeLayoutGetHeight(yogaNode);
|
||||
if(this.width != (int)widthRaw || this.height != (int)heightRaw){
|
||||
try {
|
||||
widgetBuffer.free();
|
||||
widgetBuffer = FramebufferUtils.generateTextureFramebuffer(Globals.renderingEngine.getOpenGLState(), (int)widthRaw, (int)heightRaw);
|
||||
} catch(Exception e){
|
||||
LoggerInterface.loggerRenderer.ERROR(e);
|
||||
}
|
||||
}
|
||||
//apply the values to this component
|
||||
this.absoluteX = (int)leftRaw;
|
||||
this.absoluteY = (int)topRaw;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user