allen-cell-animated / agave

Other
35 stars 6 forks source link

Refactor: move opengl code out of the gesture module #201

Closed toloudis closed 4 months ago

toloudis commented 4 months ago

As a precursor to potentially replacing OpenGL with a different graphics API like vulkan, wgpu or OptiX, I need to isolate the OpenGL code away from the reusable generic graphics code.

This PR has no functionality changes at all and simply separates the OpenGL code that was part of the gesture library. (The gesture library is used for in-viewport mouse manipulation and also for drawing certain widgets like axis indicators, rotation tools, scale bars)

Key changes:

The refactor is pretty naive and there is probably a reasonable followup that makes the refactor better. (For example, the draw and pick functions are changing things in the gesture internals that should probably be done outside of draw and pick.)