2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2010-04-27 06:09:44 +04:00
|
|
|
|
|
|
|
#if !defined(LOCALGL_H_)
|
|
|
|
# define LOCALGL_H_
|
|
|
|
|
2013-08-13 18:35:03 +04:00
|
|
|
# include "GLTypes.h"
|
|
|
|
# include "GLConsts.h"
|
2012-09-25 16:49:28 +04:00
|
|
|
|
2018-11-27 07:23:19 +03:00
|
|
|
namespace mozilla {
|
|
|
|
namespace gl {
|
|
|
|
class GLContext;
|
|
|
|
bool CheckContextLost(const GLContext* gl);
|
|
|
|
} // namespace gl
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
# define MOZ_GL_ASSERT(glContext, expr) \
|
|
|
|
MOZ_ASSERT((expr) || mozilla::gl::CheckContextLost(glContext))
|
|
|
|
|
|
|
|
// -
|
|
|
|
|
2013-08-13 18:35:03 +04:00
|
|
|
// clang-format off
|
2018-11-27 11:47:49 +03:00
|
|
|
|
2013-08-13 18:35:03 +04:00
|
|
|
// TODO: use official constant names instead of followed ones.
|
2017-06-15 09:43:53 +03:00
|
|
|
|
2012-09-25 16:49:28 +04:00
|
|
|
// IMG_texture_compression_pvrtc
|
|
|
|
#define LOCAL_GL_COMPRESSED_RGB_PVRTC_4BPPV1 0x8C00
|
|
|
|
#define LOCAL_GL_COMPRESSED_RGB_PVRTC_2BPPV1 0x8C01
|
|
|
|
#define LOCAL_GL_COMPRESSED_RGBA_PVRTC_4BPPV1 0x8C02
|
|
|
|
#define LOCAL_GL_COMPRESSED_RGBA_PVRTC_2BPPV1 0x8C03
|
|
|
|
|
2013-08-13 18:35:03 +04:00
|
|
|
// OES_EGL_image_external
|
|
|
|
#define LOCAL_GL_TEXTURE_EXTERNAL 0x8D65
|
2013-11-29 08:11:49 +04:00
|
|
|
#define LOCAL_GL_TEXTURE_BINDING_EXTERNAL 0x8D67
|
2012-07-20 08:14:14 +04:00
|
|
|
|
2013-08-13 18:35:03 +04:00
|
|
|
// AMD_compressed_ATC_texture
|
|
|
|
#define LOCAL_GL_ATC_RGB 0x8C92
|
|
|
|
#define LOCAL_GL_ATC_RGBA_EXPLICIT_ALPHA 0x8C93
|
|
|
|
#define LOCAL_GL_ATC_RGBA_INTERPOLATED_ALPHA 0x87EE
|
2013-02-14 03:26:24 +04:00
|
|
|
|
2015-07-20 02:03:10 +03:00
|
|
|
// EGL_ANDROID_image_crop
|
|
|
|
#define LOCAL_EGL_IMAGE_CROP_LEFT_ANDROID 0x3148
|
|
|
|
#define LOCAL_EGL_IMAGE_CROP_TOP_ANDROID 0x3149
|
|
|
|
#define LOCAL_EGL_IMAGE_CROP_RIGHT_ANDROID 0x314A
|
|
|
|
#define LOCAL_EGL_IMAGE_CROP_BOTTOM_ANDROID 0x314B
|
|
|
|
|
2016-04-06 23:47:25 +03:00
|
|
|
// EGL_ANGLE_platform_angle
|
|
|
|
#define LOCAL_EGL_PLATFORM_ANGLE_ANGLE 0x3202
|
|
|
|
#define LOCAL_EGL_PLATFORM_ANGLE_TYPE_ANGLE 0x3203
|
|
|
|
#define LOCAL_EGL_PLATFORM_ANGLE_MAX_VERSION_MAJOR_ANGLE 0x3204
|
|
|
|
#define LOCAL_EGL_PLATFORM_ANGLE_MAX_VERSION_MINOR_ANGLE 0x3205
|
|
|
|
#define LOCAL_EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE 0x3206
|
2022-07-06 10:45:29 +03:00
|
|
|
#define LOCAL_EGL_PLATFORM_ANGLE_DEBUG_LAYERS_ENABLED_ANGLE 0x3451
|
2016-04-06 23:47:25 +03:00
|
|
|
|
2017-06-15 09:43:53 +03:00
|
|
|
// EGL_ANGLE_keyed_mutex
|
|
|
|
#define LOCAL_EGL_DXGI_KEYED_MUTEX_ANGLE 0x33A2
|
|
|
|
|
2018-02-24 02:47:41 +03:00
|
|
|
// EGL_ANGLE_stream_producer_d3d_texture
|
2017-06-15 09:43:53 +03:00
|
|
|
#define LOCAL_EGL_D3D_TEXTURE_SUBRESOURCE_ID_ANGLE 0x33AB
|
|
|
|
|
2016-04-06 23:47:25 +03:00
|
|
|
// EGL_ANGLE_platform_angle_d3d
|
|
|
|
#define LOCAL_EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE 0x3207
|
|
|
|
#define LOCAL_EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE 0x3208
|
|
|
|
#define LOCAL_EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE 0x3209
|
|
|
|
#define LOCAL_EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE 0x320A
|
|
|
|
#define LOCAL_EGL_PLATFORM_ANGLE_DEVICE_TYPE_WARP_ANGLE 0x320B
|
|
|
|
#define LOCAL_EGL_PLATFORM_ANGLE_DEVICE_TYPE_REFERENCE_ANGLE 0x320C
|
|
|
|
#define LOCAL_EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE 0x320F
|
|
|
|
|
2018-02-01 15:39:31 +03:00
|
|
|
// EGL_ANGLE_d3d_texture_client_buffer
|
|
|
|
#define LOCAL_EGL_D3D_TEXTURE_ANGLE 0x33A3
|
|
|
|
|
|
|
|
// EGL_ANGLE_flexible_surface_compatibility
|
|
|
|
#define LOCAL_EGL_FLEXIBLE_SURFACE_COMPATIBILITY_SUPPORTED_ANGLE 0x33A6
|
|
|
|
|
2017-11-29 07:13:40 +03:00
|
|
|
// EGL_ANGLE_experimental_present_path
|
|
|
|
#define LOCAL_EGL_EXPERIMENTAL_PRESENT_PATH_ANGLE 0x33A4
|
|
|
|
#define LOCAL_EGL_EXPERIMENTAL_PRESENT_PATH_FAST_ANGLE 0x33A9
|
|
|
|
#define LOCAL_EGL_EXPERIMENTAL_PRESENT_PATH_COPY_ANGLE 0x33AA
|
|
|
|
|
2016-04-06 23:47:25 +03:00
|
|
|
// EGL_ANGLE_direct3d_display
|
|
|
|
#define LOCAL_EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE ((EGLNativeDisplayType)-2)
|
|
|
|
#define LOCAL_EGL_D3D11_ONLY_DISPLAY_ANGLE ((EGLNativeDisplayType)-3)
|
|
|
|
|
2020-11-10 05:24:53 +03:00
|
|
|
// EGL_ANGLE_feature_control
|
|
|
|
#define LOCAL_EGL_FEATURE_OVERRIDES_ENABLED_ANGLE 0x3466
|
|
|
|
|
2016-04-06 23:47:25 +03:00
|
|
|
// WGL_NV_DX_interop
|
|
|
|
#define LOCAL_WGL_ACCESS_READ_ONLY 0x0000
|
|
|
|
#define LOCAL_WGL_ACCESS_READ_WRITE 0x0001
|
|
|
|
#define LOCAL_WGL_ACCESS_WRITE_DISCARD 0x0002
|
|
|
|
|
2013-08-13 18:35:03 +04:00
|
|
|
// Others
|
|
|
|
#define LOCAL_EGL_PRESERVED_RESOURCES 0x3030
|
|
|
|
#define LOCAL_EGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_EXT 0x3138
|
|
|
|
#define LOCAL_GL_CONTEXT_FLAGS_ARB 0x2094
|
|
|
|
#define LOCAL_GL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
|
|
|
|
#define LOCAL_GL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
|
|
|
|
#define LOCAL_GL_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004
|
2013-05-08 07:58:22 +04:00
|
|
|
|
2019-11-11 16:09:32 +03:00
|
|
|
// EGL_ANGLE_create_context_backwards_compatible
|
|
|
|
#define LOCAL_EGL_CONTEXT_OPENGL_BACKWARDS_COMPATIBLE_ANGLE 0x3483
|
|
|
|
|
2019-11-20 10:12:42 +03:00
|
|
|
// EGL_ANGLE_image_d3d11_texture
|
|
|
|
#define LOCAL_EGL_D3D11_TEXTURE_ANGLE 0x3484
|
|
|
|
|
2012-05-21 15:12:37 +04:00
|
|
|
// clang-format on
|
2018-11-27 11:47:49 +03:00
|
|
|
|
2010-04-27 06:09:44 +04:00
|
|
|
#endif
|