Adding alphamask. Making alpha channel work in opengl. Changing glswapbuffer to glflush