Full Version: Setting full screen
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.