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

Investigate which graphics library to use #1

Open
potocpav opened this issue Apr 29, 2016 · 11 comments
Open

Investigate which graphics library to use #1

potocpav opened this issue Apr 29, 2016 · 11 comments

Comments

@potocpav
Copy link
Owner

Currently, glium is used. This is not necessarily a good choice. If we are going to switch, we should do it sooner rather than later. Points to consider:

  • ease of using widgets, menus, file-open dialogs etc. (provided by GTK or other toolkits),
  • portability,
  • simpliticy,
  • speed (a non-issue for most Rust libraries).
@Bluebird45
Copy link

Bluebird45 commented May 1, 2016

Whatever it is, it should be as much Rust as possible, because the appeal of such an app being Rust from front to back is compelling in its novelty.

I am currently looking at Conrod but, alas, I find it has its own issues that I'm yet to overcome.

@Bluebird45
Copy link

Bluebird45 commented May 2, 2016

There is wxWidgets, a newer alternative to GTK and QT, which is described in their FAQ as follows:

What is wxWidgets?

wxWidgets is a class library that allows you to compile graphical C++ programs on a range of different platforms. wxWidgets defines a common API across platforms, but uses the native graphical user interface (GUI) on each platform, so your program will take on the native 'look and feel' that users are familiar with.

There's also a Rust binding for it.

Since none of those three are Rust, and they do appear to be the range of choices (since Conrod is not much better than Glium, for our purpose here, of serious development), then I'd give wxWidgets a look.

For the student, seeing this as both an opportunity to learn and a career/business development, it comes down to QT or, perhaps, wxWidgets because of their wider applicability than GTK.

@potocpav
Copy link
Owner Author

potocpav commented May 3, 2016

I think that in practice, wxWidgets is quite ugly (Audacity). Qt is great, but the Rust bindings are not there.

If we used the rendering capabilities of a said library, how much code could actually be re-used? It may be just src/core.rs. In that case, it might be easier to just fork/start a new project. And maybe we should not do our own rendering, since it is just extra work and it is not terribly likely that we will need to render 3D meshes inside our editor (motion blur is probably unnecessary, too :-) ).

@DemonOne
Copy link

DemonOne commented May 3, 2016

@potocpav wxWidgets uses GTK+ controls under the hood (on linux), I'm pretty sure it can be themed too.
Please also consider the native win32 support it has.

The latest xi_gilum using GTK3 is bugged on Windows btw.

@potocpav
Copy link
Owner Author

potocpav commented May 4, 2016

@DemonOne OK, I will play with wxWidgets, maybe create a branch if I get the bindings working in a reasonable way.

About the Windows support, GTK3 needs Cairo, GTK+ and GLib on the system, so that might be the problem.

@DemonOne
Copy link

DemonOne commented May 4, 2016

@potocpav I had to get the entire GTK3 runtime for win32 before I could even build xi_gilum (a little less than 300MB).
Anyway, the program loads and displays the main window and you can see the RPC working, but the text isn't displayed.

@disordinary
Copy link

What does servo use?

@disordinary
Copy link

It might be that a pure rust implementation is Linux only until one of the GUI libraries matures.

@potocpav
Copy link
Owner Author

Servo uses azure / gleam for webrender (raw OpenGL). GTK should be an optional feature for now, since it is so much hassle on Windows.

@potocpav
Copy link
Owner Author

potocpav commented Sep 8, 2016

libui could be a possibility. There are some old Rust bindings too

@vandenoever
Copy link

https://github.com/cyndis/qmlrs is nice but not active.

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

5 participants