// Copyright 2016 The University of North Carolina at Chapel Hill
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//    http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Please send all BUG REPORTS to <pavel@cs.unc.edu>.
// <http://gamma.cs.unc.edu/FasTC/>

#ifndef _IO_SRC_GL_DEFINES_H_
#define _IO_SRC_GL_DEFINES_H_

#ifdef OPENGL_FOUND
# ifdef __APPLE__
#  include <OpenGL/gl.h>
# else
#  ifdef _MSC_VER
#    define WIN32_LEAN_AND_MEAN
#    include "Windows.h"
#    undef LoadImage
#  endif
#  include <GL/gl.h>
# endif
#endif

#ifndef GL_VERSION_1_1

#define GL_BYTE                           0x1400
#define GL_UNSIGNED_BYTE                  0x1401
#define GL_SHORT                          0x1402
#define GL_UNSIGNED_SHORT                 0x1403
#define GL_INT                            0x1404
#define GL_UNSIGNED_INT                   0x1405
#define GL_FLOAT                          0x1406
#define GL_DOUBLE                         0x140A

#define GL_RGBA                           0x1908
#define GL_RGBA8                          0x8058

#endif  // GL_VERSION_1_1

#ifndef GL_VERTSION_4_2

#define GL_COMPRESSED_RGBA_BPTC_UNORM     0x8E8C

#endif  // GL_VERTSION_4_2

////////////////////////////////////////////////////////////////////////////////
//
// PVRTC definitions
//
////////////////////////////////////////////////////////////////////////////////

#ifndef COMPRESSED_RGB_PVRTC_4BPPV1_IMG
#define COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00
#endif

#ifndef COMPRESSED_RGB_PVRTC_2BPPV1_IMG
#define COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01
#endif

#ifndef COMPRESSED_RGBA_PVRTC_4BPPV1_IMG
#define COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02
#endif

#ifndef COMPRESSED_RGBA_PVRTC_2BPPV1_IMG
#define COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03
#endif

////////////////////////////////////////////////////////////////////////////////
//
// ASTC definitions
//
////////////////////////////////////////////////////////////////////////////////

#ifndef COMPRESSED_RGBA_ASTC_4x4_KHR
#define COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0
#endif

#ifndef COMPRESSED_RGBA_ASTC_5x4_KHR
#define COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1
#endif

#ifndef COMPRESSED_RGBA_ASTC_5x5_KHR
#define COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2
#endif

#ifndef COMPRESSED_RGBA_ASTC_6x5_KHR
#define COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3
#endif

#ifndef COMPRESSED_RGBA_ASTC_6x6_KHR
#define COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4
#endif

#ifndef COMPRESSED_RGBA_ASTC_8x5_KHR
#define COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5
#endif

#ifndef COMPRESSED_RGBA_ASTC_8x6_KHR
#define COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6
#endif

#ifndef COMPRESSED_RGBA_ASTC_8x8_KHR
#define COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7
#endif

#ifndef COMPRESSED_RGBA_ASTC_10x5_KHR
#define COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8
#endif

#ifndef COMPRESSED_RGBA_ASTC_10x6_KHR
#define COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9
#endif

#ifndef COMPRESSED_RGBA_ASTC_10x8_KHR
#define COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA
#endif

#ifndef COMPRESSED_RGBA_ASTC_10x10_KHR
#define COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB
#endif

#ifndef COMPRESSED_RGBA_ASTC_12x10_KHR
#define COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC
#endif

#ifndef COMPRESSED_RGBA_ASTC_12x12_KHR
#define COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD
#endif

#endif
  // _IO_SRC_GL_DEFINES_H_
