graphics: specify all necessary OpenGL ES libraries by default
This commit is contained in:
parent
1edfa6e3dd
commit
8b6ced19fe
4 changed files with 5 additions and 5 deletions
|
|
@ -129,7 +129,7 @@ class SystemInformation {
|
||||||
}
|
}
|
||||||
|
|
||||||
void collect_graphics_info() {
|
void collect_graphics_info() {
|
||||||
auto gl_libs = anbox::graphics::emugl::default_gl_libraries(true);
|
auto gl_libs = anbox::graphics::emugl::default_gl_libraries();
|
||||||
if (!anbox::graphics::emugl::initialize(gl_libs, nullptr, nullptr)) {
|
if (!anbox::graphics::emugl::initialize(gl_libs, nullptr, nullptr)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,13 +37,13 @@ constexpr const char *default_glesv2_lib{"libGLESv2.so.2"};
|
||||||
namespace anbox {
|
namespace anbox {
|
||||||
namespace graphics {
|
namespace graphics {
|
||||||
namespace emugl {
|
namespace emugl {
|
||||||
std::vector<GLLibrary> default_gl_libraries(bool no_glesv1) {
|
std::vector<GLLibrary> default_gl_libraries() {
|
||||||
return std::vector<GLLibrary>{
|
return std::vector<GLLibrary>{
|
||||||
{GLLibrary::Type::EGL, default_egl_lib},
|
{GLLibrary::Type::EGL, default_egl_lib},
|
||||||
// If environment doesn't provide a GLESv1 .so file we use the GLESv2
|
// 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
|
// implementation instead. If our stack allows it we can try to get
|
||||||
// rid of GLESv1 completely at a later point.
|
// rid of GLESv1 completely at a later point.
|
||||||
{GLLibrary::Type::GLESv1, no_glesv1 ? default_glesv2_lib : default_glesv1_lib},
|
{GLLibrary::Type::GLESv1, default_glesv1_lib},
|
||||||
{GLLibrary::Type::GLESv2, default_glesv2_lib},
|
{GLLibrary::Type::GLESv2, default_glesv2_lib},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ struct GLLibrary {
|
||||||
boost::filesystem::path path;
|
boost::filesystem::path path;
|
||||||
};
|
};
|
||||||
|
|
||||||
std::vector<GLLibrary> default_gl_libraries(bool no_glesv1 = false);
|
std::vector<GLLibrary> default_gl_libraries();
|
||||||
|
|
||||||
bool initialize(const std::vector<GLLibrary> &libs, emugl_logger_struct *log_funcs, logger_t crash_func);
|
bool initialize(const std::vector<GLLibrary> &libs, emugl_logger_struct *log_funcs, logger_t crash_func);
|
||||||
} // namespace emugl
|
} // namespace emugl
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ GLRendererServer::GLRendererServer(const Config &config, const std::shared_ptr<w
|
||||||
|
|
||||||
composer_ = std::make_shared<LayerComposer>(renderer_, composer_strategy);
|
composer_ = std::make_shared<LayerComposer>(renderer_, composer_strategy);
|
||||||
|
|
||||||
auto gl_libs = emugl::default_gl_libraries(true);
|
auto gl_libs = emugl::default_gl_libraries();
|
||||||
|
|
||||||
emugl_logger_struct log_funcs;
|
emugl_logger_struct log_funcs;
|
||||||
log_funcs.coarse = logger_write;
|
log_funcs.coarse = logger_write;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue