PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

display update

I have a question about partial display update.
When I use
display->Update(pos);
it sometimes lock display viewport to this rect, so after display->Update() call, only this rect is updated.

Is display->Update() (without args) should restore update area?
Are you saying it still does a partial update, even after you've done another getDisplay?

I was thinking that it should always default to the entire screen unless you pass the optional argument. What happens if you pass NULL?
Hm, no, not exactly. I don't call GetDisplay() every time I need to draw something, I call it once on start, then save result in Display* display;
Could that lead to partial update?
You need to call Update() at the end of each frame to update the display.
Kzinti wrote:You need to call Update() at the end of each frame to update the display.


??
That is what I do. Now I call
display->Update( &Rect;(0, 0, 320, 240) )
to be sure.
fast_rx wrote: What happens if you pass NULL?


Since function is declared as "void Update(Rect* rect = 0)", I think result would be the same.
Squirrel wrote:Hm, no, not exactly. I don't call GetDisplay() every time I need to draw something, I call it once on start, then save result in Display* display;
Could that lead to partial update?


Once on start of the game, or start of a frame?

Wherever I've had 2 update()'s with no getDisplay, I get a crash...
On start of the game.
You get crash couse you need to call display->GetBackBuffer() before Update(), no need to call GetDisplay() (if you look at GetDisplay() code, you'll see that it calls GetBackBuffer() too).