rucs_hack
27th August 2010, 15:40
A while back I found this code that implements a minimal set of glut shapes for QT, but it didn't work due to a memory leak.
I found and fixed the leak, and even though the original code is old it works perfectly on windows/linux and the mac. I'm currently using it in a QT program to display the output from an n-body model.
The shapes it makes available are
glutWireCube
glutSolidCube
glutWireTorus
glutSolidTorus
glutSolidSphere
glutWireSphere
Provided these are the only shapes you use there's no need to change existing glut code for this to work. Using this means you don't have to link against the glut lib, which is quite handy (well I think so).
download link (http://moody.politespider.com/releases/qtglut.zip)
If anyone wants to extend this to add more glut features then I'd be happy to update the file I've got hosted. I may well add more stuff to it myself, but not just yet, I'm still finishing my own software that uses it.
I found and fixed the leak, and even though the original code is old it works perfectly on windows/linux and the mac. I'm currently using it in a QT program to display the output from an n-body model.
The shapes it makes available are
glutWireCube
glutSolidCube
glutWireTorus
glutSolidTorus
glutSolidSphere
glutWireSphere
Provided these are the only shapes you use there's no need to change existing glut code for this to work. Using this means you don't have to link against the glut lib, which is quite handy (well I think so).
download link (http://moody.politespider.com/releases/qtglut.zip)
If anyone wants to extend this to add more glut features then I'd be happy to update the file I've got hosted. I may well add more stuff to it myself, but not just yet, I'm still finishing my own software that uses it.