mittsu icon indicating copy to clipboard operation
mittsu copied to clipboard

Using mittsu without graphics

Open Floppy opened this issue 3 years ago • 2 comments

For my use case, I want to manipulate some 3d object files in Ruby, but I don't need to render them; instead I'm using THREE.js in the browser for that. So, in the interests of minimising dependencies would it be possible to make the library work without pulling in OpenGL unless a rendering context is created? I tried to use it without glfw3 installed just to see if it would cope, but it wouldn't start up.

This could perhaps either be done by adapting the code in the library as-is, or for a more extreme solution, splitting the non-graphical stuff out into a separate gem, something like mittsu-core. Do you think either are possible? I'm happy to try this, but it would be good to know what approach you'd prefer I investigate before I do so!

Floppy avatar Apr 15 '23 22:04 Floppy

I've definitely thought about splitting the code out. It was adapted from THREE.js directly, which supports swapping out renderers. The idea would be to have mittsu-core and separate renderers, e.g. mittsu-renderer-[name] e.g. mittsu-renderer-opengl and mittsu-renderer-direct3d etc.

danini-the-panini avatar Apr 17 '23 07:04 danini-the-panini

I was going to suggest exactly that renderer split too, but thought I'd keep it simple to start with :)

Floppy avatar Apr 17 '23 09:04 Floppy