I've been notified that hardware acceleration using off-screen rendering has been implemented in r1751(issue 1257 resolved.) and wanted to try it.
So I've updated a simple off-screen program which was using r1628 from "I-don't-remember-wich-branch" to the last available version of the trunk.
But the simplest program does not seem to work, because CefExecuteProcess return 0, preventing the application to continue.
Here's the program I'm currently running on windows 8.1 with the last available CEF trunk version: CEF3.2078.1759
- Code: Select all
int main(int argc, char** argv)
{
CefRefPtr<sfw::SFApp> app(new sfw::SFApp);
CefSettings settings;
settings.windowless_rendering_enabled = true;
CefMainArgs main_args;
int exitCode = CefExecuteProcess(main_args, app.get(), NULL); // this return 0, preventing the application to do anything.
if (exitCode >= 0)
{
std::exit(0);
}
CefInitialize(main_args, settings, app.get(), NULL);
// creating a window using SFML
sf::RenderWindow window(sf::VideoMode(800, 600), "SFML Window");
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
CefDoMessageLoopWork();
window.clear();
window.display();
}
CefShutdown();
return 0;
}
Is it because the main process could now return 0 instead of -1? I can't see anything in the documentation mentioning this so I don't think so, but I don't find what's wrong in my code, wich worked with my old revision