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

JRuby Support #102

Closed
wants to merge 8 commits into from
Closed

JRuby Support #102

wants to merge 8 commits into from

Conversation

danini-the-panini
Copy link
Owner

@danini-the-panini danini-the-panini commented Apr 8, 2021

Work around some issues which prevented Mittsu from running on any version of JRuby.

  1. Fiddle does not automatically convert function arguments to pointers unless they have a to_ptr method. Fiddle::Closure does not have a to_ptr method, and therefore cannot be passed as an argument (e.g. GLFW callbacks). Manually converting them to a pointer works around this issue.
  2. Similarly, Ruby integers do not have a to_ptr method, And must therefore be manually converted to pointers before being passed as function arguments.
  3. nil, however, is automatically converted to a nullptr in JRuby (and thus works as a suitable substitute for 0)

TODO:

  • Get blank scene example running in JRuby
  • Get geometry examples running in JRuby
  • Some of the more complex examples (e.g. torus knot example) quit with no output
  • The tests also quit with a non-zero exit code with no output (possibly same issue as above)
  • Add JRuby to github action test matrix
  • print_tree just prints question marks instead of the special drawing chars (could be an encoding issue? could be a windows-only issue?)

@danini-the-panini danini-the-panini added this to the 0.3.4 milestone Apr 8, 2021
@danini-the-panini danini-the-panini self-assigned this Apr 8, 2021
@danini-the-panini danini-the-panini marked this pull request as draft April 8, 2021 22:37
@headius
Copy link

headius commented Apr 8, 2021

We are willing (and eager) to make improvements to JRuby's fiddle impl! Some of these seem like things we should fix at the source. Great work!

@danini-the-panini danini-the-panini modified the milestones: 0.3.4, 1.0.0 Jul 13, 2022
@danini-the-panini
Copy link
Owner Author

This work will move to mittsu-opengl

@danini-the-panini danini-the-panini deleted the ds-jruby-attempt-2 branch December 2, 2024 14:11
@headius
Copy link

headius commented Dec 2, 2024

Thank you for continuing to work on this @danini-the-panini! If there are specific issues with the JRuby Fiddle support, please file them at https://github.com/ruby/fiddle. The code we use is now being shared with TruffleRuby and is the only FFI-based Fiddle out there... we have a number of folks with an interest in improving it.

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

Successfully merging this pull request may close these issues.

2 participants