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

New Feature: Ability to "get_proc_address" with *const c_char directly. #1314

Closed
Lokathor opened this issue Jul 14, 2020 · 1 comment
Closed

Comments

@Lokathor
Copy link
Contributor

All the actual C level functions to get_proc_address accept *const c_char, not &str.

In the current implementation, a user has to pass &str, then the library converts that to a CString, and then uses the pointer to that to perform the actual OS call.

Since the GL function names are stored as const values in the loader, the loader can just add the '\0' and then pass a *const c_char directly, and avoid doing an extra allocation per function load.

So a way to directly pass a *const c_char directly should be added. eg: get_proc_address_raw

@i509VCB
Copy link
Contributor

i509VCB commented Aug 30, 2022

#1435 has changed glutin to use &CStr for get_proc_address

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

No branches or pull requests

3 participants