OpenGL2: Clean up texmod calculations, and improve vertex animation handling.