Aeva / m.grl

Midnight Graphics & Recreation Library
http://mgrl.midnightsisters.org
GNU Lesser General Public License v3.0
44 stars 3 forks source link

2-D mode #166

Closed wijnen closed 8 years ago

wijnen commented 9 years ago

As mentioned in #160 I worked on making m.grl usable for 2-D rendering. I started a while ago, and the patch is for the commit when I started (03de5c72cd2670f648e0c4c682408bc057c92682); I hope it's not too hard to make it apply to the current code.

The basic idea is that when "2d" is passed as option string to set_context, it will not do any opengl things and will instead create overlay divs with images in them (non-image nodes are not supported). I didn't check if ganis work, but I wouldn't be surprised if they do. I also didn't try to do picking yet; it would need its own code (or instead a simple event coordinate to x,y conversion can be provided, assuming that the camera always looks straight down).

I have an example running at http://wijnen.dtdns.net/~shevek/2d-test/.

For some reason github doesn't let me upload the patch, so I posted it there as well: http://wijnen.dtdns.net/~shevek/2d-test/2d.patch

Aeva commented 9 years ago

so, the way github likes to do things is, is you hit the fork button, make the changes in your copy of the repository, and then when it works, you would then hit the 'pull request' button and then I can review and attempt to do a merge or give granular feedback on the diff

Aeva commented 8 years ago

The pull request that implements this feature has been merged into master, so closing this ticket now.