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

[WIP] 0.21 Api changes. #1129

Merged
merged 18 commits into from
Apr 2, 2019
Merged

Conversation

goddessfreya
Copy link
Contributor

@goddessfreya goddessfreya commented Mar 27, 2019

Compiles with the following backends:

  • Linux | X11 | EGL
  • Linux | X11 | GLX
  • Linux | Wayland | EGL
  • Linux | OSMesa
  • Windows | WGL
  • Windows | EGL
  • Web | Emscripten
  • macOS
  • iOS
  • Android

Has been tested with the following backends:

  • Linux | X11 | EGL
  • Linux | X11 | GLX
  • Linux | Wayland | EGL
  • Linux | OSMesa
  • Windows | WGL
  • Windows | EGL
  • Web | Emscripten
  • macOS
  • iOS
  • Android

For #501 and #784

Signed-off-by: Hal Gentz <[email protected]>
Signed-off-by: Hal Gentz <[email protected]>
Signed-off-by: Hal Gentz <[email protected]>
@goddessfreya
Copy link
Contributor Author

goddessfreya commented Mar 27, 2019

This PR comes with a slew of changes.

  • The removal of libcaca: It is currently impossible for users to use libcaca (afaik), and it seams out of place for glutin.
  • Contexts now take either PossiblyCurrentContext or NotCurrentContext as a generic parameter. The goal for this is to eventually implement Send + Sync on contexts which took NotCurrentContexts, but not on ones that took PossiblyCurrentContext. Contexts can be converted between the two via make_not_current and make_current.

Emphasis should be put on the "Possibly", however, because a user can just do this:

let c1: Context<PossiblyCurrentContext> = c1.make_current_context().unwrap();
let c2: Context<PossiblyCurrentContext> = c2.make_current_context().unwrap();

c1.get_proc_address("Uh oh, this is undefined.");

There is no way to stop this from happening, so we also expose treat_as_not_current, which in the example above would be called on c1 after making c2 current.

@goddessfreya
Copy link
Contributor Author

Signed-off-by: Hal Gentz <[email protected]>
Signed-off-by: Hal Gentz <[email protected]>
Signed-off-by: Hal Gentz <[email protected]>
Signed-off-by: Hal Gentz <[email protected]>
Signed-off-by: Hal Gentz <[email protected]>
Signed-off-by: Hal Gentz <[email protected]>
Signed-off-by: Hal Gentz <[email protected]>
Signed-off-by: Hal Gentz <[email protected]>
Signed-off-by: Hal Gentz <[email protected]>
Signed-off-by: Hal Gentz <[email protected]>
Signed-off-by: Hal Gentz <[email protected]>
Signed-off-by: Hal Gentz <[email protected]>
Signed-off-by: Hal Gentz <[email protected]>
Signed-off-by: Hal Gentz <[email protected]>
@goddessfreya goddessfreya merged commit 90f0ef4 into rust-windowing:master Apr 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant