iopleke / Minechem

Chemical decomposition and synthesis in Minecraft
http://iopleke.github.io/Minechem/
Other
82 stars 94 forks source link

Update fontbox dependency: fix for a GPU memory leak condition. #765

Closed AfterLifeLochie closed 9 years ago

AfterLifeLochie commented 9 years ago

An issue was detected in the rendering buffer feature (using glDisplayList feature, added in commit afterlifelochie/fontbox@c4888f5a98922a6d4e1bb360e185a8211f2a838a) which could potentially cause machines with little available on-board GPU memory to run out of GPU-memory for storage of vertex data. This would likely result in the application terminating unexpectedly or being unable to render any elements on the screen, but is difficult to trigger given the quantity of memory normally available on the GPU and the quantity of memory used on a per-BookGUI basis.

This has been addressed by inserting a callback into the onGuiClosed method (commit afterlifelochie/fontbox@a1fb27e72182e1d59de63def4d381f495f0d3ab3) to ensure that glDeleteLists is invoked correctly on the local displaylist map, thus correctly freeing the stored data in GPU-memory.

If you override the onGuiClosed, ensure you invoke the super-method explicitly so that the buffers are cleaned up correctly.