2013-01-10 19:11:03 +00:00
|
|
|
/*
|
2014-09-07 15:27:49 +00:00
|
|
|
* Copyright (C) 2011-2014 Gregory hainaut
|
2013-01-10 19:11:03 +00:00
|
|
|
* Copyright (C) 2007-2009 Gabest
|
|
|
|
*
|
|
|
|
* 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 2, 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 GNU Make; see the file COPYING. If not, write to
|
|
|
|
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA USA.
|
|
|
|
* http://www.gnu.org/copyleft/gpl.html
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2014-09-07 15:27:49 +00:00
|
|
|
#define GL_TEX_LEVEL_0 (0)
|
|
|
|
#define GL_TEX_LEVEL_1 (1)
|
|
|
|
#define GL_FB_DEFAULT (0)
|
|
|
|
#define GL_BUFFER_0 (0)
|
|
|
|
|
2015-12-29 21:27:24 +00:00
|
|
|
#ifndef GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR
|
|
|
|
#define GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR 0x00000008
|
|
|
|
#endif
|
|
|
|
|
2014-03-13 17:37:40 +00:00
|
|
|
// FIX compilation issue with Mesa 10
|
2019-02-01 11:12:09 +00:00
|
|
|
#include "glext_extra.h"
|
2016-07-07 20:23:20 +00:00
|
|
|
|
|
|
|
// ********************** End of the extra header ******************* //
|
|
|
|
|
2019-01-29 15:38:37 +00:00
|
|
|
// #define ENABLE_GL_ARB_ES3_2_compatibility 1
|
|
|
|
// #define ENABLE_GL_ARB_bindless_texture 1
|
|
|
|
// #define ENABLE_GL_ARB_cl_event 1
|
|
|
|
// #define ENABLE_GL_ARB_compute_variable_group_size 1
|
2019-01-30 11:50:54 +00:00
|
|
|
// #define ENABLE_GL_ARB_debug_output 1
|
2019-01-29 15:38:37 +00:00
|
|
|
// #define ENABLE_GL_ARB_draw_buffers_blend 1
|
|
|
|
// #define ENABLE_GL_ARB_draw_instanced 1
|
|
|
|
// #define ENABLE_GL_ARB_geometry_shader4 1
|
|
|
|
// #define ENABLE_GL_ARB_gl_spirv 1
|
|
|
|
// #define ENABLE_GL_ARB_gpu_shader_int64 1
|
|
|
|
// #define ENABLE_GL_ARB_indirect_parameters 1
|
|
|
|
// #define ENABLE_GL_ARB_instanced_arrays 1
|
|
|
|
// #define ENABLE_GL_ARB_parallel_shader_compile 1
|
|
|
|
// #define ENABLE_GL_ARB_robustness 1
|
|
|
|
// #define ENABLE_GL_ARB_sample_locations 1
|
|
|
|
// #define ENABLE_GL_ARB_sample_shading 1
|
|
|
|
// #define ENABLE_GL_ARB_shading_language_include 1
|
|
|
|
// #define ENABLE_GL_ARB_sparse_buffer 1
|
|
|
|
// #define ENABLE_GL_ARB_sparse_texture 1
|
|
|
|
// #define ENABLE_GL_ARB_texture_buffer_object 1
|
|
|
|
// #define ENABLE_GL_KHR_blend_equation_advanced 1
|
|
|
|
// #define ENABLE_GL_KHR_parallel_shader_compile 1
|
|
|
|
|
2019-02-01 10:34:59 +00:00
|
|
|
// Dark age of openGL. GL_10 and GL_11 are provided by opengl32.dll on windows.
|
|
|
|
// Linux is a royal mess
|
|
|
|
//
|
2019-01-29 15:38:37 +00:00
|
|
|
// #define ENABLE_GL_VERSION_1_0 1
|
|
|
|
// #define ENABLE_GL_VERSION_1_1 1
|
2019-02-01 10:34:59 +00:00
|
|
|
#ifdef _WIN32
|
|
|
|
#define ENABLE_GL_VERSION_1_2 1
|
|
|
|
#define ENABLE_GL_VERSION_1_3 1
|
|
|
|
#define ENABLE_GL_VERSION_1_4 1
|
|
|
|
#endif
|
|
|
|
|
2019-01-29 15:38:37 +00:00
|
|
|
#define ENABLE_GL_VERSION_1_5 1
|
|
|
|
#define ENABLE_GL_VERSION_2_0 1
|
|
|
|
#define ENABLE_GL_VERSION_2_1 1
|
|
|
|
#define ENABLE_GL_VERSION_3_0 1
|
|
|
|
#define ENABLE_GL_VERSION_3_1 1
|
|
|
|
#define ENABLE_GL_VERSION_3_2 1
|
|
|
|
#define ENABLE_GL_VERSION_3_3 1
|
|
|
|
#define ENABLE_GL_VERSION_4_0 1
|
|
|
|
#define ENABLE_GL_VERSION_4_1 1
|
|
|
|
#define ENABLE_GL_VERSION_4_2 1
|
|
|
|
#define ENABLE_GL_VERSION_4_3 1
|
|
|
|
#define ENABLE_GL_VERSION_4_4 1
|
|
|
|
#define ENABLE_GL_VERSION_4_5 1
|
|
|
|
// #define ENABLE_GL_VERSION_4_6 1
|
|
|
|
|
2019-02-01 10:34:59 +00:00
|
|
|
// It should be done by ENABLE_GL_VERSION_1_4 but it conflicts with the old gl.h
|
|
|
|
#ifdef __unix__
|
2015-10-17 15:05:15 +00:00
|
|
|
extern PFNGLBLENDFUNCSEPARATEPROC glBlendFuncSeparate;
|
2019-02-01 10:34:59 +00:00
|
|
|
#endif
|
2014-09-07 15:27:49 +00:00
|
|
|
|
2019-01-29 15:38:37 +00:00
|
|
|
#include "PFN_GLLOADER_HPP.h"
|
2017-02-17 16:44:26 +00:00
|
|
|
|
2019-02-01 10:36:05 +00:00
|
|
|
/*************************************************************
|
|
|
|
* Extra define not provided in glcorearb.h
|
|
|
|
* Currently they are included in the legacy glext.h but the plan
|
|
|
|
* is to move to core only OpenGL
|
|
|
|
************************************************************/
|
|
|
|
|
|
|
|
// Extension not in core profile. It will become irrelevant with sparse texture
|
|
|
|
#ifndef GL_TEXTURE_FREE_MEMORY_ATI
|
|
|
|
#define GL_TEXTURE_FREE_MEMORY_ATI 0x87FC
|
|
|
|
#endif
|
2019-02-01 11:12:09 +00:00
|
|
|
#ifndef GL_NVX_gpu_memory_info
|
|
|
|
#define GL_NVX_gpu_memory_info 1
|
|
|
|
#define GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX 0x9047
|
|
|
|
#define GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX 0x9048
|
|
|
|
#define GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX 0x9049
|
|
|
|
#define GL_GPU_MEMORY_INFO_EVICTION_COUNT_NVX 0x904A
|
|
|
|
#define GL_GPU_MEMORY_INFO_EVICTED_MEMORY_NVX 0x904B
|
|
|
|
#endif /* GL_NVX_gpu_memory_info */
|
2019-02-01 10:36:05 +00:00
|
|
|
|
|
|
|
// Added in GL4.6. Code should be updated but driver support...
|
|
|
|
#ifndef GL_TEXTURE_MAX_ANISOTROPY_EXT
|
|
|
|
#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
|
|
|
|
#endif
|
|
|
|
|
2019-02-04 11:36:02 +00:00
|
|
|
namespace GLExtension {
|
|
|
|
extern bool Has(const std::string& ext);
|
|
|
|
extern void Set(const std::string& ext, bool v = true);
|
|
|
|
}
|
2017-02-17 16:44:26 +00:00
|
|
|
|
2013-01-14 09:15:39 +00:00
|
|
|
namespace GLLoader {
|
2017-05-11 20:35:31 +00:00
|
|
|
void check_gl_requirements();
|
2013-05-19 12:42:55 +00:00
|
|
|
|
2017-08-02 17:52:15 +00:00
|
|
|
extern bool vendor_id_amd;
|
|
|
|
extern bool vendor_id_nvidia;
|
|
|
|
extern bool vendor_id_intel;
|
|
|
|
extern bool amd_legacy_buggy_driver;
|
|
|
|
extern bool mesa_driver;
|
2016-06-01 18:58:10 +00:00
|
|
|
extern bool buggy_sso_dual_src;
|
2013-07-28 14:40:43 +00:00
|
|
|
extern bool in_replayer;
|
2013-07-11 17:08:42 +00:00
|
|
|
|
2014-09-30 19:56:36 +00:00
|
|
|
// GL
|
2013-05-27 16:53:38 +00:00
|
|
|
extern bool found_geometry_shader;
|
2013-06-16 16:33:08 +00:00
|
|
|
extern bool found_GL_ARB_gpu_shader5;
|
2013-07-28 14:40:43 +00:00
|
|
|
extern bool found_GL_ARB_shader_image_load_store;
|
2013-08-02 16:38:12 +00:00
|
|
|
extern bool found_GL_ARB_clear_texture;
|
2014-09-07 15:27:49 +00:00
|
|
|
extern bool found_GL_ARB_direct_state_access;
|
2015-05-02 08:53:19 +00:00
|
|
|
extern bool found_GL_EXT_texture_filter_anisotropic;
|
2016-07-07 20:02:10 +00:00
|
|
|
extern bool found_GL_NVX_gpu_memory_info;
|
|
|
|
extern bool found_GL_ATI_meminfo;
|
2013-01-10 19:11:03 +00:00
|
|
|
}
|