Error in 3D rendering with xtk on Remote Desktop - xtk

We are trying to implement WebGL for a 3D user interface. We have some users that need access through a Remote Desktop connection, however, WebGL is disabled. When loading a page with WebGL on a Remote Desktop, the error "Oops... Sorry, experimental-webgl context is not supported on this machine!... " appears and the 3D rendering fails. The 2D rendering works. We were wondering if there is a way around this problem.

OpenGL doesn't work with remote desktop because remote desktop opens up another desktop and isn't attached to the hardware display, thus I would assume WebGL has the same limitations. You will need to do a different type of remote desktop maybe vnc or even join.me seems to work fine.

Related

How to detect power saving mode of graphic card in windows application?

I have an application using an OpenGL window that works ok, but someone detects that if the graphics performance is configurated as power saving, the screen doesn't show any render, it only show a black screen that could be interpreted as a UI bug.
I was wondering if there is a way to know if my application is running in power saving mode, since that configuration implies to use the less powered machine's gpu I don't know if it is possible to use the winAPI. In example I have a Intel GPU and a Nvidia GPU, so the power saving mode use Intel's GPU.
I want to send a warning message or turn off the power save mode.
The winAPI function GetSystemPowerStatus seems to be related with the battery, so it doesn't work for my purpose.
References
https://www.amd.com/en/support/kb/faq/gpu-110
https://asapguide.com/graphics-performance-preferences/
The problem was that I was trying to use texture2D that the Intel GPU doesn't support. I just change it to texture, as recommended in comments

DesktopDuplicatipn API windows8 does not capture fullscreen games

I was experimenting with desktopduplication api sample code and it was mentioned here that
even full screen DirectX applications can be duplicated.
Also here it is mentioned that
The following components of the operating system can generate the desktop image:
The DWM by composing the desktop image
A full-screen DirectX or OpenGL application
An application by switching to a separate desktop, for example, the secure desktop that is used to display the login screen
However when I tested the sample code with multiple monitors provided here, it worked fine for other applications running on desktop but when I started a fullscreen directx application, the running applications in the background are pushed onto the secondary monitor and only the secondary monitor is captured in the duplicated window.
What might be the reason for this? I ran the exact sample code provided by MSDN. Is there something more I need to do in order to capture DirectX fullscreen games using DesktopDuplication API

Is there a way I can enable a display without attaching it to desktop through Windows API?

I only need a display for DXGI output, and don't want it to be a part of desktop at all. I really don't want the fullscreened display to exit fullscreen mode just because someone has accidentally moved some window out of the main desktop or so.
Is there a way to enable a display without making it a part of desktop?
"Note Using other monitors as independent displays isn't supported on drivers that are implemented to the Windows Display Driver Model (WDDM)."
Guess I have no luck.

sdl remote desktop

for a simple demo program I am using the SDL library to play a mpeg movie file.
Unfortunately the demo app should be executed on one of our windows 7 servers and it should be looked at remotely.
The problem is, that when I connect via RDP to the server the SDL window stays black - although the movie becomes played (I hear the sound).
I guess this has something to do with the rendering device of OpenGL or DirectDraw when accessing via remote desktop. Does anyone know which settings I should use for setting up the SDL window so it works via RDP also?
When I play the movie with the windows media player the movie becomes displayed correctly - what kind of device uses the media player?
The problem is probably that SDL is rendering directly to video memory (or some sort of DirectDraw surface), but the RDP program is only able to retrieve what's in system memory.
If this is the case, there's a few things you can try. First is a different RDP program that has the ability to grab from DirectDraw or video memory. The other thing is when you call SDL_SetVideoMode() use the SDL_SWSURFACE flag. This will render to system memory where as SDL_HWSURFACE will render to video memory.

Adapting OpenGL render context on remote desktop connection attempt

We have an application which uses an OpenGL render context in a subwindow to display a large bitmap. However, when a user remotely connects to a box running this app, the openGL display stops working, most likely due to the reduced texture resolution.
While we can detect the remote desktop connection starting/ending using WTS_REMOTE_CONNECT, the openGL context does not switch to the virtual driver when trying to determine the new max texture resolution.
Completely restarting the openGL subthread hangs on ChoosePixelFormat, this wont return until I am logged in locally again, otherwise this would be the "bad" solution.
It seam that application is badly written.
Code that is responsible for detecting context changes and reacting to them accordingly, do not exist or is buggy. Any way, you can not do much, unless you have access to source code. Also you can report is as a bug to vendor or provider from whom you bought it.