Hi, I have an application that currently uses glfw and OpenGL 4.3 to render assets such as videos, images etc. I have a requirement where a third party application needs to be able to take a screenshot of the window content, and a third party remote viewing application (Mesh Central) needs to be able to view the window content also.
Currently when a screenshot is taken it takes it of the Desktop, and when viewing through mesh central it shows nothing unless either the task manager is up, or the task bar is up, with the window appearing behind it.
The window is currently being rendered as windowed borderless at fullscreen size with the following window hints:
glfwWindowHint(GLFW_DECORATED, GLFW_FALSE);
glfwWindowHint(GLFW_FOCUSED, GLFW_TRUE);
glfwWindowHint(GLFW_AUTO_ICONIFY, GLFW_FALSE);
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_FLOATING, GLFW_TRUE);
Does anyone know how I can resolve this issue?
If you can see your content when running your GLFW application locally then this sounds like it is more of an issue with Mesh Central and/or the screenshot application. Note that you’ll likely need to add information about your operating and windowing system (X11, Wayland etc.) to any question you pose to those communities.
One other thing to be aware of is that in OpenGL the distinction between true fullscreen and windowed borderless at fullscreen size is very grey. The windowing system and OpenGL drivers may promote a borderless fullscreen window to true fullscreen and thus bypass the compositor. I have heard that making the window not quite fullcsreen can avoid this, but have not tried this myself since it is difficult to tell the difference. In your case you could try to add or remove a small value to the window size and see if it makes a difference.
Hi Doug,
Currently its running on Windows with DWM and on Linux with X11.
Your advice about the OS promoting a borderless fullsceen window to fullscreen seems to be the issue, providing a window width of the screen width -1 or +1 seems to have completely fixed it, thank you! Are you aware of a possible solution that can fix it from being promoted without needing to modify the window size?
No I don’t know of any other method.
I would recommend contacting the authors of third party apps you are using to take screen shots and see if they can resolve their issue with fullscreen applications such as yours.