Use GLESv2 as implementation for GLESv1
This may not apply on some systems but works well enough for the snap.
This commit is contained in:
parent
851e9d296d
commit
ce2f7e9928
3 changed files with 7 additions and 4 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue