Open cztomczak opened 10 years ago
I suggest rendering the page on a SDL2 surface. SDL2 is portable on all major platforms including iOS and Android. (I have made a Go binding package: https://github.com/hailiang/go-sdl ).
Currently there is a bug in Go linker on Windows that prevents us from implementing app/client handlers, thus OSR cannot be implemented (at least on Windows). The plan was to create OSR example for Windows first (that's my main platform). See the code comments about the problem in the _InitializeGlobalCStructures() function.
There is Issue 2601 in the Go project that I think might be the cause of the problem.
It turns out this is some problem with GCC on Windows when calling Chromium C API, as I've prepared a C example that does same things as in Go and these exceptions also occur. Reported problem on the CEF forum:
App/Client handlers Windows issue was fixed in commit f78983456b6c8a899d27f72ffe6923019ba92504. Nothing stands in way to implement OSR now.
That's great news!
Off-screen rendering support was implemented in paperlesspost fork (https://github.com/paperlesspost/cef2go). See cef/render_handler.go . This fork is tested on Linux only.
For an example usage of OnPaint callback see this commit: https://github.com/paperlesspost/cef2go/blob/ada33ec9eaa634634eca89da69d1a48bccc22282/cef/cef_callbacks.go
I use cef2go to develop a gis app. I use html5 webgl draw map. when I drag data file to the map. but Map dont't refresh. But I use cef c# wrapper, It can work. Chrome also can work.why?
I guess my problem may have something to do with the WM_PAINT event.
I am not sure.
@oldtree2008 Please do not ask questions in the tracker. Do not talk off-topic. Use forum.
Many people are asking for this, so it should become a high priority.
What should the example do? What libraries to use in the example? Some framework/game engine or just plain win32 WM_PAINT?