Setting full screen - Printable Version

+- Forums (
+-- Forum: Main Forums (
+--- Forum: Fundamentals Errata/Questions (
+--- Thread: Setting full screen (/showthread.php?tid=78)

Setting full screen - Brian Beuken - 04-25-2018

In the listed graphic setup code for the early projects, the init_ogl function is a basic system which works fine for windowed EGL display, but it should also be possible to set full screen mode by sending either 1920x1080 or the returns value from
    uint width, height;
    graphics_get_display_size(0, &width, &height);
    init_ogl(p_state, width, height);

However due to a missing set up in the init_ogl function, on page 47, the early projects can't go full screen, but you can correct this by adding two lines as noted here

PHP Code:
    state->width width;
state->height height;
dest_rect.width state->width// it needs to know our window size
dest_rect.height state->height;
//ADD these two lines if you are using a full screen mode    
src_rect.width width << 16;
src_rect.height height << 16

The downloaded files should all have this fix but I will check to make sure.