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!

webgl in offscreen mode

Postby Jonas » Fri Dec 11, 2015 2:54 pm

Does offscreen CEF support WebGL?

I am asking because WebGL is not working in offscreen CefSharp for me, and I want to make sure the problem is not in CEF before I dig into CefSharp or just switch to CEF.

Thank you,
Jonas
Jonas
Techie
 
Posts: 39
Joined: Thu Jul 10, 2014 2:23 pm

Re: webgl in offscreen mode

Postby magreenblatt » Fri Dec 11, 2015 9:10 pm

What OS and CEF version? It generally requires GPU acceleration which is disabled by default in current versions of cefclient when off-screen rendering is enabled (pass '--enable-gpu' command line flag to enable).
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: webgl in offscreen mode

Postby Jonas » Mon Dec 14, 2015 12:15 pm

Windows 7 and Cef r3.2357.1287.g861c26e. I pass --enable-gpu with no effect. GPU acceleration is present on the computer.

I am guessing the problem is with CefSharp or how I am using CefSharp. My main question for this forum is, Is WebGL supported in CEF offscreen mode? I am guessing it is since I haven't read otherwise.
Jonas
Techie
 
Posts: 39
Joined: Thu Jul 10, 2014 2:23 pm

Re: webgl in offscreen mode

Postby Jonas » Mon Dec 14, 2015 12:18 pm

Also, I am getting the following errors when CEF initializes:

[1211/172558:ERROR:gl_surface_egl.cc(173)] eglInitialize failed with error UNKNOWN
[1211/172558:ERROR:gl_surface_win.cc(152)] GLSurfaceEGL::InitializeOneOff failed.
[1211/172558:ERROR:gpu_child_thread.cc(163)] Exiting GPU process due to errors during initialization
Jonas
Techie
 
Posts: 39
Joined: Thu Jul 10, 2014 2:23 pm

Re: webgl in offscreen mode

Postby magreenblatt » Mon Dec 14, 2015 12:35 pm

Jonas wrote:My main question for this forum is, Is WebGL supported in CEF offscreen mode?

Yes. It may be broken on your system for some reason. How does it behave in Google Chrome or with windowed rendering in cefclient? You can download the cefclient sample application and run "cefclient.exe --off-screen-rendering-enabled --enable-gpu" on your system to verify the behavior with off-screen rendering.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: webgl in offscreen mode

Postby Jonas » Mon Dec 14, 2015 3:01 pm

WebGL works correctly in Chrome and in cefclient in offscreen mode. So, that confirms WebGL works as expected in CEF.
I'll have to dig deeper into CefSharp to find the issue.

Thank you for helping me to better isolate the issue.
Jonas
Jonas
Techie
 
Posts: 39
Joined: Thu Jul 10, 2014 2:23 pm

Re: webgl in offscreen mode

Postby amaitland » Mon Dec 14, 2015 4:54 pm

Jonas wrote:WebGL works correctly in Chrome and in cefclient in offscreen mode. So, that confirms WebGL works as expected in CEF.
I'll have to dig deeper into CefSharp to find the issue.

Thank you for helping me to better isolate the issue.
Jonas


What version of `CefSharp` are you using? Which version of `cefclient` did you compare it to?

If you try using the `CefSharp.MinimalExample.Wpf` project to load your url does it work there? (`WPF` uses `OSR` rendering)

https://github.com/cefsharp/CefSharp.MinimalExample
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1291
Joined: Wed Jan 14, 2015 2:35 am

Re: webgl in offscreen mode

Postby Jonas » Mon Dec 14, 2015 5:10 pm

I am using:
CefSharp 43.0.1.0
CefClient v1.0 based on Cef 3.2556.1368.g535c4fb

My code is based on the offscreen example, but I see that my CefSharp version is based on a slightly older Cef version than the CefClient uses.
Jonas
Techie
 
Posts: 39
Joined: Thu Jul 10, 2014 2:23 pm

Re: webgl in offscreen mode

Postby amaitland » Mon Dec 14, 2015 5:38 pm

It's probably worth trying the `45.0.0` release, which is based on 3.2454.1344
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1291
Joined: Wed Jan 14, 2015 2:35 am

Re: webgl in offscreen mode

Postby Jonas » Tue Dec 15, 2015 2:05 pm

I upgraded to CefSharp 45. WebGL is still not working.

I guess the next step is to see if I can get the WinForms example and the OffScreen example to work with WebGL.
Jonas
Techie
 
Posts: 39
Joined: Thu Jul 10, 2014 2:23 pm

Next

Return to CEF Discussion

Who is online

Users browsing this forum: No registered users and 36 guests