How to control EGL window position on screen?
I have a working program that creates an EGL window and then renders into it using OpenGL ES on Raspberry Pi 4. I can control the size of the window but the position on the screen is random every time. I need to be able to control the position on the screen.
I've read that it can be done with subsarfaces and I looked at the clients/subsurfaces.c example but wasn't able to make sense of it.
I attached egl.c file where I'm initializing both Wayland and EGL and it contains all the important bits.
I tried a few experiments with creating a second surface, making it a subsurface and then creating the EGL window from that subsurface but then nothing ever showed up on the screen.
Any help would be much appreciated.