Skip to content

Switch from rust-glut and glfw-rs to glutin #3579

Closed

Description

@brendanzab

I would like to try my hand at porting servo to @tomaka's pure-rust glutin library once an OS X port has been completed (@DavidPartouche is working on it).

Advantages:

  • glutin works on Windows, Linux, Android, and soon OS X
  • it would simplify the build system and reduce the number of Servo's prerequisites
  • dogfooding glutin would be very valuable for the #rust-gamedev community
  • glfw is not a Rust project and is less able to accommodate Rust-specific concerns

Disadvatages:

  • glfw has a larger user base, and more people actively working on it
  • glutin still lacks lots of features provided by glfw - some of those might be required by Servo
  • still doesn't solve the headless rendering problem
  • glutin does not handle input events

As previously stated, this still doesn't solve the headless rendering problem, which my incomplete efl-rs wrapper was meant to solve. I still have doubts though about whether we would want to saddle Servo with the considerable complexity of the EFL build system, so maybe we might need to investigate a pure Rust solution for that as well.

cc. @larsbergstrom @metajack

Activity

  1. self-assigned this
    on Oct 6, 2014
  2. tomaka commented on Oct 6, 2014

    @tomaka

    I already have a pull request for headless rendering: rust-windowing/glutin#44 (it doesn't support reading the content of the framebuffer yet).
    I'm waiting to see how to implement this on OS/X before merging.

    The other major disadvantage is that thee API for events is unstable. I started by implementing glfw's API, then realized that it was not optimal so I did some changes to it. In the meanwhile the piston project want to create a standardized input crate.
    I'm also experimenting with an API identical to what is accessible to Javascript, but I'm probably going to drop it too.

  3. brendanzab commented on Oct 6, 2014

    @brendanzab
    SponsorContributorAuthor

    Ok, so there might be some blockers. Would be good if the servo guys could give us some feedback on what they might need for input handling.

  4. tomaka commented on Oct 6, 2014

    @tomaka

    Support for OS/X has been implemented by the way: rust-windowing/glutin#45

  5. mbrubeck commented on Oct 6, 2014

    @mbrubeck
    Contributor

    I'm hoping to replace our GLUT-based Android app with something that uses the Android framework directly, sometime "soon." Replacing our GLFW-based desktop app with Glutin still sounds like a good project, though.

    Related, I'm also working on extracting the windowing and input code out of libservo and into a separate "application" layer; see #3533 for very early stages of that. This should make it easier to embed Servo from different graphics/windowing toolkits.

  6. glennw commented on Oct 23, 2014

    @glennw
    Member

    After dscussing with @bjz I'm starting to look at this on Linux, to see if we run into any immediate problems.

  7. brendanzab commented on Feb 2, 2015

    @brendanzab
    SponsorContributorAuthor

    Closed by #4798

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions