moved this outside of all that ifdef stuff to work on all platforms. tested on windows gl and it worked. testing on others now.