I was wondering if the .hdr and .img format for the two files in that archive u provided are standard.
I look at the code a bit and tried to compile, but your code won’t read the file. Plus, you appended “.raw” to the file string, where there is no “raw” file in the archive–did u mean, “img?” Wait! Does your “.hdr” means header info?
oh, in the display(…), you are allocating new buffers (xBuf and Eqx) everytime the window resizes and those are local vars–this may have been the cause of mem leaks. perhaps, an expert in this forum can provide sound analysis.
If you can lemme know more about the .hdr file, maybe i can help. well, it’s seems interesting to view a cubic image with clipping planes interesting it. well, good luck.