提交 79b0f5b6 编写于 作者: S Simon Fels 提交者: GitHub

Merge pull request #47 from morphis/bug/use-glesv2-over-glesv1

Use GLESv2 as implementation for GLESv1
......@@ -39,10 +39,13 @@ constexpr const char *default_glesv2_lib{"libGLESv2.so.2"};
namespace anbox {
namespace graphics {
namespace emugl {
std::vector<GLLibrary> default_gl_libraries() {
std::vector<GLLibrary> default_gl_libraries(bool no_glesv1) {
return std::vector<GLLibrary>{
{GLLibrary::Type::EGL, default_egl_lib},
{GLLibrary::Type::GLESv1, default_glesv1_lib},
// If environment doesn't provide a GLESv1 .so file we use the GLESv2
// implementation instead. If our stack allows it we can try to get
// rid of GLESv1 completely at a later point.
{GLLibrary::Type::GLESv1, no_glesv1 ? default_glesv2_lib : default_glesv1_lib},
{GLLibrary::Type::GLESv2, default_glesv2_lib},
};
}
......
......@@ -38,7 +38,7 @@ struct GLLibrary {
boost::filesystem::path path;
};
std::vector<GLLibrary> default_gl_libraries();
std::vector<GLLibrary> default_gl_libraries(bool no_glesv1 = false);
bool initialize(const std::vector<GLLibrary> &libs, emugl_logger_struct log_funcs, emugl_crash_func_t crash_func);
} // namespace emugl
......
......@@ -48,7 +48,7 @@ GLRendererServer::GLRendererServer(const Config &config, const std::shared_ptr<w
wm_(wm),
composer_(std::make_shared<LayerComposer>(renderer_, wm)) {
std::vector<emugl::GLLibrary> gl_libs = emugl::default_gl_libraries();
std::vector<emugl::GLLibrary> gl_libs = emugl::default_gl_libraries(true);
if (config.driver == Config::Driver::Translator) {
DEBUG("Using GLES-to-GL translator for rendering");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册