CEF OpenGL Implementation

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

CEF OpenGL Implementation

Postby xDennis0811 » Wed Feb 13, 2019 11:31 am

Hello everybody,
I successfully downloaded and get the CEFsimple application to run.I want now to implement that the browser gets rendered to a buffer and after this to a opengl texture.Where should I look first to do this ? I already know that I need a Render Class for this and set the window to Windowless but where should I start ? I appreciate any help :)
xDennis0811
Techie
 
Posts: 29
Joined: Wed Feb 13, 2019 11:28 am

Re: CEF OpenGL Implementation

Postby magreenblatt » Wed Feb 13, 2019 12:00 pm

You can look at the cefclient sample application. Run with the `--off-screen-rendering-enabled` command-line flag and review the source files under cefclient/browser that have osr in the name.
magreenblatt
Site Admin
 
Posts: 12404
Joined: Fri May 29, 2009 6:57 pm

Re: CEF OpenGL Implementation

Postby xDennis0811 » Wed Feb 13, 2019 12:17 pm

I already tried this but I can't even compile the cefclient application :) I downloaded the cef binary with sample, compiled it with cmake and opened the visual studio solution but if I try to compile in VS the cefClient then I got many errors :)
xDennis0811
Techie
 
Posts: 29
Joined: Wed Feb 13, 2019 11:28 am

Re: CEF OpenGL Implementation

Postby magreenblatt » Wed Feb 13, 2019 12:20 pm

What VS version? What errors?
magreenblatt
Site Admin
 
Posts: 12404
Joined: Fri May 29, 2009 6:57 pm

Re: CEF OpenGL Implementation

Postby xDennis0811 » Wed Feb 13, 2019 12:31 pm

Visual Studio version is 2017 Community Edition and the errors are:
Code: Select all
1>------ Build started: Project: cefclient, Configuration: Debug x64 ------
1>osr_window_win.obj : error LNK2019: unresolved external symbol "private: void __cdecl client::OsrWindowWin::EnsureRenderHandler(void)" (?EnsureRenderHandler@OsrWindowWin@client@@AEAAXXZ) referenced in function "private: virtual void __cdecl client::OsrWindowWin::OnAcceleratedPaint(class scoped_refptr<class CefBrowser>,enum cef_paint_element_type_t,class std::vector<class CefRect,class std::allocator<class CefRect> > const &,void *)" (?OnAcceleratedPaint@OsrWindowWin@client@@EEAAXV?$scoped_refptr@VCefBrowser@@@@W4cef_paint_element_type_t@@AEBV?$vector@VCefRect@@V?$allocator@VCefRect@@@std@@@std@@PEAX@Z)
1>C:\Users\Dennis\Downloads\cef_binary_3.3626.1886.g162fdec_windows64.tar\cef_binary_3.3626.1886.g162fdec_windows64\tests\cefclient\Debug\cefclient.exe : fatal error LNK1120: 1 unresolved externals
1>Done building project "cefclient.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 2 up-to-date, 0 skipped ==========

xDennis0811
Techie
 
Posts: 29
Joined: Wed Feb 13, 2019 11:28 am

Re: CEF OpenGL Implementation

Postby magreenblatt » Wed Feb 13, 2019 12:41 pm

Looks like the "#endif // defined(CEF_USE_ATL)" at the end of browser\osr_window_win.cc in in the wrong place. Moving it before the OsrWindowWin::EnsureRenderHandler method should fix your error.
magreenblatt
Site Admin
 
Posts: 12404
Joined: Fri May 29, 2009 6:57 pm

Re: CEF OpenGL Implementation

Postby xDennis0811 » Wed Feb 13, 2019 12:47 pm

Okay it worked now thank you :) And what should I do now to understand the process of OpenGL texture rendering better ? :)
xDennis0811
Techie
 
Posts: 29
Joined: Wed Feb 13, 2019 11:28 am

Re: CEF OpenGL Implementation

Postby magreenblatt » Wed Feb 13, 2019 12:53 pm

The code in osr_window_win.cc, osr_render_handler_win_gl.cc and osr_renderer.cc is most relevant for GL rendering. It should be a good place to start.
magreenblatt
Site Admin
 
Posts: 12404
Joined: Fri May 29, 2009 6:57 pm

Re: CEF OpenGL Implementation

Postby xDennis0811 » Wed Feb 13, 2019 12:57 pm

Okay thank you I will have a look into these files :) Can I use them too in a own project to work with it or isn't this possible ? :)
xDennis0811
Techie
 
Posts: 29
Joined: Wed Feb 13, 2019 11:28 am

Re: CEF OpenGL Implementation

Postby magreenblatt » Wed Feb 13, 2019 1:14 pm

CEF is BSD licensed, so you can use them.
magreenblatt
Site Admin
 
Posts: 12404
Joined: Fri May 29, 2009 6:57 pm

Next

Return to Support Forum

Who is online

Users browsing this forum: No registered users and 38 guests