Cuperino / QPrompt-Teleprompter

Teleprompter software for all video creators. Built with ease of use, productivity, control accuracy, and smooth performance in mind.
https://qprompt.app
GNU General Public License v3.0
355 stars 22 forks source link

How to activate transparency in Windows? #203

Closed arikrupnik closed 10 months ago

arikrupnik commented 11 months ago

Thank you for publishing this package, @Cuperino. The feature that is especially relevant to me is transparency. Transparency works exactly as I expect on Linux with the slider controlling it, but I can't activate it on Windows. The slider moves and changes the numbers (% opacity) but the QPrompt window remains 100% opaque. I'm using QPrompt 1.1.6, Windows 11 Home.

I haven't seen any questions about it in existing issues, so I assume it's a misconfiguration on my end.

Screenshot 2023-08-07 135510

Cuperino commented 11 months ago

Hi @arikrupnik,

Thank you for your kind words. I hadn't seen this issue happen on Windows yet, but it could be caused by a few things:

  1. Background transparency may be disable at the application level. Go to Main Menu (top left) > Other Settings and check that Disable background transparency is NOT selected.
  2. If you were prompted to restart QPrompt during your interactions with it, and you didn't restart it, this could lead to an inconsistent state in the renderer where the program renders at 24 bit color instead of 32 bit, which disables background transparency. A restart prompt can show while toggling Disable background transparency and while toggling Screen > Enable projection.
  3. In the case of Windows, check that Windows isn't running the QPrompt in Compatibility Mode. The only compatibility setting that might be necessary is "Disable fullscreen optimizations", and this is only required in older versions of QPrompt to prevent crashes, but enabling it should allow you to use transparency in screen projections. The main window should become transparent regardless.

If none of the previous things are causing the issue, then it is something at the operating system o the hardware level.

  1. Make sure that you're graphics card's driver is up to date.
  2. Make sure that the Windows compositor is up and running. This is a process called DWM.exe or Desktop Window Manager. If it's not, then your computer may have a virus and you should probably reinstall Windows.
  3. Make sure that your computer's graphics support OpenGL 3.0 and DirectX 11. If you need to go get a different graphics adapter, please note that future versions of QPrompt for Windows will require DirectX 12 at a minimum instead, and support for Vulkan under Linux.

In any case, the issue here is that Windows's compositor is not rendering QPrompt's windows with transparencies, so the QPrompt's window background, which lies behind the adjustable background while it is semi-transparent, render black instead of fully transparent.

In case it helps that you know, the Windows version of QPrompt is built and tested on a computer running the latest Windows 11, and at the time of writing, is compatible with all versions of Windows starting Windows 7. At some point in the mid-future, the minimum required version will be upped to Windows 10, and OpenGL will be deprecated in favor of DirectX 12 on Windows, Vulkan on Linux, and Metal on MacOS.

arikrupnik commented 11 months ago

Thank you for your prompt response.

1: Check 2: Check (I tried switching transparency off and on, and each time it restarted) 3: Not sure how to check for compatibility mode. I'm mostly a Linux person. Where would I look for that? 4: Check. NVIDIA RTX 3050, driver version 528.79 5: Check 6: OpenGL 4.6; DirectX 11.4, 12.2

I'm running this on a Dell laptop (XPS15). It has an Intel integrated card and an NVIDIA card. I have NVIDIA as default, but I tried switching the setting to let QPrompt to run on the integrated card, with the same results.

I'd be grateful for further ideas.

Cuperino commented 10 months ago

3: Not sure how to check for compatibility mode. I'm mostly a Linux person. Where would I look for that?

You can find all compatibility options for a program by right clicking on their icon or on the executable, and then clicking on Properties from the context menu. If Properties does not show, try creating an icon of the program on your desktop first and try again with that. The properties window will have a tab for compatibility options, click on it for the options.

6: OpenGL 4.6; DirectX 11.4, 12.2

That should work just fine.

4: Check. NVIDIA RTX 3050, driver version 528.79

Try Nvidia's settings. Disable any optimizations you may have enabled. Experiment with features related to the compositor, since this is an issue with how the compositor is doing things. Remember to close and re-open QPrompt after any configuration changes.

arikrupnik commented 10 months ago

Thank you for your guidance, @Cuperino. Windows was not running QPrompt in compatibility mode. I did find the relevant NVIDIA setting. It's OpenGL GDI Compatibility, and needs to be on Prefer Compatible setting. I hope this helps future users. I have transparency working now. Thank you again for this piece of software. Screenshot 2023-08-08 135400

Cuperino commented 10 months ago

Thank you for sharing this solution! I'm sure it'll be helpful to other users of nvidia graphics.

I find it fascinating that OpenGL goes through GDI on Windows. That API is as old as Windows itself!