//	GLHeaders.h - File including the relevant OpenGL headers for different
//				  platforms.
//  ----------------------------------------------------------------------------
//	This file is part of 'NiallsAVLib', base code for any kind of audiovisual
//	apps.
//	Copyright (C) 2012  Niall Moody
//	
//	This program is free software: you can redistribute it and/or modify
//	it under the terms of the GNU General Public License as published by
//	the Free Software Foundation, either version 3 of the License, or
//	(at your option) any later version.
//
//	This program is distributed in the hope that it will be useful,
//	but WITHOUT ANY WARRANTY; without even the implied warranty of
//	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//	GNU General Public License for more details.
//
//	You should have received a copy of the GNU General Public License
//	along with this program.  If not, see <http://www.gnu.org/licenses/>.
//	----------------------------------------------------------------------------

#ifndef GLHEADERS_H_
#define GLHEADERS_H_

#ifndef OSX
#include "GL/glew.h"
#else
#include "OpenGL/gl.h"
#include "OpenGL/glext.h"
#include "OpenGL/glu.h"

#ifdef GL_APPLE_vertex_array_object

#pragma message "Got it"

#define GL_ARB_vertex_array_object GL_APPLE_vertex_array_object

#define glGenVertexArrays glGenVertexArraysAPPLE
#define glBindVertexArray glBindVertexArrayAPPLE
#define glDeleteVertexArrays glDeleteVertexArraysAPPLE

#endif

#endif

#ifndef GLAPIENTRY
#  if defined(__MINGW32__)
#    define GLAPIENTRY __stdcall
#  elif (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__)
#    define GLAPIENTRY __stdcall
#  else
#    define GLAPIENTRY
#  endif
#endif

#endif
