Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the runtime dependency on libGL again. #1854

Merged
merged 1 commit into from
May 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions core/os/device/deviceinfo/cc/linux/query.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ void destroyContext() {
return;
}

if (!core::hasGLorGLES()) {
return;
}

core::DlLoader libX("libX11.so");
pfn_XFree fn_XFree = (pfn_XFree)libX.lookup("XFree");
pfn_XCloseDisplay fn_XCloseDisplay = (pfn_XCloseDisplay)libX.lookup("XCloseDisplay");
Expand All @@ -101,6 +105,9 @@ void destroyContext() {
}

void createGlContext() {
if (!core::hasGLorGLES()) {
return;
}
auto fn_glXChooseFBConfig= (pfn_glXChooseFBConfig)core::GetGlesProcAddress("glXChooseFBConfig", true);
auto fn_glXCreateNewContext = (pfn_glXCreateNewContext)core::GetGlesProcAddress("glXCreateNewContext", true);
auto fn_glXCreatePbuffer = (pfn_glXCreatePbuffer)core::GetGlesProcAddress("glXCreatePbuffer", true);
Expand Down
3 changes: 3 additions & 0 deletions gapis/api/gles/templates/api_imports.cpp.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ namespace gapii {
}
void {{$name}}::resolve() {
if (!core::hasGLorGLES()) {
return;
}
using namespace core;
{{range $c := AllCommands $}}
{{if not (GetAnnotation $c "synthetic")}}
Expand Down