Rendering issues

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
User avatar
Rob.m
Prole
Posts: 23
Joined: Mon Mar 11, 2013 1:57 am

Rendering issues

Post by Rob.m »

Hi,
I must be doing something wrong! I was trying to remove the love.graphics.clear() for a custom 'run' file.

I only want to clear the window at less frequent intervals so the code is not creating everything for every frame.

I noticed that I can't clear the window even across diffetrent instances of the love exe. That is - if I clear the window by any other means I have a ghost image of the previous instance of love even when the window has been close and love executed again.

How does the buffering work. The windows API itself has a buffer (offscreen bit map) so how does love wotk with that?

Thanks.
User avatar
Boolsheet
Inner party member
Posts: 780
Joined: Wed Dec 29, 2010 4:57 am
Location: Switzerland

Re: Rendering issues

Post by Boolsheet »

We talked a bit about that over here. In short, you have to clear and redraw to make sure everything stays on the screen. The redraw events from the OS do not reach the love.event module. (and SDL doesn't push them, I think? Edit: SDL 2 actually does. Yay!)

Because of portability, LÖVE goes with the lowest common denominator which is assuming that swapping the buffer causes its contents to be undefined.
Last edited by Boolsheet on Tue Mar 26, 2013 11:44 am, edited 1 time in total.
Shallow indentations.
User avatar
Rob.m
Prole
Posts: 23
Joined: Mon Mar 11, 2013 1:57 am

Re: Rendering issues

Post by Rob.m »

Thanks Boolsheet,
I read the other thread and decided to let this go until I know Love/Lua better or there is an update of the core code.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests