Menu

#202 FlipScreen() and ClearScreen()

open
nobody
engine (98)
5
2003-11-30
2003-11-30
Brian Robb
No

while (true) {
FlipScreen();
}

Isn't as fast as it could be.
FlipScreen always calls ClearScreen (FlipScreen in
script.cpp that is)

Solution? Change FlipScreen() to this:

just_cleared = false;

FlipScreen() {
...
just_cleared = true;
}

ClearScreen() {
if (just_cleared) {
just_cleared = false;
} else {
...
}
}

ClearScreen might have to become a video driver
function for this to work. (ClearScreen is a Rectangle
draw operation)

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.