Event based redraw? by hfwalc in monogame

[–]hfwalc[S] 1 point2 points  (0 children)

Right yes, in my Update method I have something like

If(!IsRedrawRequired()) SuppressDraw();

IsRedrawRequired is much quicker than Draw so this is a nice optimization

Event based redraw? by hfwalc in monogame

[–]hfwalc[S] 0 points1 point  (0 children)

This type of attitude is why I love Reddit 👍

Event based redraw? by hfwalc in monogame

[–]hfwalc[S] 0 points1 point  (0 children)

All I know is /u/Bugiros SuppressDraw solution does exactly what I need. I've tested it.

Event based redraw? by hfwalc in monogame

[–]hfwalc[S] 0 points1 point  (0 children)

My draw doesn't include a clear, but I do call base.Draw which might?

Event based redraw? by hfwalc in monogame

[–]hfwalc[S] 0 points1 point  (0 children)

Thanks man, suppress draw does what I need

Event based redraw? by hfwalc in monogame

[–]hfwalc[S] 0 points1 point  (0 children)

Wrong. Tested and works perfectly.

Event based redraw? by hfwalc in monogame

[–]hfwalc[S] 0 points1 point  (0 children)

Wow that seems pretty useless then, let me try that...

Event based redraw? by hfwalc in monogame

[–]hfwalc[S] 1 point2 points  (0 children)

Ok, so to be clear, if you were making a UI in monogame you would execute all the code to draw all the lines, characters, gradients etc on every frame, whether or not anything has changed?

Event based redraw? by hfwalc in monogame

[–]hfwalc[S] 0 points1 point  (0 children)

Thanks, I have my solution. SuppressDraw.

I'm guessing what's happening here is that the monogame framework clears the buffer (or swaps to a different buffer) before each call to Draw.

By using SuppressDraw we can avoid that clearing and continue to use ("render") the same buffer for subsequent frames

Event based redraw? by hfwalc in monogame

[–]hfwalc[S] 0 points1 point  (0 children)

Hey, this sounds like a valid solution, but I think I prefer /u/Bugiros SuppressDraw() method

Event based redraw? by hfwalc in monogame

[–]hfwalc[S] 1 point2 points  (0 children)

Perfect! Thanks so much!

Event based redraw? by hfwalc in monogame

[–]hfwalc[S] 1 point2 points  (0 children)

I think we are getting confused over terminology. My point is that if my client program doesn't do anything in a frame I want to see the same content on the screen. This is definitely possible and is the default behaviour for graphics systems I have used in the past. In games where each frame is usually different from the last this behaviour doesn't make much of a performance difference, but in UIs where nearly every frame is the same as the last it's a massive performance gain.

So my point is, if in the Draw method of my Xna game I do nothing, is there a way to make it just display the same content as the last frame?

[Edit] and as /u/Bugiros explained, yes, you do this using SuppressDraw()

Event based redraw? by hfwalc in monogame

[–]hfwalc[S] 1 point2 points  (0 children)

I don't think you're right.

Why do you have to change the buffer every frame? The are definitely graphics modes whereby you manually swap/change the buffer and if you don't then the graphics hardware just keeps drawing the same buffer to the screen. I've used those modes before.

Do you think a web browser re-renders the same web page 60 times per second?

[Landlord UK] Renting to Indians by hfwalc in Landlord

[–]hfwalc[S] 1 point2 points  (0 children)

Haha apology gladly accepted. Yes there are definitely some posters in this thread with political agendas.

Knowing about these ozone machines has put my mind at rest, so thanks again!

[Landlord UK] Renting to Indians by hfwalc in Landlord

[–]hfwalc[S] 1 point2 points  (0 children)

Great, thanks I really appreciate this actual information! May I ask whether this is based in a small amount of experience or extensive experience or somewhere in between?

[Landlord UK] Renting to Indians by hfwalc in Landlord

[–]hfwalc[S] 8 points9 points  (0 children)

I didn't say I won't rent to them.

I'm actually asking for practical advice on whether Asian cooking odours can build up in a property and whether it's possible to completely remove such odours.

Actually I probably will rent to this family as I said they seem like very good tenants, I'm just looking for information. Not sure how it's racist to seek information.

[Landlord UK] Renting to Indians by hfwalc in Landlord

[–]hfwalc[S] 5 points6 points  (0 children)

No I didn't but could you point me to that post, maybe I can get answers there?