Hi all. I can’t attach a link to the playgroup, but I’ll try to describe it in words. I sometimes catch wierd glitches on my gui. I was able to get rid of this with the following code, but since I have to update the whole texture, fps drops significantly
It would be wonderful to get some form of a reproduction, otherwise it is very hard to tell what the issue is. Could be an issue with caching, but I am not sure, TBH.
I also notice that there is a button added on the bottom and that the card is displayed twice. is this a part of the problem, or is this the way it is implemented?
You’ll sadly have to be more specific than that… what devices, what are they doing, what is this extra button, what is this extra card under the original card?
How are you adding your cards and removing the others? From your screenshot, it looks like you are stacking up containers. Something is likely wrong with your approach for the 2D GUI. I can’t imagine marking GUI elements as dirty as a recommendable option.
As @RaananW said, it will be hard to understand what the issue is without a PG. Even a very simple one with just a repro of the method you use and the type of containers and imbrication.
Did you try using scaleTo() for the ADT? It has recently received a fix and normally should render at new size without an update (altough I haven’t tried it). Anyways, what happens is that the ADT layer/texture does not rescale just on itself. You should try add this and see how it goes:
This does not work for me because I only need to scale a particular window without scaling the HUD, for example. Both the HUD and windows are drawn on the same texture
Can you explain “a particular window”. Might be a language problem here (english is also not my language). It seems you are using a full-screen GUI. Where for me, the ‘window’ is the ‘window of the browser’ which contains the canvas and the FS GUI fills the canvas. Since there can only be one FS GUI on the canvas, I assume your “window” must be either a container or a viewport?
So, it is a container, part of a single FS GUI. What sort of container? a rectangle, a stackpanel, a scrollviewer? an imbrication of these. Did you try just update the GUI on scale? I think we would really need to have this small repro in the PG (or the code for the entire build and logic) else this conversation might just not go to the point. Obviously, if the fix of marking all as dirty kind of solves the issue means the GUI is simply not updated. Just not sure to understand why here. On the other hand there might be some other solution for resizing the container (not using scale but resizing it) according to the window size/ratio.
Thank you. That makes it clearer. Since I’m not a specialist for this, I’ll call back @RaananW or @carolhmj on this. Hope they will be able to spot the issue from here.
Meanwhile, have a great day
I would if I could consistently reproduce this bug. But on one of my computers it exists, on the other it does not.I would if I could consistently reproduce this bug. But on one of my computers it exists, on the other it does not
I only need to hide a control to get it to show up incorrectly
A control. Any control? A control higher in the hierarchy? All, I can see is that if you hide a control, it updates the ADT. Are you really sure this ADT is getting updated on rescale?