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

Accessing CGL native context #102

Open
jasongrlicky opened this issue Jun 1, 2017 · 2 comments
Open

Accessing CGL native context #102

jasongrlicky opened this issue Jun 1, 2017 · 2 comments

Comments

@jasongrlicky
Copy link

Hi there! I'm investigating using this library for a hardware-accelerated image processing library I'm working on, and one of my requirements is that I'm able to get access the native context for each platform I'm deploying on. It seems like the way to do that here is to use GLContext's .handle() method here, and to access the struct's members from there.

However, I ran into a problem when doing this on macOS - I can't figure out a way to actually access the underlying CGLContextObj. I'm pretty new to this library, but it seems that in order to access the native context object, in src/platform/with_cgl/native_gl_context.rs:

pub struct NativeGLContextHandle(CGLContextObj);

should be:

pub struct NativeGLContextHandle(pub CGLContextObj);

Does this make sense, or is there something I'm missing? Thanks so much!

@kvark
Copy link
Member

kvark commented Jun 1, 2017

@emilio
Copy link
Member

emilio commented Oct 6, 2017

Not really, that works for me.

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

3 participants