webgl in offscreen mode

Do not post support requests, bug reports or feature requests. Discuss CEF here. Non-CEF related discussion goes in General Discussion!

Re: webgl in offscreen mode

Postby amaitland » Tue Dec 15, 2015 4:54 pm

Can you try the `cefclient` for version ` 3.2454.1344`? It's possible that whatever video card may require a newer version to function correctly.
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1290
Joined: Wed Jan 14, 2015 2:35 am

Re: webgl in offscreen mode

Postby Jonas » Tue Dec 15, 2015 5:57 pm

WebGL works with cefclient (3.2454.1344) and with CefSharp.OffScreen.Example (45.0.0).

I was able to build my own offscreen program, and WebGL works. So, that's all good now.

But, I think I discovered why my original offscreen project does not work. It looks like WebGL does not work in an offscreen CefSharp project that is also a Windows service. That was my original goal, to make this a service.
Jonas
Techie
 
Posts: 39
Joined: Thu Jul 10, 2014 2:23 pm

Re: webgl in offscreen mode

Postby amaitland » Tue Dec 15, 2015 6:51 pm

You can look at something like `RedGate.AppHost` to run the `UI` out of process.

https://github.com/red-gate/RedGate.AppHost
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1290
Joined: Wed Jan 14, 2015 2:35 am

Re: webgl in offscreen mode

Postby Jonas » Tue Dec 15, 2015 11:02 pm

Communication to my application, which runs as a Windows service, is through a socket. There is no UI per se.
Thank you for the suggestion.

I may have to run my application as a console app in order to render offscreen with WebGL.
Jonas
Techie
 
Posts: 39
Joined: Thu Jul 10, 2014 2:23 pm

Re: webgl in offscreen mode

Postby amaitland » Wed Dec 16, 2015 4:39 am

With `RedGate.AppHost` you can use the `CefSharp.WPF`project with your `UI` hosted in a separate process, the framework provides the `IPC`.

You don't actually have to display the `UI`. The RedGate `sql-scripts` project uses an older version of `CefSharp`.

https://github.com/red-gate/sql-scripts

Anyway, if you can get away with a console app, then that's obviously going to be the simplest option.
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1290
Joined: Wed Jan 14, 2015 2:35 am

Re: webgl in offscreen mode

Postby Jonas » Wed Dec 16, 2015 11:42 am

Yeah, RedGate looks like a whole new thing to learn and I'm not sure if would solve the issue. After very little googling, it became apparent that the GPU is definitely not accessible from a Windows service, and it may not be even be possible to create an OpenGL context. In order to use WebGL with hardware acceleration, the app must run in a user session. So that pretty much rules out a Windows service.

Thanks again, Jonas
Jonas
Techie
 
Posts: 39
Joined: Thu Jul 10, 2014 2:23 pm

Previous

Return to CEF Discussion

Who is online

Users browsing this forum: No registered users and 21 guests