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

Avoid linking libGL at compile time #81

Open
katyo opened this issue Dec 17, 2019 · 2 comments
Open

Avoid linking libGL at compile time #81

katyo opened this issue Dec 17, 2019 · 2 comments

Comments

@katyo
Copy link

katyo commented Dec 17, 2019

I see that OpenGL library linking with nanovg-sys at compile time:

if target.contains("linux") {
println!("cargo:rustc-link-lib=GL");
} else if target.contains("darwin") {
println!("cargo:rustc-link-lib=framework=OpenGL");

Why we need to do it so?
I think we may and should avoid to do it because usually OpenGL API procedures initializes dynamically at runtime by requesting addresses to it after initializing context.

@katyo
Copy link
Author

katyo commented Dec 21, 2019

It seems I found reasonable solution.
I suggest simply use GLAD for GL API calls.
The GLAD allows load addresses of GL procedures using external function, which can be provided from rust-side.
I hope that solution may help resolve my previous issue #80.
Are you welcome PRs?

@KevinKelley
Copy link
Owner

PR welcome, yes..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants