Skip to content

Commit

Permalink
examples/devpmtest: describe how to use a memory pixelmap a backbuffer
Browse files Browse the repository at this point in the history
  • Loading branch information
vs49688 committed May 11, 2024
1 parent 854d81d commit 4049e20
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion examples/devpmtest/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -973,11 +973,17 @@ int main(int argc, char **argv)
width = screen->width;
height = screen->height;

#if 0 /* Set 1 to use a memory pixelmap as the backbuffer. */
if((colour_buffer = BrPixelmapAllocate(screen->type, screen->width, screen->height, NULL, BR_PMAF_NORMAL)) == NULL) {
BrLogError("APP", "BrPixelmapMatchTypedSized() failed.");
goto screen_creation_failed;
}
#else
if((colour_buffer = BrPixelmapMatch(screen, BR_PMMATCH_OFFSCREEN)) == NULL) {
BrLogError("APP", "BrPixelmapMatchTypedSized() failed.");
goto screen_creation_failed;
}

#endif
screen->origin_x = colour_buffer->origin_x = (br_int_16)(width / 2);
screen->origin_y = colour_buffer->origin_y = (br_int_16)(height / 2);

Expand Down

0 comments on commit 4049e20

Please sign in to comment.