Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Focus on Window #4

Open
jbienz opened this issue Jan 10, 2022 · 4 comments
Open

Focus on Window #4

jbienz opened this issue Jan 10, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@jbienz
Copy link
Contributor

jbienz commented Jan 10, 2022

Is your feature request related to a problem? Please describe.
Feature request

Describe the solution you'd like
It'd be great if Refract should be targeted at a specific window rather than the entire desktop. This would make it easier to do things like depth editing in PhotoShop.

Describe alternatives you've considered
Currently Photoshop has to be maximized.

Additional context
N/A

@jbienz jbienz added the enhancement New feature or request label Jan 10, 2022
@jbienz
Copy link
Contributor Author

jbienz commented Jan 11, 2022

The shortest path to supporting this would probably be to add support for uWindowCapture in addition to the currently supported uDesktopDuplication. This article (translation required) says that this will be slower than uDesktopDuplication, but if the target window is a lot smaller than the desktop it could be decent.

@AJpon
Copy link

AJpon commented Jan 31, 2022

This article (translation required) says that this will be slower than uDesktopDuplication, but if the target window is a lot smaller than the desktop it could be decent.

This article was written when uWindowCapture was released. It is old information.
uWindowCapture now supports WinRT Windows.Graphics.Capture API. It works very fast. See this article for details.

@AJpon
Copy link

AJpon commented Jan 31, 2022

WinRT Windows.Graphics.Capture API is not supported on legacy Windows. (Windows 10 1803 or later is required)
Currently, the only advantage of using uDesktopDuplication is that it works on legacy Windows. If you want to maintain compatibility, I recommend using uDesktopDuplication as is.
However, i suggest you switch libraries if the reason you choose uDesktopDuplication is that it is faster than uWindowCapture.

@AJpon
Copy link

AJpon commented Jan 31, 2022

There are several libraries for Unity that support WinRT Windows.Graphics.Capture API.
uWindowCapture also supports some legacy capture APIs, so it is highly compatible, but it is larger.
If you don't care about compatibility, you can consider using a tiny library such as UnityGraphicsCapture.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants