in Platform Packages by
Hi Team,

We have created GUI application of screen size 800x480 and a variant screen for size 530x360,Now when we run the GUI application of screen size 800x480 on raspberry Pi 7" inch display it covers the full screen and works as expected, But when we run teh GUI application of variant screen size 530x360 the Application strech to fit the screen of Raspberry pi and no touch action works.

is it posible to display screen size of 530x360 (smaller screen) without covering the full display size of 800x480 on Raspberry Pi board?

Thanks in Advance.


1 Answer

0 votes

Hello Chaitra,

typically, the ScreenSize that is defined within a UI project corresponds to the phyisical size of the display.

Within the main.c file you will find the initialization of the viewport:

  viewport = EwInitViewport( EwScreenSize, EwNewRect( 0, 0, w, h ), 0, 255,
    &framebuffer, eglDisplay, eglSurface, ViewportProc );

The parameter w and h are queried by EGL some lines above:

  eglQuerySurface( eglDisplay, eglSurface, EGL_WIDTH,  &w );
  eglQuerySurface( eglDisplay, eglSurface, EGL_HEIGHT, &h);

By default, the OpenGL Platform Package is prepared to scale up/down the UI (which has the size that is defined with ScreenSize) to the full display size.

You can change the initialization according your needs, e.g.

  viewport = EwInitViewport( EwScreenSize, EwNewRect( 0, h - EwScreenSize.Y, EwScreenSize.X, h ), 0, 255,
    &framebuffer, eglDisplay, eglSurface, ViewportProc );

Now the UI is not scaled.

Best regards,



Hi Manfred,

Thank you for you reply,

Now we are able to see the screen for size 530x360, but the other portion on the screen is shown in black.

i want to display the screen similar to any windows application, means when i open the UI application for screen size 530x360 over desktop the remaning portion should still display the desktop screen background.

is there any solution for this?

the entire build environment for Raspberry Pi is prepared to work as full screen application.

From Embedded Wizard point of view, it does no matter if the GUI application is running exclusively as full screen application or within a window of a certain window manager.

The entire integration part is done in main.c file. If you want to run the GUI within a window, you have to initialize the EGL accordingly. So the question is: How to run a OpenGL/EGL application within a window on a Raspberry Pi. Maybe this is more a topic that is covered in some Raspberry Pi forums.

Btw: What is the use case? What do you want to do?
Thanks for reply!

We are planning to use 2 screens of different sizes. 7' and a lower size with different resolution. While trying with the method specified above we were able to see the smaller GUI window but the unoccupied screen area is coming with black background. Further the GUI window is not showing the title bar with max, min and close buttons, which can be used to close the smaller GUI window.

Can you suggest any method with which can have the title bar with close button?

Embedded Wizard Website | Privacy Policy | Imprint