Added Windows shortcut to generate CodeLite project
Changed two submesh's error message Fixed OpenGL.hpp/.cpp spaces for some displayers OpenGL loads GL_kdr_debug if possible instead of GL_ARB_debug_output Refactored external includes
This commit is contained in:
parent
b559932d63
commit
f8a0cdad39
|
|
@ -5,6 +5,9 @@
|
||||||
*.layout
|
*.layout
|
||||||
*.workspace
|
*.workspace
|
||||||
|
|
||||||
|
# CodeLite
|
||||||
|
*.project
|
||||||
|
|
||||||
# Compiled Object files
|
# Compiled Object files
|
||||||
*.slo
|
*.slo
|
||||||
*.lo
|
*.lo
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
premake4 --with-examples codelite
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
premake4 codelite
|
||||||
|
|
@ -13,8 +13,9 @@ location(_ACTION)
|
||||||
|
|
||||||
includedirs
|
includedirs
|
||||||
{
|
{
|
||||||
"../include",
|
"../include",
|
||||||
"../src/"
|
"../src/",
|
||||||
|
"../extlibs/include"
|
||||||
}
|
}
|
||||||
|
|
||||||
libdirs "../lib"
|
libdirs "../lib"
|
||||||
|
|
@ -35,7 +36,7 @@ configuration "*Static"
|
||||||
configuration "*DLL"
|
configuration "*DLL"
|
||||||
kind "SharedLib"
|
kind "SharedLib"
|
||||||
|
|
||||||
configuration "gmake"
|
configuration "codeblocks or codelite or gmake or xcode3*"
|
||||||
buildoptions "-std=c++11"
|
buildoptions "-std=c++11"
|
||||||
|
|
||||||
configuration { "linux or bsd or macosx", "gmake" }
|
configuration { "linux or bsd or macosx", "gmake" }
|
||||||
|
|
|
||||||
|
|
@ -29,5 +29,5 @@ configuration "Release*"
|
||||||
configuration "*Static"
|
configuration "*Static"
|
||||||
defines "NAZARA_STATIC"
|
defines "NAZARA_STATIC"
|
||||||
|
|
||||||
configuration "gmake"
|
configuration "codeblocks or codelite or gmake or xcode3*"
|
||||||
buildoptions "-std=c++11"
|
buildoptions "-std=c++11"
|
||||||
|
|
|
||||||
|
|
@ -4,20 +4,16 @@ files "main.cpp"
|
||||||
|
|
||||||
configuration "DebugStatic"
|
configuration "DebugStatic"
|
||||||
links "NazaraCored-s"
|
links "NazaraCored-s"
|
||||||
links "NazaraRendererd-s"
|
|
||||||
links "NazaraUtilityd-s"
|
links "NazaraUtilityd-s"
|
||||||
|
|
||||||
configuration "ReleaseStatic"
|
configuration "ReleaseStatic"
|
||||||
links "NazaraCore-s"
|
links "NazaraCore-s"
|
||||||
links "NazaraRenderer-s"
|
|
||||||
links "NazaraUtility-s"
|
links "NazaraUtility-s"
|
||||||
|
|
||||||
configuration "DebugDLL"
|
configuration "DebugDLL"
|
||||||
links "NazaraCored"
|
links "NazaraCored"
|
||||||
links "NazaraRendererd"
|
|
||||||
links "NazaraUtilityd"
|
links "NazaraUtilityd"
|
||||||
|
|
||||||
configuration "ReleaseDLL"
|
configuration "ReleaseDLL"
|
||||||
links "NazaraCore"
|
links "NazaraCore"
|
||||||
links "NazaraRenderer"
|
|
||||||
links "NazaraUtility"
|
links "NazaraUtility"
|
||||||
File diff suppressed because it is too large
Load Diff
12800
include/GL3/glext.h
12800
include/GL3/glext.h
File diff suppressed because it is too large
Load Diff
1001
include/GL3/glxext.h
1001
include/GL3/glxext.h
File diff suppressed because it is too large
Load Diff
|
|
@ -1,943 +0,0 @@
|
||||||
#ifndef __wglext_h_
|
|
||||||
#define __wglext_h_
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
** Copyright (c) 2007-2012 The Khronos Group Inc.
|
|
||||||
**
|
|
||||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
|
||||||
** copy of this software and/or associated documentation files (the
|
|
||||||
** "Materials"), to deal in the Materials without restriction, including
|
|
||||||
** without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
** distribute, sublicense, and/or sell copies of the Materials, and to
|
|
||||||
** permit persons to whom the Materials are furnished to do so, subject to
|
|
||||||
** the following conditions:
|
|
||||||
**
|
|
||||||
** The above copyright notice and this permission notice shall be included
|
|
||||||
** in all copies or substantial portions of the Materials.
|
|
||||||
**
|
|
||||||
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
||||||
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
||||||
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
||||||
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
||||||
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Function declaration macros - to move into glplatform.h */
|
|
||||||
|
|
||||||
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
|
|
||||||
#define WIN32_LEAN_AND_MEAN 1
|
|
||||||
#include <windows.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef APIENTRY
|
|
||||||
#define APIENTRY
|
|
||||||
#endif
|
|
||||||
#ifndef APIENTRYP
|
|
||||||
#define APIENTRYP APIENTRY *
|
|
||||||
#endif
|
|
||||||
#ifndef GLAPI
|
|
||||||
#define GLAPI extern
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*************************************************************/
|
|
||||||
|
|
||||||
/* Header file version number */
|
|
||||||
/* wglext.h last updated 2012/01/04 */
|
|
||||||
/* Current version at http://www.opengl.org/registry/ */
|
|
||||||
#define WGL_WGLEXT_VERSION 24
|
|
||||||
|
|
||||||
#ifndef WGL_ARB_buffer_region
|
|
||||||
#define WGL_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001
|
|
||||||
#define WGL_BACK_COLOR_BUFFER_BIT_ARB 0x00000002
|
|
||||||
#define WGL_DEPTH_BUFFER_BIT_ARB 0x00000004
|
|
||||||
#define WGL_STENCIL_BUFFER_BIT_ARB 0x00000008
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_ARB_multisample
|
|
||||||
#define WGL_SAMPLE_BUFFERS_ARB 0x2041
|
|
||||||
#define WGL_SAMPLES_ARB 0x2042
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_ARB_extensions_string
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_ARB_pixel_format
|
|
||||||
#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000
|
|
||||||
#define WGL_DRAW_TO_WINDOW_ARB 0x2001
|
|
||||||
#define WGL_DRAW_TO_BITMAP_ARB 0x2002
|
|
||||||
#define WGL_ACCELERATION_ARB 0x2003
|
|
||||||
#define WGL_NEED_PALETTE_ARB 0x2004
|
|
||||||
#define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005
|
|
||||||
#define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006
|
|
||||||
#define WGL_SWAP_METHOD_ARB 0x2007
|
|
||||||
#define WGL_NUMBER_OVERLAYS_ARB 0x2008
|
|
||||||
#define WGL_NUMBER_UNDERLAYS_ARB 0x2009
|
|
||||||
#define WGL_TRANSPARENT_ARB 0x200A
|
|
||||||
#define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037
|
|
||||||
#define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038
|
|
||||||
#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039
|
|
||||||
#define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A
|
|
||||||
#define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B
|
|
||||||
#define WGL_SHARE_DEPTH_ARB 0x200C
|
|
||||||
#define WGL_SHARE_STENCIL_ARB 0x200D
|
|
||||||
#define WGL_SHARE_ACCUM_ARB 0x200E
|
|
||||||
#define WGL_SUPPORT_GDI_ARB 0x200F
|
|
||||||
#define WGL_SUPPORT_OPENGL_ARB 0x2010
|
|
||||||
#define WGL_DOUBLE_BUFFER_ARB 0x2011
|
|
||||||
#define WGL_STEREO_ARB 0x2012
|
|
||||||
#define WGL_PIXEL_TYPE_ARB 0x2013
|
|
||||||
#define WGL_COLOR_BITS_ARB 0x2014
|
|
||||||
#define WGL_RED_BITS_ARB 0x2015
|
|
||||||
#define WGL_RED_SHIFT_ARB 0x2016
|
|
||||||
#define WGL_GREEN_BITS_ARB 0x2017
|
|
||||||
#define WGL_GREEN_SHIFT_ARB 0x2018
|
|
||||||
#define WGL_BLUE_BITS_ARB 0x2019
|
|
||||||
#define WGL_BLUE_SHIFT_ARB 0x201A
|
|
||||||
#define WGL_ALPHA_BITS_ARB 0x201B
|
|
||||||
#define WGL_ALPHA_SHIFT_ARB 0x201C
|
|
||||||
#define WGL_ACCUM_BITS_ARB 0x201D
|
|
||||||
#define WGL_ACCUM_RED_BITS_ARB 0x201E
|
|
||||||
#define WGL_ACCUM_GREEN_BITS_ARB 0x201F
|
|
||||||
#define WGL_ACCUM_BLUE_BITS_ARB 0x2020
|
|
||||||
#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021
|
|
||||||
#define WGL_DEPTH_BITS_ARB 0x2022
|
|
||||||
#define WGL_STENCIL_BITS_ARB 0x2023
|
|
||||||
#define WGL_AUX_BUFFERS_ARB 0x2024
|
|
||||||
#define WGL_NO_ACCELERATION_ARB 0x2025
|
|
||||||
#define WGL_GENERIC_ACCELERATION_ARB 0x2026
|
|
||||||
#define WGL_FULL_ACCELERATION_ARB 0x2027
|
|
||||||
#define WGL_SWAP_EXCHANGE_ARB 0x2028
|
|
||||||
#define WGL_SWAP_COPY_ARB 0x2029
|
|
||||||
#define WGL_SWAP_UNDEFINED_ARB 0x202A
|
|
||||||
#define WGL_TYPE_RGBA_ARB 0x202B
|
|
||||||
#define WGL_TYPE_COLORINDEX_ARB 0x202C
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_ARB_make_current_read
|
|
||||||
#define ERROR_INVALID_PIXEL_TYPE_ARB 0x2043
|
|
||||||
#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_ARB_pbuffer
|
|
||||||
#define WGL_DRAW_TO_PBUFFER_ARB 0x202D
|
|
||||||
#define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E
|
|
||||||
#define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F
|
|
||||||
#define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030
|
|
||||||
#define WGL_PBUFFER_LARGEST_ARB 0x2033
|
|
||||||
#define WGL_PBUFFER_WIDTH_ARB 0x2034
|
|
||||||
#define WGL_PBUFFER_HEIGHT_ARB 0x2035
|
|
||||||
#define WGL_PBUFFER_LOST_ARB 0x2036
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_ARB_render_texture
|
|
||||||
#define WGL_BIND_TO_TEXTURE_RGB_ARB 0x2070
|
|
||||||
#define WGL_BIND_TO_TEXTURE_RGBA_ARB 0x2071
|
|
||||||
#define WGL_TEXTURE_FORMAT_ARB 0x2072
|
|
||||||
#define WGL_TEXTURE_TARGET_ARB 0x2073
|
|
||||||
#define WGL_MIPMAP_TEXTURE_ARB 0x2074
|
|
||||||
#define WGL_TEXTURE_RGB_ARB 0x2075
|
|
||||||
#define WGL_TEXTURE_RGBA_ARB 0x2076
|
|
||||||
#define WGL_NO_TEXTURE_ARB 0x2077
|
|
||||||
#define WGL_TEXTURE_CUBE_MAP_ARB 0x2078
|
|
||||||
#define WGL_TEXTURE_1D_ARB 0x2079
|
|
||||||
#define WGL_TEXTURE_2D_ARB 0x207A
|
|
||||||
#define WGL_MIPMAP_LEVEL_ARB 0x207B
|
|
||||||
#define WGL_CUBE_MAP_FACE_ARB 0x207C
|
|
||||||
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x207D
|
|
||||||
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x207E
|
|
||||||
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x207F
|
|
||||||
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x2080
|
|
||||||
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x2081
|
|
||||||
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x2082
|
|
||||||
#define WGL_FRONT_LEFT_ARB 0x2083
|
|
||||||
#define WGL_FRONT_RIGHT_ARB 0x2084
|
|
||||||
#define WGL_BACK_LEFT_ARB 0x2085
|
|
||||||
#define WGL_BACK_RIGHT_ARB 0x2086
|
|
||||||
#define WGL_AUX0_ARB 0x2087
|
|
||||||
#define WGL_AUX1_ARB 0x2088
|
|
||||||
#define WGL_AUX2_ARB 0x2089
|
|
||||||
#define WGL_AUX3_ARB 0x208A
|
|
||||||
#define WGL_AUX4_ARB 0x208B
|
|
||||||
#define WGL_AUX5_ARB 0x208C
|
|
||||||
#define WGL_AUX6_ARB 0x208D
|
|
||||||
#define WGL_AUX7_ARB 0x208E
|
|
||||||
#define WGL_AUX8_ARB 0x208F
|
|
||||||
#define WGL_AUX9_ARB 0x2090
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_ARB_pixel_format_float
|
|
||||||
#define WGL_TYPE_RGBA_FLOAT_ARB 0x21A0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_ARB_framebuffer_sRGB
|
|
||||||
#define WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20A9
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_ARB_create_context
|
|
||||||
#define WGL_CONTEXT_DEBUG_BIT_ARB 0x00000001
|
|
||||||
#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002
|
|
||||||
#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091
|
|
||||||
#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092
|
|
||||||
#define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093
|
|
||||||
#define WGL_CONTEXT_FLAGS_ARB 0x2094
|
|
||||||
#define ERROR_INVALID_VERSION_ARB 0x2095
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_ARB_create_context_profile
|
|
||||||
#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126
|
|
||||||
#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
|
|
||||||
#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
|
|
||||||
#define ERROR_INVALID_PROFILE_ARB 0x2096
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_ARB_create_context_robustness
|
|
||||||
#define WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004
|
|
||||||
#define WGL_LOSE_CONTEXT_ON_RESET_ARB 0x8252
|
|
||||||
#define WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
|
|
||||||
#define WGL_NO_RESET_NOTIFICATION_ARB 0x8261
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_EXT_make_current_read
|
|
||||||
#define ERROR_INVALID_PIXEL_TYPE_EXT 0x2043
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_EXT_pixel_format
|
|
||||||
#define WGL_NUMBER_PIXEL_FORMATS_EXT 0x2000
|
|
||||||
#define WGL_DRAW_TO_WINDOW_EXT 0x2001
|
|
||||||
#define WGL_DRAW_TO_BITMAP_EXT 0x2002
|
|
||||||
#define WGL_ACCELERATION_EXT 0x2003
|
|
||||||
#define WGL_NEED_PALETTE_EXT 0x2004
|
|
||||||
#define WGL_NEED_SYSTEM_PALETTE_EXT 0x2005
|
|
||||||
#define WGL_SWAP_LAYER_BUFFERS_EXT 0x2006
|
|
||||||
#define WGL_SWAP_METHOD_EXT 0x2007
|
|
||||||
#define WGL_NUMBER_OVERLAYS_EXT 0x2008
|
|
||||||
#define WGL_NUMBER_UNDERLAYS_EXT 0x2009
|
|
||||||
#define WGL_TRANSPARENT_EXT 0x200A
|
|
||||||
#define WGL_TRANSPARENT_VALUE_EXT 0x200B
|
|
||||||
#define WGL_SHARE_DEPTH_EXT 0x200C
|
|
||||||
#define WGL_SHARE_STENCIL_EXT 0x200D
|
|
||||||
#define WGL_SHARE_ACCUM_EXT 0x200E
|
|
||||||
#define WGL_SUPPORT_GDI_EXT 0x200F
|
|
||||||
#define WGL_SUPPORT_OPENGL_EXT 0x2010
|
|
||||||
#define WGL_DOUBLE_BUFFER_EXT 0x2011
|
|
||||||
#define WGL_STEREO_EXT 0x2012
|
|
||||||
#define WGL_PIXEL_TYPE_EXT 0x2013
|
|
||||||
#define WGL_COLOR_BITS_EXT 0x2014
|
|
||||||
#define WGL_RED_BITS_EXT 0x2015
|
|
||||||
#define WGL_RED_SHIFT_EXT 0x2016
|
|
||||||
#define WGL_GREEN_BITS_EXT 0x2017
|
|
||||||
#define WGL_GREEN_SHIFT_EXT 0x2018
|
|
||||||
#define WGL_BLUE_BITS_EXT 0x2019
|
|
||||||
#define WGL_BLUE_SHIFT_EXT 0x201A
|
|
||||||
#define WGL_ALPHA_BITS_EXT 0x201B
|
|
||||||
#define WGL_ALPHA_SHIFT_EXT 0x201C
|
|
||||||
#define WGL_ACCUM_BITS_EXT 0x201D
|
|
||||||
#define WGL_ACCUM_RED_BITS_EXT 0x201E
|
|
||||||
#define WGL_ACCUM_GREEN_BITS_EXT 0x201F
|
|
||||||
#define WGL_ACCUM_BLUE_BITS_EXT 0x2020
|
|
||||||
#define WGL_ACCUM_ALPHA_BITS_EXT 0x2021
|
|
||||||
#define WGL_DEPTH_BITS_EXT 0x2022
|
|
||||||
#define WGL_STENCIL_BITS_EXT 0x2023
|
|
||||||
#define WGL_AUX_BUFFERS_EXT 0x2024
|
|
||||||
#define WGL_NO_ACCELERATION_EXT 0x2025
|
|
||||||
#define WGL_GENERIC_ACCELERATION_EXT 0x2026
|
|
||||||
#define WGL_FULL_ACCELERATION_EXT 0x2027
|
|
||||||
#define WGL_SWAP_EXCHANGE_EXT 0x2028
|
|
||||||
#define WGL_SWAP_COPY_EXT 0x2029
|
|
||||||
#define WGL_SWAP_UNDEFINED_EXT 0x202A
|
|
||||||
#define WGL_TYPE_RGBA_EXT 0x202B
|
|
||||||
#define WGL_TYPE_COLORINDEX_EXT 0x202C
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_EXT_pbuffer
|
|
||||||
#define WGL_DRAW_TO_PBUFFER_EXT 0x202D
|
|
||||||
#define WGL_MAX_PBUFFER_PIXELS_EXT 0x202E
|
|
||||||
#define WGL_MAX_PBUFFER_WIDTH_EXT 0x202F
|
|
||||||
#define WGL_MAX_PBUFFER_HEIGHT_EXT 0x2030
|
|
||||||
#define WGL_OPTIMAL_PBUFFER_WIDTH_EXT 0x2031
|
|
||||||
#define WGL_OPTIMAL_PBUFFER_HEIGHT_EXT 0x2032
|
|
||||||
#define WGL_PBUFFER_LARGEST_EXT 0x2033
|
|
||||||
#define WGL_PBUFFER_WIDTH_EXT 0x2034
|
|
||||||
#define WGL_PBUFFER_HEIGHT_EXT 0x2035
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_EXT_depth_float
|
|
||||||
#define WGL_DEPTH_FLOAT_EXT 0x2040
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_3DFX_multisample
|
|
||||||
#define WGL_SAMPLE_BUFFERS_3DFX 0x2060
|
|
||||||
#define WGL_SAMPLES_3DFX 0x2061
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_EXT_multisample
|
|
||||||
#define WGL_SAMPLE_BUFFERS_EXT 0x2041
|
|
||||||
#define WGL_SAMPLES_EXT 0x2042
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_I3D_digital_video_control
|
|
||||||
#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D 0x2050
|
|
||||||
#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D 0x2051
|
|
||||||
#define WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D 0x2052
|
|
||||||
#define WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D 0x2053
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_I3D_gamma
|
|
||||||
#define WGL_GAMMA_TABLE_SIZE_I3D 0x204E
|
|
||||||
#define WGL_GAMMA_EXCLUDE_DESKTOP_I3D 0x204F
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_I3D_genlock
|
|
||||||
#define WGL_GENLOCK_SOURCE_MULTIVIEW_I3D 0x2044
|
|
||||||
#define WGL_GENLOCK_SOURCE_EXTENAL_SYNC_I3D 0x2045
|
|
||||||
#define WGL_GENLOCK_SOURCE_EXTENAL_FIELD_I3D 0x2046
|
|
||||||
#define WGL_GENLOCK_SOURCE_EXTENAL_TTL_I3D 0x2047
|
|
||||||
#define WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D 0x2048
|
|
||||||
#define WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D 0x2049
|
|
||||||
#define WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D 0x204A
|
|
||||||
#define WGL_GENLOCK_SOURCE_EDGE_RISING_I3D 0x204B
|
|
||||||
#define WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D 0x204C
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_I3D_image_buffer
|
|
||||||
#define WGL_IMAGE_BUFFER_MIN_ACCESS_I3D 0x00000001
|
|
||||||
#define WGL_IMAGE_BUFFER_LOCK_I3D 0x00000002
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_I3D_swap_frame_lock
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_NV_render_depth_texture
|
|
||||||
#define WGL_BIND_TO_TEXTURE_DEPTH_NV 0x20A3
|
|
||||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV 0x20A4
|
|
||||||
#define WGL_DEPTH_TEXTURE_FORMAT_NV 0x20A5
|
|
||||||
#define WGL_TEXTURE_DEPTH_COMPONENT_NV 0x20A6
|
|
||||||
#define WGL_DEPTH_COMPONENT_NV 0x20A7
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_NV_render_texture_rectangle
|
|
||||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV 0x20A0
|
|
||||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV 0x20A1
|
|
||||||
#define WGL_TEXTURE_RECTANGLE_NV 0x20A2
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_ATI_pixel_format_float
|
|
||||||
#define WGL_TYPE_RGBA_FLOAT_ATI 0x21A0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_NV_float_buffer
|
|
||||||
#define WGL_FLOAT_COMPONENTS_NV 0x20B0
|
|
||||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 0x20B1
|
|
||||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 0x20B2
|
|
||||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 0x20B3
|
|
||||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 0x20B4
|
|
||||||
#define WGL_TEXTURE_FLOAT_R_NV 0x20B5
|
|
||||||
#define WGL_TEXTURE_FLOAT_RG_NV 0x20B6
|
|
||||||
#define WGL_TEXTURE_FLOAT_RGB_NV 0x20B7
|
|
||||||
#define WGL_TEXTURE_FLOAT_RGBA_NV 0x20B8
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_3DL_stereo_control
|
|
||||||
#define WGL_STEREO_EMITTER_ENABLE_3DL 0x2055
|
|
||||||
#define WGL_STEREO_EMITTER_DISABLE_3DL 0x2056
|
|
||||||
#define WGL_STEREO_POLARITY_NORMAL_3DL 0x2057
|
|
||||||
#define WGL_STEREO_POLARITY_INVERT_3DL 0x2058
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_EXT_pixel_format_packed_float
|
|
||||||
#define WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT 0x20A8
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_EXT_framebuffer_sRGB
|
|
||||||
#define WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20A9
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_NV_present_video
|
|
||||||
#define WGL_NUM_VIDEO_SLOTS_NV 0x20F0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_NV_video_out
|
|
||||||
#define WGL_BIND_TO_VIDEO_RGB_NV 0x20C0
|
|
||||||
#define WGL_BIND_TO_VIDEO_RGBA_NV 0x20C1
|
|
||||||
#define WGL_BIND_TO_VIDEO_RGB_AND_DEPTH_NV 0x20C2
|
|
||||||
#define WGL_VIDEO_OUT_COLOR_NV 0x20C3
|
|
||||||
#define WGL_VIDEO_OUT_ALPHA_NV 0x20C4
|
|
||||||
#define WGL_VIDEO_OUT_DEPTH_NV 0x20C5
|
|
||||||
#define WGL_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6
|
|
||||||
#define WGL_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7
|
|
||||||
#define WGL_VIDEO_OUT_FRAME 0x20C8
|
|
||||||
#define WGL_VIDEO_OUT_FIELD_1 0x20C9
|
|
||||||
#define WGL_VIDEO_OUT_FIELD_2 0x20CA
|
|
||||||
#define WGL_VIDEO_OUT_STACKED_FIELDS_1_2 0x20CB
|
|
||||||
#define WGL_VIDEO_OUT_STACKED_FIELDS_2_1 0x20CC
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_NV_swap_group
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_NV_gpu_affinity
|
|
||||||
#define WGL_ERROR_INCOMPATIBLE_AFFINITY_MASKS_NV 0x20D0
|
|
||||||
#define WGL_ERROR_MISSING_AFFINITY_MASK_NV 0x20D1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_AMD_gpu_association
|
|
||||||
#define WGL_GPU_VENDOR_AMD 0x1F00
|
|
||||||
#define WGL_GPU_RENDERER_STRING_AMD 0x1F01
|
|
||||||
#define WGL_GPU_OPENGL_VERSION_STRING_AMD 0x1F02
|
|
||||||
#define WGL_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2
|
|
||||||
#define WGL_GPU_RAM_AMD 0x21A3
|
|
||||||
#define WGL_GPU_CLOCK_AMD 0x21A4
|
|
||||||
#define WGL_GPU_NUM_PIPES_AMD 0x21A5
|
|
||||||
#define WGL_GPU_NUM_SIMD_AMD 0x21A6
|
|
||||||
#define WGL_GPU_NUM_RB_AMD 0x21A7
|
|
||||||
#define WGL_GPU_NUM_SPI_AMD 0x21A8
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_NV_video_capture
|
|
||||||
#define WGL_UNIQUE_ID_NV 0x20CE
|
|
||||||
#define WGL_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_NV_copy_image
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_NV_multisample_coverage
|
|
||||||
#define WGL_COVERAGE_SAMPLES_NV 0x2042
|
|
||||||
#define WGL_COLOR_SAMPLES_NV 0x20B9
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_EXT_create_context_es2_profile
|
|
||||||
#define WGL_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_NV_DX_interop
|
|
||||||
#define WGL_ACCESS_READ_ONLY_NV 0x00000000
|
|
||||||
#define WGL_ACCESS_READ_WRITE_NV 0x00000001
|
|
||||||
#define WGL_ACCESS_WRITE_DISCARD_NV 0x00000002
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_NV_DX_interop2
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_EXT_swap_control_tear
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************/
|
|
||||||
|
|
||||||
#ifndef WGL_ARB_pbuffer
|
|
||||||
DECLARE_HANDLE(HPBUFFERARB);
|
|
||||||
#endif
|
|
||||||
#ifndef WGL_EXT_pbuffer
|
|
||||||
DECLARE_HANDLE(HPBUFFEREXT);
|
|
||||||
#endif
|
|
||||||
#ifndef WGL_NV_present_video
|
|
||||||
DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV);
|
|
||||||
#endif
|
|
||||||
#ifndef WGL_NV_video_output
|
|
||||||
DECLARE_HANDLE(HPVIDEODEV);
|
|
||||||
#endif
|
|
||||||
#ifndef WGL_NV_gpu_affinity
|
|
||||||
DECLARE_HANDLE(HPGPUNV);
|
|
||||||
DECLARE_HANDLE(HGPUNV);
|
|
||||||
|
|
||||||
typedef struct _GPU_DEVICE {
|
|
||||||
DWORD cb;
|
|
||||||
CHAR DeviceName[32];
|
|
||||||
CHAR DeviceString[128];
|
|
||||||
DWORD Flags;
|
|
||||||
RECT rcVirtualScreen;
|
|
||||||
} GPU_DEVICE, *PGPU_DEVICE;
|
|
||||||
#endif
|
|
||||||
#ifndef WGL_NV_video_capture
|
|
||||||
DECLARE_HANDLE(HVIDEOINPUTDEVICENV);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_ARB_buffer_region
|
|
||||||
#define WGL_ARB_buffer_region 1
|
|
||||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
|
||||||
extern HANDLE WINAPI wglCreateBufferRegionARB (HDC hDC, int iLayerPlane, UINT uType);
|
|
||||||
extern VOID WINAPI wglDeleteBufferRegionARB (HANDLE hRegion);
|
|
||||||
extern BOOL WINAPI wglSaveBufferRegionARB (HANDLE hRegion, int x, int y, int width, int height);
|
|
||||||
extern BOOL WINAPI wglRestoreBufferRegionARB (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc);
|
|
||||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
|
||||||
typedef HANDLE (WINAPI * PFNWGLCREATEBUFFERREGIONARBPROC) (HDC hDC, int iLayerPlane, UINT uType);
|
|
||||||
typedef VOID (WINAPI * PFNWGLDELETEBUFFERREGIONARBPROC) (HANDLE hRegion);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLSAVEBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLRESTOREBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_ARB_multisample
|
|
||||||
#define WGL_ARB_multisample 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_ARB_extensions_string
|
|
||||||
#define WGL_ARB_extensions_string 1
|
|
||||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
|
||||||
extern const char * WINAPI wglGetExtensionsStringARB (HDC hdc);
|
|
||||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
|
||||||
typedef const char * (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC) (HDC hdc);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_ARB_pixel_format
|
|
||||||
#define WGL_ARB_pixel_format 1
|
|
||||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
|
||||||
extern BOOL WINAPI wglGetPixelFormatAttribivARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues);
|
|
||||||
extern BOOL WINAPI wglGetPixelFormatAttribfvARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues);
|
|
||||||
extern BOOL WINAPI wglChoosePixelFormatARB (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
|
|
||||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
|
||||||
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATARBPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_ARB_make_current_read
|
|
||||||
#define WGL_ARB_make_current_read 1
|
|
||||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
|
||||||
extern BOOL WINAPI wglMakeContextCurrentARB (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
|
|
||||||
extern HDC WINAPI wglGetCurrentReadDCARB (void);
|
|
||||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
|
||||||
typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTARBPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
|
|
||||||
typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCARBPROC) (void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_ARB_pbuffer
|
|
||||||
#define WGL_ARB_pbuffer 1
|
|
||||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
|
||||||
extern HPBUFFERARB WINAPI wglCreatePbufferARB (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
|
|
||||||
extern HDC WINAPI wglGetPbufferDCARB (HPBUFFERARB hPbuffer);
|
|
||||||
extern int WINAPI wglReleasePbufferDCARB (HPBUFFERARB hPbuffer, HDC hDC);
|
|
||||||
extern BOOL WINAPI wglDestroyPbufferARB (HPBUFFERARB hPbuffer);
|
|
||||||
extern BOOL WINAPI wglQueryPbufferARB (HPBUFFERARB hPbuffer, int iAttribute, int *piValue);
|
|
||||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
|
||||||
typedef HPBUFFERARB (WINAPI * PFNWGLCREATEPBUFFERARBPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
|
|
||||||
typedef HDC (WINAPI * PFNWGLGETPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer);
|
|
||||||
typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer, HDC hDC);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFERARBPROC) (HPBUFFERARB hPbuffer);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLQUERYPBUFFERARBPROC) (HPBUFFERARB hPbuffer, int iAttribute, int *piValue);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_ARB_render_texture
|
|
||||||
#define WGL_ARB_render_texture 1
|
|
||||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
|
||||||
extern BOOL WINAPI wglBindTexImageARB (HPBUFFERARB hPbuffer, int iBuffer);
|
|
||||||
extern BOOL WINAPI wglReleaseTexImageARB (HPBUFFERARB hPbuffer, int iBuffer);
|
|
||||||
extern BOOL WINAPI wglSetPbufferAttribARB (HPBUFFERARB hPbuffer, const int *piAttribList);
|
|
||||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
|
||||||
typedef BOOL (WINAPI * PFNWGLBINDTEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLRELEASETEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, const int *piAttribList);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_ARB_pixel_format_float
|
|
||||||
#define WGL_ARB_pixel_format_float 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_ARB_framebuffer_sRGB
|
|
||||||
#define WGL_ARB_framebuffer_sRGB 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_ARB_create_context
|
|
||||||
#define WGL_ARB_create_context 1
|
|
||||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
|
||||||
extern HGLRC WINAPI wglCreateContextAttribsARB (HDC hDC, HGLRC hShareContext, const int *attribList);
|
|
||||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
|
||||||
typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShareContext, const int *attribList);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_ARB_create_context_profile
|
|
||||||
#define WGL_ARB_create_context_profile 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_ARB_create_context_robustness
|
|
||||||
#define WGL_ARB_create_context_robustness 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_EXT_display_color_table
|
|
||||||
#define WGL_EXT_display_color_table 1
|
|
||||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
|
||||||
extern GLboolean WINAPI wglCreateDisplayColorTableEXT (GLushort id);
|
|
||||||
extern GLboolean WINAPI wglLoadDisplayColorTableEXT (const GLushort *table, GLuint length);
|
|
||||||
extern GLboolean WINAPI wglBindDisplayColorTableEXT (GLushort id);
|
|
||||||
extern VOID WINAPI wglDestroyDisplayColorTableEXT (GLushort id);
|
|
||||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
|
||||||
typedef GLboolean (WINAPI * PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC) (GLushort id);
|
|
||||||
typedef GLboolean (WINAPI * PFNWGLLOADDISPLAYCOLORTABLEEXTPROC) (const GLushort *table, GLuint length);
|
|
||||||
typedef GLboolean (WINAPI * PFNWGLBINDDISPLAYCOLORTABLEEXTPROC) (GLushort id);
|
|
||||||
typedef VOID (WINAPI * PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC) (GLushort id);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_EXT_extensions_string
|
|
||||||
#define WGL_EXT_extensions_string 1
|
|
||||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
|
||||||
extern const char * WINAPI wglGetExtensionsStringEXT (void);
|
|
||||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
|
||||||
typedef const char * (WINAPI * PFNWGLGETEXTENSIONSSTRINGEXTPROC) (void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_EXT_make_current_read
|
|
||||||
#define WGL_EXT_make_current_read 1
|
|
||||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
|
||||||
extern BOOL WINAPI wglMakeContextCurrentEXT (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
|
|
||||||
extern HDC WINAPI wglGetCurrentReadDCEXT (void);
|
|
||||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
|
||||||
typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTEXTPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
|
|
||||||
typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCEXTPROC) (void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_EXT_pbuffer
|
|
||||||
#define WGL_EXT_pbuffer 1
|
|
||||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
|
||||||
extern HPBUFFEREXT WINAPI wglCreatePbufferEXT (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
|
|
||||||
extern HDC WINAPI wglGetPbufferDCEXT (HPBUFFEREXT hPbuffer);
|
|
||||||
extern int WINAPI wglReleasePbufferDCEXT (HPBUFFEREXT hPbuffer, HDC hDC);
|
|
||||||
extern BOOL WINAPI wglDestroyPbufferEXT (HPBUFFEREXT hPbuffer);
|
|
||||||
extern BOOL WINAPI wglQueryPbufferEXT (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue);
|
|
||||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
|
||||||
typedef HPBUFFEREXT (WINAPI * PFNWGLCREATEPBUFFEREXTPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
|
|
||||||
typedef HDC (WINAPI * PFNWGLGETPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer);
|
|
||||||
typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer, HDC hDC);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLQUERYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_EXT_pixel_format
|
|
||||||
#define WGL_EXT_pixel_format 1
|
|
||||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
|
||||||
extern BOOL WINAPI wglGetPixelFormatAttribivEXT (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues);
|
|
||||||
extern BOOL WINAPI wglGetPixelFormatAttribfvEXT (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues);
|
|
||||||
extern BOOL WINAPI wglChoosePixelFormatEXT (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
|
|
||||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
|
||||||
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATEXTPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_EXT_swap_control
|
|
||||||
#define WGL_EXT_swap_control 1
|
|
||||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
|
||||||
extern BOOL WINAPI wglSwapIntervalEXT (int interval);
|
|
||||||
extern int WINAPI wglGetSwapIntervalEXT (void);
|
|
||||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
|
||||||
typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval);
|
|
||||||
typedef int (WINAPI * PFNWGLGETSWAPINTERVALEXTPROC) (void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_EXT_depth_float
|
|
||||||
#define WGL_EXT_depth_float 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_NV_vertex_array_range
|
|
||||||
#define WGL_NV_vertex_array_range 1
|
|
||||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
|
||||||
extern void* WINAPI wglAllocateMemoryNV (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
|
|
||||||
extern void WINAPI wglFreeMemoryNV (void *pointer);
|
|
||||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
|
||||||
typedef void* (WINAPI * PFNWGLALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
|
|
||||||
typedef void (WINAPI * PFNWGLFREEMEMORYNVPROC) (void *pointer);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_3DFX_multisample
|
|
||||||
#define WGL_3DFX_multisample 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_EXT_multisample
|
|
||||||
#define WGL_EXT_multisample 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_OML_sync_control
|
|
||||||
#define WGL_OML_sync_control 1
|
|
||||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
|
||||||
extern BOOL WINAPI wglGetSyncValuesOML (HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc);
|
|
||||||
extern BOOL WINAPI wglGetMscRateOML (HDC hdc, INT32 *numerator, INT32 *denominator);
|
|
||||||
extern INT64 WINAPI wglSwapBuffersMscOML (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder);
|
|
||||||
extern INT64 WINAPI wglSwapLayerBuffersMscOML (HDC hdc, int fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder);
|
|
||||||
extern BOOL WINAPI wglWaitForMscOML (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc);
|
|
||||||
extern BOOL WINAPI wglWaitForSbcOML (HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc);
|
|
||||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
|
||||||
typedef BOOL (WINAPI * PFNWGLGETSYNCVALUESOMLPROC) (HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLGETMSCRATEOMLPROC) (HDC hdc, INT32 *numerator, INT32 *denominator);
|
|
||||||
typedef INT64 (WINAPI * PFNWGLSWAPBUFFERSMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder);
|
|
||||||
typedef INT64 (WINAPI * PFNWGLSWAPLAYERBUFFERSMSCOMLPROC) (HDC hdc, int fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLWAITFORMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLWAITFORSBCOMLPROC) (HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_I3D_digital_video_control
|
|
||||||
#define WGL_I3D_digital_video_control 1
|
|
||||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
|
||||||
extern BOOL WINAPI wglGetDigitalVideoParametersI3D (HDC hDC, int iAttribute, int *piValue);
|
|
||||||
extern BOOL WINAPI wglSetDigitalVideoParametersI3D (HDC hDC, int iAttribute, const int *piValue);
|
|
||||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
|
||||||
typedef BOOL (WINAPI * PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_I3D_gamma
|
|
||||||
#define WGL_I3D_gamma 1
|
|
||||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
|
||||||
extern BOOL WINAPI wglGetGammaTableParametersI3D (HDC hDC, int iAttribute, int *piValue);
|
|
||||||
extern BOOL WINAPI wglSetGammaTableParametersI3D (HDC hDC, int iAttribute, const int *piValue);
|
|
||||||
extern BOOL WINAPI wglGetGammaTableI3D (HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen, USHORT *puBlue);
|
|
||||||
extern BOOL WINAPI wglSetGammaTableI3D (HDC hDC, int iEntries, const USHORT *puRed, const USHORT *puGreen, const USHORT *puBlue);
|
|
||||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
|
||||||
typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen, USHORT *puBlue);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, const USHORT *puRed, const USHORT *puGreen, const USHORT *puBlue);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_I3D_genlock
|
|
||||||
#define WGL_I3D_genlock 1
|
|
||||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
|
||||||
extern BOOL WINAPI wglEnableGenlockI3D (HDC hDC);
|
|
||||||
extern BOOL WINAPI wglDisableGenlockI3D (HDC hDC);
|
|
||||||
extern BOOL WINAPI wglIsEnabledGenlockI3D (HDC hDC, BOOL *pFlag);
|
|
||||||
extern BOOL WINAPI wglGenlockSourceI3D (HDC hDC, UINT uSource);
|
|
||||||
extern BOOL WINAPI wglGetGenlockSourceI3D (HDC hDC, UINT *uSource);
|
|
||||||
extern BOOL WINAPI wglGenlockSourceEdgeI3D (HDC hDC, UINT uEdge);
|
|
||||||
extern BOOL WINAPI wglGetGenlockSourceEdgeI3D (HDC hDC, UINT *uEdge);
|
|
||||||
extern BOOL WINAPI wglGenlockSampleRateI3D (HDC hDC, UINT uRate);
|
|
||||||
extern BOOL WINAPI wglGetGenlockSampleRateI3D (HDC hDC, UINT *uRate);
|
|
||||||
extern BOOL WINAPI wglGenlockSourceDelayI3D (HDC hDC, UINT uDelay);
|
|
||||||
extern BOOL WINAPI wglGetGenlockSourceDelayI3D (HDC hDC, UINT *uDelay);
|
|
||||||
extern BOOL WINAPI wglQueryGenlockMaxSourceDelayI3D (HDC hDC, UINT *uMaxLineDelay, UINT *uMaxPixelDelay);
|
|
||||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
|
||||||
typedef BOOL (WINAPI * PFNWGLENABLEGENLOCKI3DPROC) (HDC hDC);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLDISABLEGENLOCKI3DPROC) (HDC hDC);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLISENABLEDGENLOCKI3DPROC) (HDC hDC, BOOL *pFlag);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEI3DPROC) (HDC hDC, UINT uSource);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEI3DPROC) (HDC hDC, UINT *uSource);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT uEdge);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT *uEdge);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT uRate);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLGETGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT *uRate);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT uDelay);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT *uDelay);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC) (HDC hDC, UINT *uMaxLineDelay, UINT *uMaxPixelDelay);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_I3D_image_buffer
|
|
||||||
#define WGL_I3D_image_buffer 1
|
|
||||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
|
||||||
extern LPVOID WINAPI wglCreateImageBufferI3D (HDC hDC, DWORD dwSize, UINT uFlags);
|
|
||||||
extern BOOL WINAPI wglDestroyImageBufferI3D (HDC hDC, LPVOID pAddress);
|
|
||||||
extern BOOL WINAPI wglAssociateImageBufferEventsI3D (HDC hDC, const HANDLE *pEvent, const LPVOID *pAddress, const DWORD *pSize, UINT count);
|
|
||||||
extern BOOL WINAPI wglReleaseImageBufferEventsI3D (HDC hDC, const LPVOID *pAddress, UINT count);
|
|
||||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
|
||||||
typedef LPVOID (WINAPI * PFNWGLCREATEIMAGEBUFFERI3DPROC) (HDC hDC, DWORD dwSize, UINT uFlags);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLDESTROYIMAGEBUFFERI3DPROC) (HDC hDC, LPVOID pAddress);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const HANDLE *pEvent, const LPVOID *pAddress, const DWORD *pSize, UINT count);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const LPVOID *pAddress, UINT count);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_I3D_swap_frame_lock
|
|
||||||
#define WGL_I3D_swap_frame_lock 1
|
|
||||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
|
||||||
extern BOOL WINAPI wglEnableFrameLockI3D (void);
|
|
||||||
extern BOOL WINAPI wglDisableFrameLockI3D (void);
|
|
||||||
extern BOOL WINAPI wglIsEnabledFrameLockI3D (BOOL *pFlag);
|
|
||||||
extern BOOL WINAPI wglQueryFrameLockMasterI3D (BOOL *pFlag);
|
|
||||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
|
||||||
typedef BOOL (WINAPI * PFNWGLENABLEFRAMELOCKI3DPROC) (void);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLDISABLEFRAMELOCKI3DPROC) (void);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLISENABLEDFRAMELOCKI3DPROC) (BOOL *pFlag);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLQUERYFRAMELOCKMASTERI3DPROC) (BOOL *pFlag);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_I3D_swap_frame_usage
|
|
||||||
#define WGL_I3D_swap_frame_usage 1
|
|
||||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
|
||||||
extern BOOL WINAPI wglGetFrameUsageI3D (float *pUsage);
|
|
||||||
extern BOOL WINAPI wglBeginFrameTrackingI3D (void);
|
|
||||||
extern BOOL WINAPI wglEndFrameTrackingI3D (void);
|
|
||||||
extern BOOL WINAPI wglQueryFrameTrackingI3D (DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage);
|
|
||||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
|
||||||
typedef BOOL (WINAPI * PFNWGLGETFRAMEUSAGEI3DPROC) (float *pUsage);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLBEGINFRAMETRACKINGI3DPROC) (void);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLENDFRAMETRACKINGI3DPROC) (void);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLQUERYFRAMETRACKINGI3DPROC) (DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_ATI_pixel_format_float
|
|
||||||
#define WGL_ATI_pixel_format_float 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_NV_float_buffer
|
|
||||||
#define WGL_NV_float_buffer 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_3DL_stereo_control
|
|
||||||
#define WGL_3DL_stereo_control 1
|
|
||||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
|
||||||
extern BOOL WINAPI wglSetStereoEmitterState3DL (HDC hDC, UINT uState);
|
|
||||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
|
||||||
typedef BOOL (WINAPI * PFNWGLSETSTEREOEMITTERSTATE3DLPROC) (HDC hDC, UINT uState);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_EXT_pixel_format_packed_float
|
|
||||||
#define WGL_EXT_pixel_format_packed_float 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_EXT_framebuffer_sRGB
|
|
||||||
#define WGL_EXT_framebuffer_sRGB 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_NV_present_video
|
|
||||||
#define WGL_NV_present_video 1
|
|
||||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
|
||||||
extern int WINAPI wglEnumerateVideoDevicesNV (HDC hDC, HVIDEOOUTPUTDEVICENV *phDeviceList);
|
|
||||||
extern BOOL WINAPI wglBindVideoDeviceNV (HDC hDC, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList);
|
|
||||||
extern BOOL WINAPI wglQueryCurrentContextNV (int iAttribute, int *piValue);
|
|
||||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
|
||||||
typedef int (WINAPI * PFNWGLENUMERATEVIDEODEVICESNVPROC) (HDC hDC, HVIDEOOUTPUTDEVICENV *phDeviceList);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLBINDVIDEODEVICENVPROC) (HDC hDC, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLQUERYCURRENTCONTEXTNVPROC) (int iAttribute, int *piValue);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_NV_video_output
|
|
||||||
#define WGL_NV_video_output 1
|
|
||||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
|
||||||
extern BOOL WINAPI wglGetVideoDeviceNV (HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice);
|
|
||||||
extern BOOL WINAPI wglReleaseVideoDeviceNV (HPVIDEODEV hVideoDevice);
|
|
||||||
extern BOOL WINAPI wglBindVideoImageNV (HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer);
|
|
||||||
extern BOOL WINAPI wglReleaseVideoImageNV (HPBUFFERARB hPbuffer, int iVideoBuffer);
|
|
||||||
extern BOOL WINAPI wglSendPbufferToVideoNV (HPBUFFERARB hPbuffer, int iBufferType, unsigned long *pulCounterPbuffer, BOOL bBlock);
|
|
||||||
extern BOOL WINAPI wglGetVideoInfoNV (HPVIDEODEV hpVideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo);
|
|
||||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
|
||||||
typedef BOOL (WINAPI * PFNWGLGETVIDEODEVICENVPROC) (HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLRELEASEVIDEODEVICENVPROC) (HPVIDEODEV hVideoDevice);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLBINDVIDEOIMAGENVPROC) (HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOIMAGENVPROC) (HPBUFFERARB hPbuffer, int iVideoBuffer);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLSENDPBUFFERTOVIDEONVPROC) (HPBUFFERARB hPbuffer, int iBufferType, unsigned long *pulCounterPbuffer, BOOL bBlock);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLGETVIDEOINFONVPROC) (HPVIDEODEV hpVideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_NV_swap_group
|
|
||||||
#define WGL_NV_swap_group 1
|
|
||||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
|
||||||
extern BOOL WINAPI wglJoinSwapGroupNV (HDC hDC, GLuint group);
|
|
||||||
extern BOOL WINAPI wglBindSwapBarrierNV (GLuint group, GLuint barrier);
|
|
||||||
extern BOOL WINAPI wglQuerySwapGroupNV (HDC hDC, GLuint *group, GLuint *barrier);
|
|
||||||
extern BOOL WINAPI wglQueryMaxSwapGroupsNV (HDC hDC, GLuint *maxGroups, GLuint *maxBarriers);
|
|
||||||
extern BOOL WINAPI wglQueryFrameCountNV (HDC hDC, GLuint *count);
|
|
||||||
extern BOOL WINAPI wglResetFrameCountNV (HDC hDC);
|
|
||||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
|
||||||
typedef BOOL (WINAPI * PFNWGLJOINSWAPGROUPNVPROC) (HDC hDC, GLuint group);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLBINDSWAPBARRIERNVPROC) (GLuint group, GLuint barrier);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLQUERYSWAPGROUPNVPROC) (HDC hDC, GLuint *group, GLuint *barrier);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLQUERYMAXSWAPGROUPSNVPROC) (HDC hDC, GLuint *maxGroups, GLuint *maxBarriers);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLQUERYFRAMECOUNTNVPROC) (HDC hDC, GLuint *count);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLRESETFRAMECOUNTNVPROC) (HDC hDC);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_NV_gpu_affinity
|
|
||||||
#define WGL_NV_gpu_affinity 1
|
|
||||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
|
||||||
extern BOOL WINAPI wglEnumGpusNV (UINT iGpuIndex, HGPUNV *phGpu);
|
|
||||||
extern BOOL WINAPI wglEnumGpuDevicesNV (HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice);
|
|
||||||
extern HDC WINAPI wglCreateAffinityDCNV (const HGPUNV *phGpuList);
|
|
||||||
extern BOOL WINAPI wglEnumGpusFromAffinityDCNV (HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu);
|
|
||||||
extern BOOL WINAPI wglDeleteDCNV (HDC hdc);
|
|
||||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
|
||||||
typedef BOOL (WINAPI * PFNWGLENUMGPUSNVPROC) (UINT iGpuIndex, HGPUNV *phGpu);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLENUMGPUDEVICESNVPROC) (HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice);
|
|
||||||
typedef HDC (WINAPI * PFNWGLCREATEAFFINITYDCNVPROC) (const HGPUNV *phGpuList);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLENUMGPUSFROMAFFINITYDCNVPROC) (HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLDELETEDCNVPROC) (HDC hdc);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_AMD_gpu_association
|
|
||||||
#define WGL_AMD_gpu_association 1
|
|
||||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
|
||||||
extern UINT WINAPI wglGetGPUIDsAMD (UINT maxCount, UINT *ids);
|
|
||||||
extern INT WINAPI wglGetGPUInfoAMD (UINT id, int property, GLenum dataType, UINT size, void *data);
|
|
||||||
extern UINT WINAPI wglGetContextGPUIDAMD (HGLRC hglrc);
|
|
||||||
extern HGLRC WINAPI wglCreateAssociatedContextAMD (UINT id);
|
|
||||||
extern HGLRC WINAPI wglCreateAssociatedContextAttribsAMD (UINT id, HGLRC hShareContext, const int *attribList);
|
|
||||||
extern BOOL WINAPI wglDeleteAssociatedContextAMD (HGLRC hglrc);
|
|
||||||
extern BOOL WINAPI wglMakeAssociatedContextCurrentAMD (HGLRC hglrc);
|
|
||||||
extern HGLRC WINAPI wglGetCurrentAssociatedContextAMD (void);
|
|
||||||
extern VOID WINAPI wglBlitContextFramebufferAMD (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
|
||||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
|
||||||
typedef UINT (WINAPI * PFNWGLGETGPUIDSAMDPROC) (UINT maxCount, UINT *ids);
|
|
||||||
typedef INT (WINAPI * PFNWGLGETGPUINFOAMDPROC) (UINT id, int property, GLenum dataType, UINT size, void *data);
|
|
||||||
typedef UINT (WINAPI * PFNWGLGETCONTEXTGPUIDAMDPROC) (HGLRC hglrc);
|
|
||||||
typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC) (UINT id);
|
|
||||||
typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC) (UINT id, HGLRC hShareContext, const int *attribList);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC) (HGLRC hglrc);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC) (HGLRC hglrc);
|
|
||||||
typedef HGLRC (WINAPI * PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC) (void);
|
|
||||||
typedef VOID (WINAPI * PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC) (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_NV_video_capture
|
|
||||||
#define WGL_NV_video_capture 1
|
|
||||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
|
||||||
extern BOOL WINAPI wglBindVideoCaptureDeviceNV (UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice);
|
|
||||||
extern UINT WINAPI wglEnumerateVideoCaptureDevicesNV (HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList);
|
|
||||||
extern BOOL WINAPI wglLockVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
|
|
||||||
extern BOOL WINAPI wglQueryVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int *piValue);
|
|
||||||
extern BOOL WINAPI wglReleaseVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
|
|
||||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
|
||||||
typedef BOOL (WINAPI * PFNWGLBINDVIDEOCAPTUREDEVICENVPROC) (UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice);
|
|
||||||
typedef UINT (WINAPI * PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC) (HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int *piValue);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_NV_copy_image
|
|
||||||
#define WGL_NV_copy_image 1
|
|
||||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
|
||||||
extern BOOL WINAPI wglCopyImageSubDataNV (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
|
|
||||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
|
||||||
typedef BOOL (WINAPI * PFNWGLCOPYIMAGESUBDATANVPROC) (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_NV_multisample_coverage
|
|
||||||
#define WGL_NV_multisample_coverage 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_NV_DX_interop
|
|
||||||
#define WGL_NV_DX_interop 1
|
|
||||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
|
||||||
extern BOOL WINAPI wglDXSetResourceShareHandleNV (void *dxObject, HANDLE shareHandle);
|
|
||||||
extern HANDLE WINAPI wglDXOpenDeviceNV (void *dxDevice);
|
|
||||||
extern BOOL WINAPI wglDXCloseDeviceNV (HANDLE hDevice);
|
|
||||||
extern HANDLE WINAPI wglDXRegisterObjectNV (HANDLE hDevice, void *dxObject, GLuint name, GLenum type, GLenum access);
|
|
||||||
extern BOOL WINAPI wglDXUnregisterObjectNV (HANDLE hDevice, HANDLE hObject);
|
|
||||||
extern BOOL WINAPI wglDXObjectAccessNV (HANDLE hObject, GLenum access);
|
|
||||||
extern BOOL WINAPI wglDXLockObjectsNV (HANDLE hDevice, GLint count, HANDLE *hObjects);
|
|
||||||
extern BOOL WINAPI wglDXUnlockObjectsNV (HANDLE hDevice, GLint count, HANDLE *hObjects);
|
|
||||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
|
||||||
typedef BOOL (WINAPI * PFNWGLDXSETRESOURCESHAREHANDLENVPROC) (void *dxObject, HANDLE shareHandle);
|
|
||||||
typedef HANDLE (WINAPI * PFNWGLDXOPENDEVICENVPROC) (void *dxDevice);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLDXCLOSEDEVICENVPROC) (HANDLE hDevice);
|
|
||||||
typedef HANDLE (WINAPI * PFNWGLDXREGISTEROBJECTNVPROC) (HANDLE hDevice, void *dxObject, GLuint name, GLenum type, GLenum access);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLDXUNREGISTEROBJECTNVPROC) (HANDLE hDevice, HANDLE hObject);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLDXOBJECTACCESSNVPROC) (HANDLE hObject, GLenum access);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLDXLOCKOBJECTSNVPROC) (HANDLE hDevice, GLint count, HANDLE *hObjects);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLDXUNLOCKOBJECTSNVPROC) (HANDLE hDevice, GLint count, HANDLE *hObjects);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_NV_DX_interop2
|
|
||||||
#define WGL_NV_DX_interop2 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WGL_EXT_swap_control_tear
|
|
||||||
#define WGL_EXT_swap_control_tear 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -54,139 +54,139 @@ class NAZARA_API NzOpenGL
|
||||||
static void Uninitialize();
|
static void Uninitialize();
|
||||||
};
|
};
|
||||||
|
|
||||||
NAZARA_API extern PFNGLACTIVETEXTUREPROC glActiveTexture;
|
NAZARA_API extern PFNGLACTIVETEXTUREPROC glActiveTexture;
|
||||||
NAZARA_API extern PFNGLATTACHSHADERPROC glAttachShader;
|
NAZARA_API extern PFNGLATTACHSHADERPROC glAttachShader;
|
||||||
NAZARA_API extern PFNGLBEGINQUERYPROC glBeginQuery;
|
NAZARA_API extern PFNGLBEGINQUERYPROC glBeginQuery;
|
||||||
NAZARA_API extern PFNGLBINDATTRIBLOCATIONPROC glBindAttribLocation;
|
NAZARA_API extern PFNGLBINDATTRIBLOCATIONPROC glBindAttribLocation;
|
||||||
NAZARA_API extern PFNGLBINDBUFFERPROC glBindBuffer;
|
NAZARA_API extern PFNGLBINDBUFFERPROC glBindBuffer;
|
||||||
NAZARA_API extern PFNGLBINDFRAMEBUFFERPROC glBindFramebuffer;
|
NAZARA_API extern PFNGLBINDFRAMEBUFFERPROC glBindFramebuffer;
|
||||||
NAZARA_API extern PFNGLBINDRENDERBUFFERPROC glBindRenderbuffer;
|
NAZARA_API extern PFNGLBINDRENDERBUFFERPROC glBindRenderbuffer;
|
||||||
NAZARA_API extern PFNGLBINDTEXTUREPROC glBindTexture;
|
NAZARA_API extern PFNGLBINDTEXTUREPROC glBindTexture;
|
||||||
NAZARA_API extern PFNGLBINDVERTEXARRAYPROC glBindVertexArray;
|
NAZARA_API extern PFNGLBINDVERTEXARRAYPROC glBindVertexArray;
|
||||||
NAZARA_API extern PFNGLBLENDFUNCPROC glBlendFunc;
|
NAZARA_API extern PFNGLBLENDFUNCPROC glBlendFunc;
|
||||||
NAZARA_API extern PFNGLBUFFERDATAPROC glBufferData;
|
NAZARA_API extern PFNGLBUFFERDATAPROC glBufferData;
|
||||||
NAZARA_API extern PFNGLBUFFERSUBDATAPROC glBufferSubData;
|
NAZARA_API extern PFNGLBUFFERSUBDATAPROC glBufferSubData;
|
||||||
NAZARA_API extern PFNGLCLEARPROC glClear;
|
NAZARA_API extern PFNGLCLEARPROC glClear;
|
||||||
NAZARA_API extern PFNGLCLEARCOLORPROC glClearColor;
|
NAZARA_API extern PFNGLCLEARCOLORPROC glClearColor;
|
||||||
NAZARA_API extern PFNGLCLEARDEPTHPROC glClearDepth;
|
NAZARA_API extern PFNGLCLEARDEPTHPROC glClearDepth;
|
||||||
NAZARA_API extern PFNGLCLEARSTENCILPROC glClearStencil;
|
NAZARA_API extern PFNGLCLEARSTENCILPROC glClearStencil;
|
||||||
NAZARA_API extern PFNGLCREATEPROGRAMPROC glCreateProgram;
|
NAZARA_API extern PFNGLCREATEPROGRAMPROC glCreateProgram;
|
||||||
NAZARA_API extern PFNGLCREATESHADERPROC glCreateShader;
|
NAZARA_API extern PFNGLCREATESHADERPROC glCreateShader;
|
||||||
NAZARA_API extern PFNGLCHECKFRAMEBUFFERSTATUSPROC glCheckFramebufferStatus;
|
NAZARA_API extern PFNGLCHECKFRAMEBUFFERSTATUSPROC glCheckFramebufferStatus;
|
||||||
NAZARA_API extern PFNGLCOLORMASKPROC glColorMask;
|
NAZARA_API extern PFNGLCOLORMASKPROC glColorMask;
|
||||||
NAZARA_API extern PFNGLCULLFACEPROC glCullFace;
|
NAZARA_API extern PFNGLCULLFACEPROC glCullFace;
|
||||||
NAZARA_API extern PFNGLCOMPILESHADERPROC glCompileShader;
|
NAZARA_API extern PFNGLCOMPILESHADERPROC glCompileShader;
|
||||||
NAZARA_API extern PFNGLCOPYTEXSUBIMAGE2DPROC glCopyTexSubImage2D;
|
NAZARA_API extern PFNGLCOPYTEXSUBIMAGE2DPROC glCopyTexSubImage2D;
|
||||||
NAZARA_API extern PFNGLDEBUGMESSAGECONTROLARBPROC glDebugMessageControl;
|
NAZARA_API extern PFNGLDEBUGMESSAGECONTROLPROC glDebugMessageControl;
|
||||||
NAZARA_API extern PFNGLDEBUGMESSAGEINSERTARBPROC glDebugMessageInsert;
|
NAZARA_API extern PFNGLDEBUGMESSAGEINSERTPROC glDebugMessageInsert;
|
||||||
NAZARA_API extern PFNGLDEBUGMESSAGECALLBACKARBPROC glDebugMessageCallback;
|
NAZARA_API extern PFNGLDEBUGMESSAGECALLBACKPROC glDebugMessageCallback;
|
||||||
NAZARA_API extern PFNGLDELETEBUFFERSPROC glDeleteBuffers;
|
NAZARA_API extern PFNGLDELETEBUFFERSPROC glDeleteBuffers;
|
||||||
NAZARA_API extern PFNGLDELETEFRAMEBUFFERSPROC glDeleteFramebuffers;
|
NAZARA_API extern PFNGLDELETEFRAMEBUFFERSPROC glDeleteFramebuffers;
|
||||||
NAZARA_API extern PFNGLDELETEPROGRAMPROC glDeleteProgram;
|
NAZARA_API extern PFNGLDELETEPROGRAMPROC glDeleteProgram;
|
||||||
NAZARA_API extern PFNGLDELETEQUERIESPROC glDeleteQueries;
|
NAZARA_API extern PFNGLDELETEQUERIESPROC glDeleteQueries;
|
||||||
NAZARA_API extern PFNGLDELETERENDERBUFFERSPROC glDeleteRenderbuffers;
|
NAZARA_API extern PFNGLDELETERENDERBUFFERSPROC glDeleteRenderbuffers;
|
||||||
NAZARA_API extern PFNGLDELETESHADERPROC glDeleteShader;
|
NAZARA_API extern PFNGLDELETESHADERPROC glDeleteShader;
|
||||||
NAZARA_API extern PFNGLDELETETEXTURESPROC glDeleteTextures;
|
NAZARA_API extern PFNGLDELETETEXTURESPROC glDeleteTextures;
|
||||||
NAZARA_API extern PFNGLDELETEVERTEXARRAYSPROC glDeleteVertexArrays;
|
NAZARA_API extern PFNGLDELETEVERTEXARRAYSPROC glDeleteVertexArrays;
|
||||||
NAZARA_API extern PFNGLDEPTHFUNCPROC glDepthFunc;
|
NAZARA_API extern PFNGLDEPTHFUNCPROC glDepthFunc;
|
||||||
NAZARA_API extern PFNGLDEPTHMASKPROC glDepthMask;
|
NAZARA_API extern PFNGLDEPTHMASKPROC glDepthMask;
|
||||||
NAZARA_API extern PFNGLDISABLEPROC glDisable;
|
NAZARA_API extern PFNGLDISABLEPROC glDisable;
|
||||||
NAZARA_API extern PFNGLDISABLEVERTEXATTRIBARRAYPROC glDisableVertexAttribArray;
|
NAZARA_API extern PFNGLDISABLEVERTEXATTRIBARRAYPROC glDisableVertexAttribArray;
|
||||||
NAZARA_API extern PFNGLDRAWARRAYSPROC glDrawArrays;
|
NAZARA_API extern PFNGLDRAWARRAYSPROC glDrawArrays;
|
||||||
NAZARA_API extern PFNGLDRAWBUFFERPROC glDrawBuffer;
|
NAZARA_API extern PFNGLDRAWBUFFERPROC glDrawBuffer;
|
||||||
NAZARA_API extern PFNGLDRAWBUFFERSPROC glDrawBuffers;
|
NAZARA_API extern PFNGLDRAWBUFFERSPROC glDrawBuffers;
|
||||||
NAZARA_API extern PFNGLDRAWELEMENTSPROC glDrawElements;
|
NAZARA_API extern PFNGLDRAWELEMENTSPROC glDrawElements;
|
||||||
NAZARA_API extern PFNGLENDQUERYPROC glEndQuery;
|
NAZARA_API extern PFNGLENDQUERYPROC glEndQuery;
|
||||||
NAZARA_API extern PFNGLFLUSHPROC glFlush;
|
NAZARA_API extern PFNGLFLUSHPROC glFlush;
|
||||||
NAZARA_API extern PFNGLFRAMEBUFFERRENDERBUFFERPROC glFramebufferRenderbuffer;
|
NAZARA_API extern PFNGLFRAMEBUFFERRENDERBUFFERPROC glFramebufferRenderbuffer;
|
||||||
NAZARA_API extern PFNGLFRAMEBUFFERTEXTURE2DPROC glFramebufferTexture2D;
|
NAZARA_API extern PFNGLFRAMEBUFFERTEXTURE2DPROC glFramebufferTexture2D;
|
||||||
NAZARA_API extern PFNGLENABLEPROC glEnable;
|
NAZARA_API extern PFNGLENABLEPROC glEnable;
|
||||||
NAZARA_API extern PFNGLENABLEVERTEXATTRIBARRAYPROC glEnableVertexAttribArray;
|
NAZARA_API extern PFNGLENABLEVERTEXATTRIBARRAYPROC glEnableVertexAttribArray;
|
||||||
NAZARA_API extern PFNGLGENERATEMIPMAPPROC glGenerateMipmap;
|
NAZARA_API extern PFNGLGENERATEMIPMAPPROC glGenerateMipmap;
|
||||||
NAZARA_API extern PFNGLGENBUFFERSPROC glGenBuffers;
|
NAZARA_API extern PFNGLGENBUFFERSPROC glGenBuffers;
|
||||||
NAZARA_API extern PFNGLGENFRAMEBUFFERSPROC glGenFramebuffers;
|
NAZARA_API extern PFNGLGENFRAMEBUFFERSPROC glGenFramebuffers;
|
||||||
NAZARA_API extern PFNGLGENQUERIESPROC glGenQueries;
|
NAZARA_API extern PFNGLGENQUERIESPROC glGenQueries;
|
||||||
NAZARA_API extern PFNGLGENRENDERBUFFERSPROC glGenRenderbuffers;
|
NAZARA_API extern PFNGLGENRENDERBUFFERSPROC glGenRenderbuffers;
|
||||||
NAZARA_API extern PFNGLGENTEXTURESPROC glGenTextures;
|
NAZARA_API extern PFNGLGENTEXTURESPROC glGenTextures;
|
||||||
NAZARA_API extern PFNGLGENVERTEXARRAYSPROC glGenVertexArrays;
|
NAZARA_API extern PFNGLGENVERTEXARRAYSPROC glGenVertexArrays;
|
||||||
NAZARA_API extern PFNGLGETBUFFERPARAMETERIVPROC glGetBufferParameteriv;
|
NAZARA_API extern PFNGLGETBUFFERPARAMETERIVPROC glGetBufferParameteriv;
|
||||||
NAZARA_API extern PFNGLGETDEBUGMESSAGELOGARBPROC glGetDebugMessageLog;
|
NAZARA_API extern PFNGLGETDEBUGMESSAGELOGPROC glGetDebugMessageLog;
|
||||||
NAZARA_API extern PFNGLGETERRORPROC glGetError;
|
NAZARA_API extern PFNGLGETERRORPROC glGetError;
|
||||||
NAZARA_API extern PFNGLGETINTEGERVPROC glGetIntegerv;
|
NAZARA_API extern PFNGLGETINTEGERVPROC glGetIntegerv;
|
||||||
NAZARA_API extern PFNGLGETPROGRAMIVPROC glGetProgramiv;
|
NAZARA_API extern PFNGLGETPROGRAMIVPROC glGetProgramiv;
|
||||||
NAZARA_API extern PFNGLGETPROGRAMINFOLOGPROC glGetProgramInfoLog;
|
NAZARA_API extern PFNGLGETPROGRAMINFOLOGPROC glGetProgramInfoLog;
|
||||||
NAZARA_API extern PFNGLGETQUERYIVPROC glGetQueryiv;
|
NAZARA_API extern PFNGLGETQUERYIVPROC glGetQueryiv;
|
||||||
NAZARA_API extern PFNGLGETQUERYOBJECTIVPROC glGetQueryObjectiv;
|
NAZARA_API extern PFNGLGETQUERYOBJECTIVPROC glGetQueryObjectiv;
|
||||||
NAZARA_API extern PFNGLGETQUERYOBJECTUIVPROC glGetQueryObjectuiv;
|
NAZARA_API extern PFNGLGETQUERYOBJECTUIVPROC glGetQueryObjectuiv;
|
||||||
NAZARA_API extern PFNGLGETSHADERINFOLOGPROC glGetShaderInfoLog;
|
NAZARA_API extern PFNGLGETSHADERINFOLOGPROC glGetShaderInfoLog;
|
||||||
NAZARA_API extern PFNGLGETSHADERIVPROC glGetShaderiv;
|
NAZARA_API extern PFNGLGETSHADERIVPROC glGetShaderiv;
|
||||||
NAZARA_API extern PFNGLGETSHADERSOURCEPROC glGetShaderSource;
|
NAZARA_API extern PFNGLGETSHADERSOURCEPROC glGetShaderSource;
|
||||||
NAZARA_API extern PFNGLGETSTRINGPROC glGetString;
|
NAZARA_API extern PFNGLGETSTRINGPROC glGetString;
|
||||||
NAZARA_API extern PFNGLGETSTRINGIPROC glGetStringi;
|
NAZARA_API extern PFNGLGETSTRINGIPROC glGetStringi;
|
||||||
NAZARA_API extern PFNGLGETTEXIMAGEPROC glGetTexImage;
|
NAZARA_API extern PFNGLGETTEXIMAGEPROC glGetTexImage;
|
||||||
NAZARA_API extern PFNGLGETTEXLEVELPARAMETERFVPROC glGetTexLevelParameterfv;
|
NAZARA_API extern PFNGLGETTEXLEVELPARAMETERFVPROC glGetTexLevelParameterfv;
|
||||||
NAZARA_API extern PFNGLGETTEXLEVELPARAMETERIVPROC glGetTexLevelParameteriv;
|
NAZARA_API extern PFNGLGETTEXLEVELPARAMETERIVPROC glGetTexLevelParameteriv;
|
||||||
NAZARA_API extern PFNGLGETTEXPARAMETERFVPROC glGetTexParameterfv;
|
NAZARA_API extern PFNGLGETTEXPARAMETERFVPROC glGetTexParameterfv;
|
||||||
NAZARA_API extern PFNGLGETTEXPARAMETERIVPROC glGetTexParameteriv;
|
NAZARA_API extern PFNGLGETTEXPARAMETERIVPROC glGetTexParameteriv;
|
||||||
NAZARA_API extern PFNGLGETUNIFORMLOCATIONPROC glGetUniformLocation;
|
NAZARA_API extern PFNGLGETUNIFORMLOCATIONPROC glGetUniformLocation;
|
||||||
NAZARA_API extern PFNGLLINKPROGRAMPROC glLinkProgram;
|
NAZARA_API extern PFNGLLINKPROGRAMPROC glLinkProgram;
|
||||||
NAZARA_API extern PFNGLMAPBUFFERPROC glMapBuffer;
|
NAZARA_API extern PFNGLMAPBUFFERPROC glMapBuffer;
|
||||||
NAZARA_API extern PFNGLMAPBUFFERRANGEPROC glMapBufferRange;
|
NAZARA_API extern PFNGLMAPBUFFERRANGEPROC glMapBufferRange;
|
||||||
NAZARA_API extern PFNGLPIXELSTOREIPROC glPixelStorei;
|
NAZARA_API extern PFNGLPIXELSTOREIPROC glPixelStorei;
|
||||||
NAZARA_API extern PFNGLPOLYGONMODEPROC glPolygonMode;
|
NAZARA_API extern PFNGLPOLYGONMODEPROC glPolygonMode;
|
||||||
NAZARA_API extern PFNGLPROGRAMUNIFORM1DPROC glProgramUniform1d;
|
NAZARA_API extern PFNGLPROGRAMUNIFORM1DPROC glProgramUniform1d;
|
||||||
NAZARA_API extern PFNGLPROGRAMUNIFORM1FPROC glProgramUniform1f;
|
NAZARA_API extern PFNGLPROGRAMUNIFORM1FPROC glProgramUniform1f;
|
||||||
NAZARA_API extern PFNGLPROGRAMUNIFORM1IPROC glProgramUniform1i;
|
NAZARA_API extern PFNGLPROGRAMUNIFORM1IPROC glProgramUniform1i;
|
||||||
NAZARA_API extern PFNGLPROGRAMUNIFORM2DVPROC glProgramUniform2dv;
|
NAZARA_API extern PFNGLPROGRAMUNIFORM2DVPROC glProgramUniform2dv;
|
||||||
NAZARA_API extern PFNGLPROGRAMUNIFORM2FVPROC glProgramUniform2fv;
|
NAZARA_API extern PFNGLPROGRAMUNIFORM2FVPROC glProgramUniform2fv;
|
||||||
NAZARA_API extern PFNGLPROGRAMUNIFORM3DVPROC glProgramUniform3dv;
|
NAZARA_API extern PFNGLPROGRAMUNIFORM3DVPROC glProgramUniform3dv;
|
||||||
NAZARA_API extern PFNGLPROGRAMUNIFORM3FVPROC glProgramUniform3fv;
|
NAZARA_API extern PFNGLPROGRAMUNIFORM3FVPROC glProgramUniform3fv;
|
||||||
NAZARA_API extern PFNGLPROGRAMUNIFORM4DVPROC glProgramUniform4dv;
|
NAZARA_API extern PFNGLPROGRAMUNIFORM4DVPROC glProgramUniform4dv;
|
||||||
NAZARA_API extern PFNGLPROGRAMUNIFORM4FVPROC glProgramUniform4fv;
|
NAZARA_API extern PFNGLPROGRAMUNIFORM4FVPROC glProgramUniform4fv;
|
||||||
NAZARA_API extern PFNGLPROGRAMUNIFORMMATRIX4DVPROC glProgramUniformMatrix4dv;
|
NAZARA_API extern PFNGLPROGRAMUNIFORMMATRIX4DVPROC glProgramUniformMatrix4dv;
|
||||||
NAZARA_API extern PFNGLPROGRAMUNIFORMMATRIX4FVPROC glProgramUniformMatrix4fv;
|
NAZARA_API extern PFNGLPROGRAMUNIFORMMATRIX4FVPROC glProgramUniformMatrix4fv;
|
||||||
NAZARA_API extern PFNGLREADPIXELSPROC glReadPixels;
|
NAZARA_API extern PFNGLREADPIXELSPROC glReadPixels;
|
||||||
NAZARA_API extern PFNGLRENDERBUFFERSTORAGEPROC glRenderbufferStorage;
|
NAZARA_API extern PFNGLRENDERBUFFERSTORAGEPROC glRenderbufferStorage;
|
||||||
NAZARA_API extern PFNGLSCISSORPROC glScissor;
|
NAZARA_API extern PFNGLSCISSORPROC glScissor;
|
||||||
NAZARA_API extern PFNGLSHADERSOURCEPROC glShaderSource;
|
NAZARA_API extern PFNGLSHADERSOURCEPROC glShaderSource;
|
||||||
NAZARA_API extern PFNGLSTENCILFUNCPROC glStencilFunc;
|
NAZARA_API extern PFNGLSTENCILFUNCPROC glStencilFunc;
|
||||||
NAZARA_API extern PFNGLSTENCILOPPROC glStencilOp;
|
NAZARA_API extern PFNGLSTENCILOPPROC glStencilOp;
|
||||||
NAZARA_API extern PFNGLTEXIMAGE1DPROC glTexImage1D;
|
NAZARA_API extern PFNGLTEXIMAGE1DPROC glTexImage1D;
|
||||||
NAZARA_API extern PFNGLTEXIMAGE2DPROC glTexImage2D;
|
NAZARA_API extern PFNGLTEXIMAGE2DPROC glTexImage2D;
|
||||||
NAZARA_API extern PFNGLTEXIMAGE3DPROC glTexImage3D;
|
NAZARA_API extern PFNGLTEXIMAGE3DPROC glTexImage3D;
|
||||||
NAZARA_API extern PFNGLTEXPARAMETERFPROC glTexParameterf;
|
NAZARA_API extern PFNGLTEXPARAMETERFPROC glTexParameterf;
|
||||||
NAZARA_API extern PFNGLTEXPARAMETERIPROC glTexParameteri;
|
NAZARA_API extern PFNGLTEXPARAMETERIPROC glTexParameteri;
|
||||||
NAZARA_API extern PFNGLTEXSTORAGE1DPROC glTexStorage1D;
|
NAZARA_API extern PFNGLTEXSTORAGE1DPROC glTexStorage1D;
|
||||||
NAZARA_API extern PFNGLTEXSTORAGE2DPROC glTexStorage2D;
|
NAZARA_API extern PFNGLTEXSTORAGE2DPROC glTexStorage2D;
|
||||||
NAZARA_API extern PFNGLTEXSTORAGE3DPROC glTexStorage3D;
|
NAZARA_API extern PFNGLTEXSTORAGE3DPROC glTexStorage3D;
|
||||||
NAZARA_API extern PFNGLTEXSUBIMAGE1DPROC glTexSubImage1D;
|
NAZARA_API extern PFNGLTEXSUBIMAGE1DPROC glTexSubImage1D;
|
||||||
NAZARA_API extern PFNGLTEXSUBIMAGE2DPROC glTexSubImage2D;
|
NAZARA_API extern PFNGLTEXSUBIMAGE2DPROC glTexSubImage2D;
|
||||||
NAZARA_API extern PFNGLTEXSUBIMAGE3DPROC glTexSubImage3D;
|
NAZARA_API extern PFNGLTEXSUBIMAGE3DPROC glTexSubImage3D;
|
||||||
NAZARA_API extern PFNGLUNIFORM1DPROC glUniform1d;
|
NAZARA_API extern PFNGLUNIFORM1DPROC glUniform1d;
|
||||||
NAZARA_API extern PFNGLUNIFORM1FPROC glUniform1f;
|
NAZARA_API extern PFNGLUNIFORM1FPROC glUniform1f;
|
||||||
NAZARA_API extern PFNGLUNIFORM1IPROC glUniform1i;
|
NAZARA_API extern PFNGLUNIFORM1IPROC glUniform1i;
|
||||||
NAZARA_API extern PFNGLUNIFORM2DVPROC glUniform2dv;
|
NAZARA_API extern PFNGLUNIFORM2DVPROC glUniform2dv;
|
||||||
NAZARA_API extern PFNGLUNIFORM2FVPROC glUniform2fv;
|
NAZARA_API extern PFNGLUNIFORM2FVPROC glUniform2fv;
|
||||||
NAZARA_API extern PFNGLUNIFORM3DVPROC glUniform3dv;
|
NAZARA_API extern PFNGLUNIFORM3DVPROC glUniform3dv;
|
||||||
NAZARA_API extern PFNGLUNIFORM3FVPROC glUniform3fv;
|
NAZARA_API extern PFNGLUNIFORM3FVPROC glUniform3fv;
|
||||||
NAZARA_API extern PFNGLUNIFORM4DVPROC glUniform4dv;
|
NAZARA_API extern PFNGLUNIFORM4DVPROC glUniform4dv;
|
||||||
NAZARA_API extern PFNGLUNIFORM4FVPROC glUniform4fv;
|
NAZARA_API extern PFNGLUNIFORM4FVPROC glUniform4fv;
|
||||||
NAZARA_API extern PFNGLUNIFORMMATRIX4DVPROC glUniformMatrix4dv;
|
NAZARA_API extern PFNGLUNIFORMMATRIX4DVPROC glUniformMatrix4dv;
|
||||||
NAZARA_API extern PFNGLUNIFORMMATRIX4FVPROC glUniformMatrix4fv;
|
NAZARA_API extern PFNGLUNIFORMMATRIX4FVPROC glUniformMatrix4fv;
|
||||||
NAZARA_API extern PFNGLUNMAPBUFFERPROC glUnmapBuffer;
|
NAZARA_API extern PFNGLUNMAPBUFFERPROC glUnmapBuffer;
|
||||||
NAZARA_API extern PFNGLUSEPROGRAMPROC glUseProgram;
|
NAZARA_API extern PFNGLUSEPROGRAMPROC glUseProgram;
|
||||||
NAZARA_API extern PFNGLVERTEXATTRIB4FPROC glVertexAttrib4f;
|
NAZARA_API extern PFNGLVERTEXATTRIB4FPROC glVertexAttrib4f;
|
||||||
NAZARA_API extern PFNGLVERTEXATTRIBPOINTERPROC glVertexAttribPointer;
|
NAZARA_API extern PFNGLVERTEXATTRIBPOINTERPROC glVertexAttribPointer;
|
||||||
NAZARA_API extern PFNGLVIEWPORTPROC glViewport;
|
NAZARA_API extern PFNGLVIEWPORTPROC glViewport;
|
||||||
#if defined(NAZARA_PLATFORM_WINDOWS)
|
#if defined(NAZARA_PLATFORM_WINDOWS)
|
||||||
NAZARA_API extern PFNWGLCHOOSEPIXELFORMATARBPROC wglChoosePixelFormat;
|
NAZARA_API extern PFNWGLCHOOSEPIXELFORMATARBPROC wglChoosePixelFormat;
|
||||||
NAZARA_API extern PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribs;
|
NAZARA_API extern PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribs;
|
||||||
NAZARA_API extern PFNWGLGETEXTENSIONSSTRINGARBPROC wglGetExtensionsStringARB;
|
NAZARA_API extern PFNWGLGETEXTENSIONSSTRINGARBPROC wglGetExtensionsStringARB;
|
||||||
NAZARA_API extern PFNWGLGETEXTENSIONSSTRINGEXTPROC wglGetExtensionsStringEXT;
|
NAZARA_API extern PFNWGLGETEXTENSIONSSTRINGEXTPROC wglGetExtensionsStringEXT;
|
||||||
NAZARA_API extern PFNWGLSWAPINTERVALEXTPROC wglSwapInterval;
|
NAZARA_API extern PFNWGLSWAPINTERVALEXTPROC wglSwapInterval;
|
||||||
#elif defined(NAZARA_PLATFORM_LINUX)
|
#elif defined(NAZARA_PLATFORM_LINUX)
|
||||||
NAZARA_API extern PFNGLXCREATECONTEXTATTRIBSARBPROC glXCreateContextAttribs;
|
NAZARA_API extern PFNGLXCREATECONTEXTATTRIBSARBPROC glXCreateContextAttribs;
|
||||||
NAZARA_API extern PFNGLXSWAPINTERVALSGIPROC glXSwapInterval;
|
NAZARA_API extern PFNGLXSWAPINTERVALSGIPROC glXSwapInterval;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // NAZARA_OPENGL_HPP
|
#endif // NAZARA_OPENGL_HPP
|
||||||
|
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
// Copyright 2006 Nemanja Trifunovic
|
|
||||||
|
|
||||||
/*
|
|
||||||
Permission is hereby granted, free of charge, to any person or organization
|
|
||||||
obtaining a copy of the software and accompanying documentation covered by
|
|
||||||
this license (the "Software") to use, reproduce, display, distribute,
|
|
||||||
execute, and transmit the Software, and to prepare derivative works of the
|
|
||||||
Software, and to permit third-parties to whom the Software is furnished to
|
|
||||||
do so, all subject to the following:
|
|
||||||
|
|
||||||
The copyright notices in the Software and this entire statement, including
|
|
||||||
the above license grant, this restriction and the following disclaimer,
|
|
||||||
must be included in all copies of the Software, in whole or in part, and
|
|
||||||
all derivative works of the Software, unless such copies or derivative
|
|
||||||
works are solely in the form of machine-executable object code generated by
|
|
||||||
a source language processor.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
|
||||||
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
|
||||||
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
|
||||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
||||||
DEALINGS IN THE SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef UTF8_FOR_CPP_2675DCD0_9480_4c0c_B92A_CC14C027B731
|
|
||||||
#define UTF8_FOR_CPP_2675DCD0_9480_4c0c_B92A_CC14C027B731
|
|
||||||
|
|
||||||
#include "utf8/checked.h"
|
|
||||||
#include "utf8/unchecked.h"
|
|
||||||
|
|
||||||
#endif // header guard
|
|
||||||
|
|
@ -1,327 +0,0 @@
|
||||||
// Copyright 2006 Nemanja Trifunovic
|
|
||||||
|
|
||||||
/*
|
|
||||||
Permission is hereby granted, free of charge, to any person or organization
|
|
||||||
obtaining a copy of the software and accompanying documentation covered by
|
|
||||||
this license (the "Software") to use, reproduce, display, distribute,
|
|
||||||
execute, and transmit the Software, and to prepare derivative works of the
|
|
||||||
Software, and to permit third-parties to whom the Software is furnished to
|
|
||||||
do so, all subject to the following:
|
|
||||||
|
|
||||||
The copyright notices in the Software and this entire statement, including
|
|
||||||
the above license grant, this restriction and the following disclaimer,
|
|
||||||
must be included in all copies of the Software, in whole or in part, and
|
|
||||||
all derivative works of the Software, unless such copies or derivative
|
|
||||||
works are solely in the form of machine-executable object code generated by
|
|
||||||
a source language processor.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
|
||||||
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
|
||||||
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
|
||||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
||||||
DEALINGS IN THE SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef UTF8_FOR_CPP_CHECKED_H_2675DCD0_9480_4c0c_B92A_CC14C027B731
|
|
||||||
#define UTF8_FOR_CPP_CHECKED_H_2675DCD0_9480_4c0c_B92A_CC14C027B731
|
|
||||||
|
|
||||||
#include "core.h"
|
|
||||||
#include <stdexcept>
|
|
||||||
|
|
||||||
namespace utf8
|
|
||||||
{
|
|
||||||
// Base for the exceptions that may be thrown from the library
|
|
||||||
class exception : public std::exception {
|
|
||||||
};
|
|
||||||
|
|
||||||
// Exceptions that may be thrown from the library functions.
|
|
||||||
class invalid_code_point : public exception {
|
|
||||||
uint32_t cp;
|
|
||||||
public:
|
|
||||||
invalid_code_point(uint32_t cp) : cp(cp) {}
|
|
||||||
virtual const char* what() const throw() { return "Invalid code point"; }
|
|
||||||
uint32_t code_point() const {return cp;}
|
|
||||||
};
|
|
||||||
|
|
||||||
class invalid_utf8 : public exception {
|
|
||||||
uint8_t u8;
|
|
||||||
public:
|
|
||||||
invalid_utf8 (uint8_t u) : u8(u) {}
|
|
||||||
virtual const char* what() const throw() { return "Invalid UTF-8"; }
|
|
||||||
uint8_t utf8_octet() const {return u8;}
|
|
||||||
};
|
|
||||||
|
|
||||||
class invalid_utf16 : public exception {
|
|
||||||
uint16_t u16;
|
|
||||||
public:
|
|
||||||
invalid_utf16 (uint16_t u) : u16(u) {}
|
|
||||||
virtual const char* what() const throw() { return "Invalid UTF-16"; }
|
|
||||||
uint16_t utf16_word() const {return u16;}
|
|
||||||
};
|
|
||||||
|
|
||||||
class not_enough_room : public exception {
|
|
||||||
public:
|
|
||||||
virtual const char* what() const throw() { return "Not enough space"; }
|
|
||||||
};
|
|
||||||
|
|
||||||
/// The library API - functions intended to be called by the users
|
|
||||||
|
|
||||||
template <typename octet_iterator, typename output_iterator>
|
|
||||||
output_iterator replace_invalid(octet_iterator start, octet_iterator end, output_iterator out, uint32_t replacement)
|
|
||||||
{
|
|
||||||
while (start != end) {
|
|
||||||
octet_iterator sequence_start = start;
|
|
||||||
internal::utf_error err_code = internal::validate_next(start, end);
|
|
||||||
switch (err_code) {
|
|
||||||
case internal::UTF8_OK :
|
|
||||||
for (octet_iterator it = sequence_start; it != start; ++it)
|
|
||||||
*out++ = *it;
|
|
||||||
break;
|
|
||||||
case internal::NOT_ENOUGH_ROOM:
|
|
||||||
throw not_enough_room();
|
|
||||||
case internal::INVALID_LEAD:
|
|
||||||
append (replacement, out);
|
|
||||||
++start;
|
|
||||||
break;
|
|
||||||
case internal::INCOMPLETE_SEQUENCE:
|
|
||||||
case internal::OVERLONG_SEQUENCE:
|
|
||||||
case internal::INVALID_CODE_POINT:
|
|
||||||
append (replacement, out);
|
|
||||||
++start;
|
|
||||||
// just one replacement mark for the sequence
|
|
||||||
while (internal::is_trail(*start) && start != end)
|
|
||||||
++start;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return out;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename octet_iterator, typename output_iterator>
|
|
||||||
inline output_iterator replace_invalid(octet_iterator start, octet_iterator end, output_iterator out)
|
|
||||||
{
|
|
||||||
static const uint32_t replacement_marker = internal::mask16(0xfffd);
|
|
||||||
return replace_invalid(start, end, out, replacement_marker);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename octet_iterator>
|
|
||||||
octet_iterator append(uint32_t cp, octet_iterator result)
|
|
||||||
{
|
|
||||||
if (!internal::is_code_point_valid(cp))
|
|
||||||
throw invalid_code_point(cp);
|
|
||||||
|
|
||||||
if (cp < 0x80) // one octet
|
|
||||||
*(result++) = static_cast<uint8_t>(cp);
|
|
||||||
else if (cp < 0x800) { // two octets
|
|
||||||
*(result++) = static_cast<uint8_t>((cp >> 6) | 0xc0);
|
|
||||||
*(result++) = static_cast<uint8_t>((cp & 0x3f) | 0x80);
|
|
||||||
}
|
|
||||||
else if (cp < 0x10000) { // three octets
|
|
||||||
*(result++) = static_cast<uint8_t>((cp >> 12) | 0xe0);
|
|
||||||
*(result++) = static_cast<uint8_t>(((cp >> 6) & 0x3f) | 0x80);
|
|
||||||
*(result++) = static_cast<uint8_t>((cp & 0x3f) | 0x80);
|
|
||||||
}
|
|
||||||
else { // four octets
|
|
||||||
*(result++) = static_cast<uint8_t>((cp >> 18) | 0xf0);
|
|
||||||
*(result++) = static_cast<uint8_t>(((cp >> 12) & 0x3f) | 0x80);
|
|
||||||
*(result++) = static_cast<uint8_t>(((cp >> 6) & 0x3f) | 0x80);
|
|
||||||
*(result++) = static_cast<uint8_t>((cp & 0x3f) | 0x80);
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename octet_iterator>
|
|
||||||
uint32_t next(octet_iterator& it, octet_iterator end)
|
|
||||||
{
|
|
||||||
uint32_t cp = 0;
|
|
||||||
internal::utf_error err_code = internal::validate_next(it, end, &cp);
|
|
||||||
switch (err_code) {
|
|
||||||
case internal::UTF8_OK :
|
|
||||||
break;
|
|
||||||
case internal::NOT_ENOUGH_ROOM :
|
|
||||||
throw not_enough_room();
|
|
||||||
case internal::INVALID_LEAD :
|
|
||||||
case internal::INCOMPLETE_SEQUENCE :
|
|
||||||
case internal::OVERLONG_SEQUENCE :
|
|
||||||
throw invalid_utf8(*it);
|
|
||||||
case internal::INVALID_CODE_POINT :
|
|
||||||
throw invalid_code_point(cp);
|
|
||||||
}
|
|
||||||
return cp;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename octet_iterator>
|
|
||||||
uint32_t peek_next(octet_iterator it, octet_iterator end)
|
|
||||||
{
|
|
||||||
return next(it, end);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename octet_iterator>
|
|
||||||
uint32_t prior(octet_iterator& it, octet_iterator start)
|
|
||||||
{
|
|
||||||
// can't do much if it == start
|
|
||||||
if (it == start)
|
|
||||||
throw not_enough_room();
|
|
||||||
|
|
||||||
octet_iterator end = it;
|
|
||||||
// Go back until we hit either a lead octet or start
|
|
||||||
while (internal::is_trail(*(--it)))
|
|
||||||
if (it == start)
|
|
||||||
throw invalid_utf8(*it); // error - no lead byte in the sequence
|
|
||||||
return peek_next(it, end);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Deprecated in versions that include "prior"
|
|
||||||
template <typename octet_iterator>
|
|
||||||
uint32_t previous(octet_iterator& it, octet_iterator pass_start)
|
|
||||||
{
|
|
||||||
octet_iterator end = it;
|
|
||||||
while (internal::is_trail(*(--it)))
|
|
||||||
if (it == pass_start)
|
|
||||||
throw invalid_utf8(*it); // error - no lead byte in the sequence
|
|
||||||
octet_iterator temp = it;
|
|
||||||
return next(temp, end);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename octet_iterator, typename distance_type>
|
|
||||||
void advance (octet_iterator& it, distance_type n, octet_iterator end)
|
|
||||||
{
|
|
||||||
for (distance_type i = 0; i < n; ++i)
|
|
||||||
next(it, end);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename octet_iterator>
|
|
||||||
typename std::iterator_traits<octet_iterator>::difference_type
|
|
||||||
distance (octet_iterator first, octet_iterator last)
|
|
||||||
{
|
|
||||||
typename std::iterator_traits<octet_iterator>::difference_type dist;
|
|
||||||
for (dist = 0; first < last; ++dist)
|
|
||||||
next(first, last);
|
|
||||||
return dist;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename u16bit_iterator, typename octet_iterator>
|
|
||||||
octet_iterator utf16to8 (u16bit_iterator start, u16bit_iterator end, octet_iterator result)
|
|
||||||
{
|
|
||||||
while (start != end) {
|
|
||||||
uint32_t cp = internal::mask16(*start++);
|
|
||||||
// Take care of surrogate pairs first
|
|
||||||
if (internal::is_lead_surrogate(cp)) {
|
|
||||||
if (start != end) {
|
|
||||||
uint32_t trail_surrogate = internal::mask16(*start++);
|
|
||||||
if (internal::is_trail_surrogate(trail_surrogate))
|
|
||||||
cp = (cp << 10) + trail_surrogate + internal::SURROGATE_OFFSET;
|
|
||||||
else
|
|
||||||
throw invalid_utf16(static_cast<uint16_t>(trail_surrogate));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
throw invalid_utf16(static_cast<uint16_t>(cp));
|
|
||||||
|
|
||||||
}
|
|
||||||
// Lone trail surrogate
|
|
||||||
else if (internal::is_trail_surrogate(cp))
|
|
||||||
throw invalid_utf16(static_cast<uint16_t>(cp));
|
|
||||||
|
|
||||||
result = append(cp, result);
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename u16bit_iterator, typename octet_iterator>
|
|
||||||
u16bit_iterator utf8to16 (octet_iterator start, octet_iterator end, u16bit_iterator result)
|
|
||||||
{
|
|
||||||
while (start != end) {
|
|
||||||
uint32_t cp = next(start, end);
|
|
||||||
if (cp > 0xffff) { //make a surrogate pair
|
|
||||||
*result++ = static_cast<uint16_t>((cp >> 10) + internal::LEAD_OFFSET);
|
|
||||||
*result++ = static_cast<uint16_t>((cp & 0x3ff) + internal::TRAIL_SURROGATE_MIN);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
*result++ = static_cast<uint16_t>(cp);
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename octet_iterator, typename u32bit_iterator>
|
|
||||||
octet_iterator utf32to8 (u32bit_iterator start, u32bit_iterator end, octet_iterator result)
|
|
||||||
{
|
|
||||||
while (start != end)
|
|
||||||
result = append(*(start++), result);
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename octet_iterator, typename u32bit_iterator>
|
|
||||||
u32bit_iterator utf8to32 (octet_iterator start, octet_iterator end, u32bit_iterator result)
|
|
||||||
{
|
|
||||||
while (start != end)
|
|
||||||
(*result++) = next(start, end);
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
// The iterator class
|
|
||||||
template <typename octet_iterator>
|
|
||||||
class iterator : public std::iterator <std::bidirectional_iterator_tag, uint32_t> {
|
|
||||||
octet_iterator it;
|
|
||||||
octet_iterator range_start;
|
|
||||||
octet_iterator range_end;
|
|
||||||
public:
|
|
||||||
iterator () {};
|
|
||||||
explicit iterator (const octet_iterator& octet_it,
|
|
||||||
const octet_iterator& range_start,
|
|
||||||
const octet_iterator& range_end) :
|
|
||||||
it(octet_it), range_start(range_start), range_end(range_end)
|
|
||||||
{
|
|
||||||
if (it < range_start || it > range_end)
|
|
||||||
throw std::out_of_range("Invalid utf-8 iterator position");
|
|
||||||
}
|
|
||||||
// the default "big three" are OK
|
|
||||||
octet_iterator base () const { return it; }
|
|
||||||
uint32_t operator * () const
|
|
||||||
{
|
|
||||||
octet_iterator temp = it;
|
|
||||||
return next(temp, range_end);
|
|
||||||
}
|
|
||||||
bool operator == (const iterator& rhs) const
|
|
||||||
{
|
|
||||||
if (range_start != rhs.range_start || range_end != rhs.range_end)
|
|
||||||
throw std::logic_error("Comparing utf-8 iterators defined with different ranges");
|
|
||||||
return (it == rhs.it);
|
|
||||||
}
|
|
||||||
bool operator != (const iterator& rhs) const
|
|
||||||
{
|
|
||||||
return !(operator == (rhs));
|
|
||||||
}
|
|
||||||
iterator& operator ++ ()
|
|
||||||
{
|
|
||||||
next(it, range_end);
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
iterator operator ++ (int)
|
|
||||||
{
|
|
||||||
iterator temp = *this;
|
|
||||||
next(it, range_end);
|
|
||||||
return temp;
|
|
||||||
}
|
|
||||||
iterator& operator -- ()
|
|
||||||
{
|
|
||||||
prior(it, range_start);
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
iterator operator -- (int)
|
|
||||||
{
|
|
||||||
iterator temp = *this;
|
|
||||||
prior(it, range_start);
|
|
||||||
return temp;
|
|
||||||
}
|
|
||||||
}; // class iterator
|
|
||||||
|
|
||||||
} // namespace utf8
|
|
||||||
|
|
||||||
#endif //header guard
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,351 +0,0 @@
|
||||||
// Copyright 2006 Nemanja Trifunovic
|
|
||||||
|
|
||||||
/*
|
|
||||||
Permission is hereby granted, free of charge, to any person or organization
|
|
||||||
obtaining a copy of the software and accompanying documentation covered by
|
|
||||||
this license (the "Software") to use, reproduce, display, distribute,
|
|
||||||
execute, and transmit the Software, and to prepare derivative works of the
|
|
||||||
Software, and to permit third-parties to whom the Software is furnished to
|
|
||||||
do so, all subject to the following:
|
|
||||||
|
|
||||||
The copyright notices in the Software and this entire statement, including
|
|
||||||
the above license grant, this restriction and the following disclaimer,
|
|
||||||
must be included in all copies of the Software, in whole or in part, and
|
|
||||||
all derivative works of the Software, unless such copies or derivative
|
|
||||||
works are solely in the form of machine-executable object code generated by
|
|
||||||
a source language processor.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
|
||||||
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
|
||||||
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
|
||||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
||||||
DEALINGS IN THE SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef UTF8_FOR_CPP_CORE_H_2675DCD0_9480_4c0c_B92A_CC14C027B731
|
|
||||||
#define UTF8_FOR_CPP_CORE_H_2675DCD0_9480_4c0c_B92A_CC14C027B731
|
|
||||||
|
|
||||||
#include <iterator>
|
|
||||||
|
|
||||||
namespace utf8
|
|
||||||
{
|
|
||||||
// Helper code - not intended to be directly called by the library users. May be changed at any time
|
|
||||||
namespace internal
|
|
||||||
{
|
|
||||||
// Unicode constants
|
|
||||||
// Leading (high) surrogates: 0xd800 - 0xdbff
|
|
||||||
// Trailing (low) surrogates: 0xdc00 - 0xdfff
|
|
||||||
const uint16_t LEAD_SURROGATE_MIN = 0xd800u;
|
|
||||||
const uint16_t LEAD_SURROGATE_MAX = 0xdbffu;
|
|
||||||
const uint16_t TRAIL_SURROGATE_MIN = 0xdc00u;
|
|
||||||
const uint16_t TRAIL_SURROGATE_MAX = 0xdfffu;
|
|
||||||
const uint16_t LEAD_OFFSET = LEAD_SURROGATE_MIN - (0x10000 >> 10);
|
|
||||||
const uint32_t SURROGATE_OFFSET = 0x10000u - (LEAD_SURROGATE_MIN << 10) - TRAIL_SURROGATE_MIN;
|
|
||||||
|
|
||||||
// Maximum valid value for a Unicode code point
|
|
||||||
const uint32_t CODE_POINT_MAX = 0x0010ffffu;
|
|
||||||
|
|
||||||
template<typename octet_type>
|
|
||||||
inline uint8_t mask8(octet_type oc)
|
|
||||||
{
|
|
||||||
return static_cast<uint8_t>(0xff & oc);
|
|
||||||
}
|
|
||||||
template<typename u16_type>
|
|
||||||
inline uint16_t mask16(u16_type oc)
|
|
||||||
{
|
|
||||||
return static_cast<uint16_t>(0xffff & oc);
|
|
||||||
}
|
|
||||||
template<typename octet_type>
|
|
||||||
inline bool is_trail(octet_type oc)
|
|
||||||
{
|
|
||||||
return ((mask8(oc) >> 6) == 0x2);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename u16>
|
|
||||||
inline bool is_lead_surrogate(u16 cp)
|
|
||||||
{
|
|
||||||
return (cp >= LEAD_SURROGATE_MIN && cp <= LEAD_SURROGATE_MAX);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename u16>
|
|
||||||
inline bool is_trail_surrogate(u16 cp)
|
|
||||||
{
|
|
||||||
return (cp >= TRAIL_SURROGATE_MIN && cp <= TRAIL_SURROGATE_MAX);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename u16>
|
|
||||||
inline bool is_surrogate(u16 cp)
|
|
||||||
{
|
|
||||||
return (cp >= LEAD_SURROGATE_MIN && cp <= TRAIL_SURROGATE_MAX);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename u32>
|
|
||||||
inline bool is_code_point_valid(u32 cp)
|
|
||||||
{
|
|
||||||
return (cp <= CODE_POINT_MAX && !is_surrogate(cp));
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename octet_iterator>
|
|
||||||
inline typename std::iterator_traits<octet_iterator>::difference_type
|
|
||||||
sequence_length(octet_iterator lead_it)
|
|
||||||
{
|
|
||||||
uint8_t lead = mask8(*lead_it);
|
|
||||||
if (lead < 0x80)
|
|
||||||
return 1;
|
|
||||||
else if ((lead >> 5) == 0x6)
|
|
||||||
return 2;
|
|
||||||
else if ((lead >> 4) == 0xe)
|
|
||||||
return 3;
|
|
||||||
else if ((lead >> 3) == 0x1e)
|
|
||||||
return 4;
|
|
||||||
else
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename octet_difference_type>
|
|
||||||
inline bool is_overlong_sequence(uint32_t cp, octet_difference_type length)
|
|
||||||
{
|
|
||||||
if (cp < 0x80) {
|
|
||||||
if (length != 1)
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else if (cp < 0x800) {
|
|
||||||
if (length != 2)
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else if (cp < 0x10000) {
|
|
||||||
if (length != 3)
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
enum utf_error {UTF8_OK, NOT_ENOUGH_ROOM, INVALID_LEAD, INCOMPLETE_SEQUENCE, OVERLONG_SEQUENCE, INVALID_CODE_POINT};
|
|
||||||
|
|
||||||
/// get_sequence_x functions decode utf-8 sequences of the length x
|
|
||||||
|
|
||||||
template <typename octet_iterator>
|
|
||||||
utf_error get_sequence_1(octet_iterator& it, octet_iterator end, uint32_t* code_point)
|
|
||||||
{
|
|
||||||
if (it != end) {
|
|
||||||
if (code_point)
|
|
||||||
*code_point = mask8(*it);
|
|
||||||
return UTF8_OK;
|
|
||||||
}
|
|
||||||
return NOT_ENOUGH_ROOM;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename octet_iterator>
|
|
||||||
utf_error get_sequence_2(octet_iterator& it, octet_iterator end, uint32_t* code_point)
|
|
||||||
{
|
|
||||||
utf_error ret_code = NOT_ENOUGH_ROOM;
|
|
||||||
|
|
||||||
if (it != end) {
|
|
||||||
uint32_t cp = mask8(*it);
|
|
||||||
if (++it != end) {
|
|
||||||
if (is_trail(*it)) {
|
|
||||||
cp = ((cp << 6) & 0x7ff) + ((*it) & 0x3f);
|
|
||||||
|
|
||||||
if (code_point)
|
|
||||||
*code_point = cp;
|
|
||||||
ret_code = UTF8_OK;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
ret_code = INCOMPLETE_SEQUENCE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
ret_code = NOT_ENOUGH_ROOM;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret_code;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename octet_iterator>
|
|
||||||
utf_error get_sequence_3(octet_iterator& it, octet_iterator end, uint32_t* code_point)
|
|
||||||
{
|
|
||||||
utf_error ret_code = NOT_ENOUGH_ROOM;
|
|
||||||
|
|
||||||
if (it != end) {
|
|
||||||
uint32_t cp = mask8(*it);
|
|
||||||
if (++it != end) {
|
|
||||||
if (is_trail(*it)) {
|
|
||||||
cp = ((cp << 12) & 0xffff) + ((mask8(*it) << 6) & 0xfff);
|
|
||||||
if (++it != end) {
|
|
||||||
if (is_trail(*it)) {
|
|
||||||
cp += (*it) & 0x3f;
|
|
||||||
|
|
||||||
if (code_point)
|
|
||||||
*code_point = cp;
|
|
||||||
ret_code = UTF8_OK;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
ret_code = INCOMPLETE_SEQUENCE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
ret_code = NOT_ENOUGH_ROOM;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
ret_code = INCOMPLETE_SEQUENCE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
ret_code = NOT_ENOUGH_ROOM;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret_code;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename octet_iterator>
|
|
||||||
utf_error get_sequence_4(octet_iterator& it, octet_iterator end, uint32_t* code_point)
|
|
||||||
{
|
|
||||||
utf_error ret_code = NOT_ENOUGH_ROOM;
|
|
||||||
|
|
||||||
if (it != end) {
|
|
||||||
uint32_t cp = mask8(*it);
|
|
||||||
if (++it != end) {
|
|
||||||
if (is_trail(*it)) {
|
|
||||||
cp = ((cp << 18) & 0x1fffff) + ((mask8(*it) << 12) & 0x3ffff);
|
|
||||||
if (++it != end) {
|
|
||||||
if (is_trail(*it)) {
|
|
||||||
cp += (mask8(*it) << 6) & 0xfff;
|
|
||||||
if (++it != end) {
|
|
||||||
if (is_trail(*it)) {
|
|
||||||
cp += (*it) & 0x3f;
|
|
||||||
|
|
||||||
if (code_point)
|
|
||||||
*code_point = cp;
|
|
||||||
ret_code = UTF8_OK;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
ret_code = INCOMPLETE_SEQUENCE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
ret_code = NOT_ENOUGH_ROOM;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
ret_code = INCOMPLETE_SEQUENCE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
ret_code = NOT_ENOUGH_ROOM;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
ret_code = INCOMPLETE_SEQUENCE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
ret_code = NOT_ENOUGH_ROOM;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret_code;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename octet_iterator>
|
|
||||||
utf_error validate_next(octet_iterator& it, octet_iterator end, uint32_t* code_point)
|
|
||||||
{
|
|
||||||
// Save the original value of it so we can go back in case of failure
|
|
||||||
// Of course, it does not make much sense with i.e. stream iterators
|
|
||||||
octet_iterator original_it = it;
|
|
||||||
|
|
||||||
uint32_t cp = 0;
|
|
||||||
// Determine the sequence length based on the lead octet
|
|
||||||
typedef typename std::iterator_traits<octet_iterator>::difference_type octet_difference_type;
|
|
||||||
octet_difference_type length = sequence_length(it);
|
|
||||||
if (length == 0)
|
|
||||||
return INVALID_LEAD;
|
|
||||||
|
|
||||||
// Now that we have a valid sequence length, get trail octets and calculate the code point
|
|
||||||
utf_error err = UTF8_OK;
|
|
||||||
switch (length) {
|
|
||||||
case 1:
|
|
||||||
err = get_sequence_1(it, end, &cp);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
err = get_sequence_2(it, end, &cp);
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
err = get_sequence_3(it, end, &cp);
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
err = get_sequence_4(it, end, &cp);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (err == UTF8_OK) {
|
|
||||||
// Decoding succeeded. Now, security checks...
|
|
||||||
if (is_code_point_valid(cp)) {
|
|
||||||
if (!is_overlong_sequence(cp, length)){
|
|
||||||
// Passed! Return here.
|
|
||||||
if (code_point)
|
|
||||||
*code_point = cp;
|
|
||||||
++it;
|
|
||||||
return UTF8_OK;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
err = OVERLONG_SEQUENCE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
err = INVALID_CODE_POINT;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Failure branch - restore the original value of the iterator
|
|
||||||
it = original_it;
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename octet_iterator>
|
|
||||||
inline utf_error validate_next(octet_iterator& it, octet_iterator end) {
|
|
||||||
return validate_next(it, end, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace internal
|
|
||||||
|
|
||||||
/// The library API - functions intended to be called by the users
|
|
||||||
|
|
||||||
// Byte order mark
|
|
||||||
const uint8_t bom[] = {0xef, 0xbb, 0xbf};
|
|
||||||
|
|
||||||
template <typename octet_iterator>
|
|
||||||
octet_iterator find_invalid(octet_iterator start, octet_iterator end)
|
|
||||||
{
|
|
||||||
octet_iterator result = start;
|
|
||||||
while (result != end) {
|
|
||||||
internal::utf_error err_code = internal::validate_next(result, end);
|
|
||||||
if (err_code != internal::UTF8_OK)
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename octet_iterator>
|
|
||||||
inline bool is_valid(octet_iterator start, octet_iterator end)
|
|
||||||
{
|
|
||||||
return (find_invalid(start, end) == end);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename octet_iterator>
|
|
||||||
inline bool starts_with_bom (octet_iterator it, octet_iterator end)
|
|
||||||
{
|
|
||||||
return (
|
|
||||||
((it != end) && (internal::mask8(*it++)) == bom[0]) &&
|
|
||||||
((it != end) && (internal::mask8(*it++)) == bom[1]) &&
|
|
||||||
((it != end) && (internal::mask8(*it)) == bom[2])
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
//Deprecated in release 2.3
|
|
||||||
template <typename octet_iterator>
|
|
||||||
inline bool is_bom (octet_iterator it)
|
|
||||||
{
|
|
||||||
return (
|
|
||||||
(internal::mask8(*it++)) == bom[0] &&
|
|
||||||
(internal::mask8(*it++)) == bom[1] &&
|
|
||||||
(internal::mask8(*it)) == bom[2]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
} // namespace utf8
|
|
||||||
|
|
||||||
#endif // header guard
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,228 +0,0 @@
|
||||||
// Copyright 2006 Nemanja Trifunovic
|
|
||||||
|
|
||||||
/*
|
|
||||||
Permission is hereby granted, free of charge, to any person or organization
|
|
||||||
obtaining a copy of the software and accompanying documentation covered by
|
|
||||||
this license (the "Software") to use, reproduce, display, distribute,
|
|
||||||
execute, and transmit the Software, and to prepare derivative works of the
|
|
||||||
Software, and to permit third-parties to whom the Software is furnished to
|
|
||||||
do so, all subject to the following:
|
|
||||||
|
|
||||||
The copyright notices in the Software and this entire statement, including
|
|
||||||
the above license grant, this restriction and the following disclaimer,
|
|
||||||
must be included in all copies of the Software, in whole or in part, and
|
|
||||||
all derivative works of the Software, unless such copies or derivative
|
|
||||||
works are solely in the form of machine-executable object code generated by
|
|
||||||
a source language processor.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
|
||||||
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
|
||||||
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
|
||||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
||||||
DEALINGS IN THE SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef UTF8_FOR_CPP_UNCHECKED_H_2675DCD0_9480_4c0c_B92A_CC14C027B731
|
|
||||||
#define UTF8_FOR_CPP_UNCHECKED_H_2675DCD0_9480_4c0c_B92A_CC14C027B731
|
|
||||||
|
|
||||||
#include "core.h"
|
|
||||||
|
|
||||||
namespace utf8
|
|
||||||
{
|
|
||||||
namespace unchecked
|
|
||||||
{
|
|
||||||
template <typename octet_iterator>
|
|
||||||
octet_iterator append(uint32_t cp, octet_iterator result)
|
|
||||||
{
|
|
||||||
if (cp < 0x80) // one octet
|
|
||||||
*(result++) = static_cast<uint8_t>(cp);
|
|
||||||
else if (cp < 0x800) { // two octets
|
|
||||||
*(result++) = static_cast<uint8_t>((cp >> 6) | 0xc0);
|
|
||||||
*(result++) = static_cast<uint8_t>((cp & 0x3f) | 0x80);
|
|
||||||
}
|
|
||||||
else if (cp < 0x10000) { // three octets
|
|
||||||
*(result++) = static_cast<uint8_t>((cp >> 12) | 0xe0);
|
|
||||||
*(result++) = static_cast<uint8_t>(((cp >> 6) & 0x3f) | 0x80);
|
|
||||||
*(result++) = static_cast<uint8_t>((cp & 0x3f) | 0x80);
|
|
||||||
}
|
|
||||||
else { // four octets
|
|
||||||
*(result++) = static_cast<uint8_t>((cp >> 18) | 0xf0);
|
|
||||||
*(result++) = static_cast<uint8_t>(((cp >> 12) & 0x3f)| 0x80);
|
|
||||||
*(result++) = static_cast<uint8_t>(((cp >> 6) & 0x3f) | 0x80);
|
|
||||||
*(result++) = static_cast<uint8_t>((cp & 0x3f) | 0x80);
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename octet_iterator>
|
|
||||||
uint32_t next(octet_iterator& it)
|
|
||||||
{
|
|
||||||
uint32_t cp = internal::mask8(*it);
|
|
||||||
typename std::iterator_traits<octet_iterator>::difference_type length = utf8::internal::sequence_length(it);
|
|
||||||
switch (length) {
|
|
||||||
case 1:
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
it++;
|
|
||||||
cp = ((cp << 6) & 0x7ff) + ((*it) & 0x3f);
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
++it;
|
|
||||||
cp = ((cp << 12) & 0xffff) + ((internal::mask8(*it) << 6) & 0xfff);
|
|
||||||
++it;
|
|
||||||
cp += (*it) & 0x3f;
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
++it;
|
|
||||||
cp = ((cp << 18) & 0x1fffff) + ((internal::mask8(*it) << 12) & 0x3ffff);
|
|
||||||
++it;
|
|
||||||
cp += (internal::mask8(*it) << 6) & 0xfff;
|
|
||||||
++it;
|
|
||||||
cp += (*it) & 0x3f;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
++it;
|
|
||||||
return cp;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename octet_iterator>
|
|
||||||
uint32_t peek_next(octet_iterator it)
|
|
||||||
{
|
|
||||||
return next(it);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename octet_iterator>
|
|
||||||
uint32_t prior(octet_iterator& it)
|
|
||||||
{
|
|
||||||
while (internal::is_trail(*(--it))) ;
|
|
||||||
octet_iterator temp = it;
|
|
||||||
return next(temp);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Deprecated in versions that include prior, but only for the sake of consistency (see utf8::previous)
|
|
||||||
template <typename octet_iterator>
|
|
||||||
inline uint32_t previous(octet_iterator& it)
|
|
||||||
{
|
|
||||||
return prior(it);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename octet_iterator, typename distance_type>
|
|
||||||
void advance (octet_iterator& it, distance_type n)
|
|
||||||
{
|
|
||||||
for (distance_type i = 0; i < n; ++i)
|
|
||||||
next(it);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename octet_iterator>
|
|
||||||
typename std::iterator_traits<octet_iterator>::difference_type
|
|
||||||
distance (octet_iterator first, octet_iterator last)
|
|
||||||
{
|
|
||||||
typename std::iterator_traits<octet_iterator>::difference_type dist;
|
|
||||||
for (dist = 0; first < last; ++dist)
|
|
||||||
next(first);
|
|
||||||
return dist;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename u16bit_iterator, typename octet_iterator>
|
|
||||||
octet_iterator utf16to8 (u16bit_iterator start, u16bit_iterator end, octet_iterator result)
|
|
||||||
{
|
|
||||||
while (start != end) {
|
|
||||||
uint32_t cp = internal::mask16(*start++);
|
|
||||||
// Take care of surrogate pairs first
|
|
||||||
if (internal::is_lead_surrogate(cp)) {
|
|
||||||
uint32_t trail_surrogate = internal::mask16(*start++);
|
|
||||||
cp = (cp << 10) + trail_surrogate + internal::SURROGATE_OFFSET;
|
|
||||||
}
|
|
||||||
result = append(cp, result);
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename u16bit_iterator, typename octet_iterator>
|
|
||||||
u16bit_iterator utf8to16 (octet_iterator start, octet_iterator end, u16bit_iterator result)
|
|
||||||
{
|
|
||||||
while (start < end) {
|
|
||||||
uint32_t cp = next(start);
|
|
||||||
if (cp > 0xffff) { //make a surrogate pair
|
|
||||||
*result++ = static_cast<uint16_t>((cp >> 10) + internal::LEAD_OFFSET);
|
|
||||||
*result++ = static_cast<uint16_t>((cp & 0x3ff) + internal::TRAIL_SURROGATE_MIN);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
*result++ = static_cast<uint16_t>(cp);
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename octet_iterator, typename u32bit_iterator>
|
|
||||||
octet_iterator utf32to8 (u32bit_iterator start, u32bit_iterator end, octet_iterator result)
|
|
||||||
{
|
|
||||||
while (start != end)
|
|
||||||
result = append(*(start++), result);
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename octet_iterator, typename u32bit_iterator>
|
|
||||||
u32bit_iterator utf8to32 (octet_iterator start, octet_iterator end, u32bit_iterator result)
|
|
||||||
{
|
|
||||||
while (start < end)
|
|
||||||
(*result++) = next(start);
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
// The iterator class
|
|
||||||
template <typename octet_iterator>
|
|
||||||
class iterator : public std::iterator <std::bidirectional_iterator_tag, uint32_t> {
|
|
||||||
octet_iterator it;
|
|
||||||
public:
|
|
||||||
iterator () {};
|
|
||||||
explicit iterator (const octet_iterator& octet_it): it(octet_it) {}
|
|
||||||
// the default "big three" are OK
|
|
||||||
octet_iterator base () const { return it; }
|
|
||||||
uint32_t operator * () const
|
|
||||||
{
|
|
||||||
octet_iterator temp = it;
|
|
||||||
return next(temp);
|
|
||||||
}
|
|
||||||
bool operator == (const iterator& rhs) const
|
|
||||||
{
|
|
||||||
return (it == rhs.it);
|
|
||||||
}
|
|
||||||
bool operator != (const iterator& rhs) const
|
|
||||||
{
|
|
||||||
return !(operator == (rhs));
|
|
||||||
}
|
|
||||||
iterator& operator ++ ()
|
|
||||||
{
|
|
||||||
std::advance(it, internal::sequence_length(it));
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
iterator operator ++ (int)
|
|
||||||
{
|
|
||||||
iterator temp = *this;
|
|
||||||
std::advance(it, internal::sequence_length(it));
|
|
||||||
return temp;
|
|
||||||
}
|
|
||||||
iterator& operator -- ()
|
|
||||||
{
|
|
||||||
prior(it);
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
iterator operator -- (int)
|
|
||||||
{
|
|
||||||
iterator temp = *this;
|
|
||||||
prior(it);
|
|
||||||
return temp;
|
|
||||||
}
|
|
||||||
}; // class iterator
|
|
||||||
|
|
||||||
} // namespace utf8::unchecked
|
|
||||||
} // namespace utf8
|
|
||||||
|
|
||||||
|
|
||||||
#endif // header guard
|
|
||||||
|
|
||||||
|
|
@ -350,7 +350,24 @@ bool NzOpenGL::Initialize()
|
||||||
openGLextensions[NzOpenGL::AnisotropicFilter] = IsSupported("GL_EXT_texture_filter_anisotropic");
|
openGLextensions[NzOpenGL::AnisotropicFilter] = IsSupported("GL_EXT_texture_filter_anisotropic");
|
||||||
|
|
||||||
// DebugOutput
|
// DebugOutput
|
||||||
if (IsSupported("GL_ARB_debug_output"))
|
if (openGLversion >= 430 || IsSupported("GL_KHR_debug"))
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
glDebugMessageControl = reinterpret_cast<PFNGLDEBUGMESSAGECONTROLPROC>(LoadEntry("glDebugMessageControl"));
|
||||||
|
glDebugMessageInsert = reinterpret_cast<PFNGLDEBUGMESSAGEINSERTPROC>(LoadEntry("glDebugMessageInsert"));
|
||||||
|
glDebugMessageCallback = reinterpret_cast<PFNGLDEBUGMESSAGECALLBACKPROC>(LoadEntry("glDebugMessageCallback"));
|
||||||
|
glGetDebugMessageLog = reinterpret_cast<PFNGLGETDEBUGMESSAGELOGPROC>(LoadEntry("glGetDebugMessageLog"));
|
||||||
|
|
||||||
|
openGLextensions[NzOpenGL::DebugOutput] = true;
|
||||||
|
}
|
||||||
|
catch (const std::exception& e)
|
||||||
|
{
|
||||||
|
NazaraWarning("Failed to load GL_KHR_debug: " + NzString(e.what()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!openGLextensions[NzOpenGL::DebugOutput] && IsSupported("GL_ARB_debug_output"))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
@ -550,137 +567,137 @@ void NzOpenGL::Uninitialize()
|
||||||
UnloadLibrary();
|
UnloadLibrary();
|
||||||
}
|
}
|
||||||
|
|
||||||
PFNGLACTIVETEXTUREPROC glActiveTexture = nullptr;
|
PFNGLACTIVETEXTUREPROC glActiveTexture = nullptr;
|
||||||
PFNGLATTACHSHADERPROC glAttachShader = nullptr;
|
PFNGLATTACHSHADERPROC glAttachShader = nullptr;
|
||||||
PFNGLBEGINQUERYPROC glBeginQuery = nullptr;
|
PFNGLBEGINQUERYPROC glBeginQuery = nullptr;
|
||||||
PFNGLBINDATTRIBLOCATIONPROC glBindAttribLocation = nullptr;
|
PFNGLBINDATTRIBLOCATIONPROC glBindAttribLocation = nullptr;
|
||||||
PFNGLBINDBUFFERPROC glBindBuffer = nullptr;
|
PFNGLBINDBUFFERPROC glBindBuffer = nullptr;
|
||||||
PFNGLBINDFRAMEBUFFERPROC glBindFramebuffer = nullptr;
|
PFNGLBINDFRAMEBUFFERPROC glBindFramebuffer = nullptr;
|
||||||
PFNGLBINDRENDERBUFFERPROC glBindRenderbuffer = nullptr;
|
PFNGLBINDRENDERBUFFERPROC glBindRenderbuffer = nullptr;
|
||||||
PFNGLBINDTEXTUREPROC glBindTexture = nullptr;
|
PFNGLBINDTEXTUREPROC glBindTexture = nullptr;
|
||||||
PFNGLBINDVERTEXARRAYPROC glBindVertexArray = nullptr;
|
PFNGLBINDVERTEXARRAYPROC glBindVertexArray = nullptr;
|
||||||
PFNGLBLENDFUNCPROC glBlendFunc = nullptr;
|
PFNGLBLENDFUNCPROC glBlendFunc = nullptr;
|
||||||
PFNGLBUFFERDATAPROC glBufferData = nullptr;
|
PFNGLBUFFERDATAPROC glBufferData = nullptr;
|
||||||
PFNGLBUFFERSUBDATAPROC glBufferSubData = nullptr;
|
PFNGLBUFFERSUBDATAPROC glBufferSubData = nullptr;
|
||||||
PFNGLCLEARPROC glClear = nullptr;
|
PFNGLCLEARPROC glClear = nullptr;
|
||||||
PFNGLCLEARCOLORPROC glClearColor = nullptr;
|
PFNGLCLEARCOLORPROC glClearColor = nullptr;
|
||||||
PFNGLCLEARDEPTHPROC glClearDepth = nullptr;
|
PFNGLCLEARDEPTHPROC glClearDepth = nullptr;
|
||||||
PFNGLCLEARSTENCILPROC glClearStencil = nullptr;
|
PFNGLCLEARSTENCILPROC glClearStencil = nullptr;
|
||||||
PFNGLCREATEPROGRAMPROC glCreateProgram = nullptr;
|
PFNGLCREATEPROGRAMPROC glCreateProgram = nullptr;
|
||||||
PFNGLCREATESHADERPROC glCreateShader = nullptr;
|
PFNGLCREATESHADERPROC glCreateShader = nullptr;
|
||||||
PFNGLCHECKFRAMEBUFFERSTATUSPROC glCheckFramebufferStatus = nullptr;
|
PFNGLCHECKFRAMEBUFFERSTATUSPROC glCheckFramebufferStatus = nullptr;
|
||||||
PFNGLCOLORMASKPROC glColorMask = nullptr;
|
PFNGLCOLORMASKPROC glColorMask = nullptr;
|
||||||
PFNGLCULLFACEPROC glCullFace = nullptr;
|
PFNGLCULLFACEPROC glCullFace = nullptr;
|
||||||
PFNGLCOMPILESHADERPROC glCompileShader = nullptr;
|
PFNGLCOMPILESHADERPROC glCompileShader = nullptr;
|
||||||
PFNGLCOPYTEXSUBIMAGE2DPROC glCopyTexSubImage2D = nullptr;
|
PFNGLCOPYTEXSUBIMAGE2DPROC glCopyTexSubImage2D = nullptr;
|
||||||
PFNGLDEBUGMESSAGECONTROLARBPROC glDebugMessageControl = nullptr;
|
PFNGLDEBUGMESSAGECONTROLPROC glDebugMessageControl = nullptr;
|
||||||
PFNGLDEBUGMESSAGEINSERTARBPROC glDebugMessageInsert = nullptr;
|
PFNGLDEBUGMESSAGEINSERTPROC glDebugMessageInsert = nullptr;
|
||||||
PFNGLDEBUGMESSAGECALLBACKARBPROC glDebugMessageCallback = nullptr;
|
PFNGLDEBUGMESSAGECALLBACKPROC glDebugMessageCallback = nullptr;
|
||||||
PFNGLDELETEBUFFERSPROC glDeleteBuffers = nullptr;
|
PFNGLDELETEBUFFERSPROC glDeleteBuffers = nullptr;
|
||||||
PFNGLDELETEFRAMEBUFFERSPROC glDeleteFramebuffers = nullptr;
|
PFNGLDELETEFRAMEBUFFERSPROC glDeleteFramebuffers = nullptr;
|
||||||
PFNGLDELETEPROGRAMPROC glDeleteProgram = nullptr;
|
PFNGLDELETEPROGRAMPROC glDeleteProgram = nullptr;
|
||||||
PFNGLDELETEQUERIESPROC glDeleteQueries = nullptr;
|
PFNGLDELETEQUERIESPROC glDeleteQueries = nullptr;
|
||||||
PFNGLDELETERENDERBUFFERSPROC glDeleteRenderbuffers = nullptr;
|
PFNGLDELETERENDERBUFFERSPROC glDeleteRenderbuffers = nullptr;
|
||||||
PFNGLDELETESHADERPROC glDeleteShader = nullptr;
|
PFNGLDELETESHADERPROC glDeleteShader = nullptr;
|
||||||
PFNGLDELETETEXTURESPROC glDeleteTextures = nullptr;
|
PFNGLDELETETEXTURESPROC glDeleteTextures = nullptr;
|
||||||
PFNGLDELETEVERTEXARRAYSPROC glDeleteVertexArrays = nullptr;
|
PFNGLDELETEVERTEXARRAYSPROC glDeleteVertexArrays = nullptr;
|
||||||
PFNGLDEPTHFUNCPROC glDepthFunc = nullptr;
|
PFNGLDEPTHFUNCPROC glDepthFunc = nullptr;
|
||||||
PFNGLDEPTHMASKPROC glDepthMask = nullptr;
|
PFNGLDEPTHMASKPROC glDepthMask = nullptr;
|
||||||
PFNGLDISABLEPROC glDisable = nullptr;
|
PFNGLDISABLEPROC glDisable = nullptr;
|
||||||
PFNGLDISABLEVERTEXATTRIBARRAYPROC glDisableVertexAttribArray = nullptr;
|
PFNGLDISABLEVERTEXATTRIBARRAYPROC glDisableVertexAttribArray = nullptr;
|
||||||
PFNGLDRAWARRAYSPROC glDrawArrays = nullptr;
|
PFNGLDRAWARRAYSPROC glDrawArrays = nullptr;
|
||||||
PFNGLDRAWBUFFERPROC glDrawBuffer = nullptr;
|
PFNGLDRAWBUFFERPROC glDrawBuffer = nullptr;
|
||||||
PFNGLDRAWBUFFERSPROC glDrawBuffers = nullptr;
|
PFNGLDRAWBUFFERSPROC glDrawBuffers = nullptr;
|
||||||
PFNGLDRAWELEMENTSPROC glDrawElements = nullptr;
|
PFNGLDRAWELEMENTSPROC glDrawElements = nullptr;
|
||||||
PFNGLENDQUERYPROC glEndQuery = nullptr;
|
PFNGLENDQUERYPROC glEndQuery = nullptr;
|
||||||
PFNGLFLUSHPROC glFlush = nullptr;
|
PFNGLFLUSHPROC glFlush = nullptr;
|
||||||
PFNGLFRAMEBUFFERRENDERBUFFERPROC glFramebufferRenderbuffer = nullptr;
|
PFNGLFRAMEBUFFERRENDERBUFFERPROC glFramebufferRenderbuffer = nullptr;
|
||||||
PFNGLFRAMEBUFFERTEXTURE2DPROC glFramebufferTexture2D = nullptr;
|
PFNGLFRAMEBUFFERTEXTURE2DPROC glFramebufferTexture2D = nullptr;
|
||||||
PFNGLENABLEPROC glEnable = nullptr;
|
PFNGLENABLEPROC glEnable = nullptr;
|
||||||
PFNGLENABLEVERTEXATTRIBARRAYPROC glEnableVertexAttribArray = nullptr;
|
PFNGLENABLEVERTEXATTRIBARRAYPROC glEnableVertexAttribArray = nullptr;
|
||||||
PFNGLGENERATEMIPMAPPROC glGenerateMipmap = nullptr;
|
PFNGLGENERATEMIPMAPPROC glGenerateMipmap = nullptr;
|
||||||
PFNGLGENBUFFERSPROC glGenBuffers = nullptr;
|
PFNGLGENBUFFERSPROC glGenBuffers = nullptr;
|
||||||
PFNGLGENFRAMEBUFFERSPROC glGenFramebuffers = nullptr;
|
PFNGLGENFRAMEBUFFERSPROC glGenFramebuffers = nullptr;
|
||||||
PFNGLGENRENDERBUFFERSPROC glGenRenderbuffers = nullptr;
|
PFNGLGENRENDERBUFFERSPROC glGenRenderbuffers = nullptr;
|
||||||
PFNGLGENQUERIESPROC glGenQueries = nullptr;
|
PFNGLGENQUERIESPROC glGenQueries = nullptr;
|
||||||
PFNGLGENTEXTURESPROC glGenTextures = nullptr;
|
PFNGLGENTEXTURESPROC glGenTextures = nullptr;
|
||||||
PFNGLGENVERTEXARRAYSPROC glGenVertexArrays = nullptr;
|
PFNGLGENVERTEXARRAYSPROC glGenVertexArrays = nullptr;
|
||||||
PFNGLGETBUFFERPARAMETERIVPROC glGetBufferParameteriv = nullptr;
|
PFNGLGETBUFFERPARAMETERIVPROC glGetBufferParameteriv = nullptr;
|
||||||
PFNGLGETDEBUGMESSAGELOGARBPROC glGetDebugMessageLog = nullptr;
|
PFNGLGETDEBUGMESSAGELOGPROC glGetDebugMessageLog = nullptr;
|
||||||
PFNGLGETERRORPROC glGetError = nullptr;
|
PFNGLGETERRORPROC glGetError = nullptr;
|
||||||
PFNGLGETINTEGERVPROC glGetIntegerv = nullptr;
|
PFNGLGETINTEGERVPROC glGetIntegerv = nullptr;
|
||||||
PFNGLGETPROGRAMIVPROC glGetProgramiv = nullptr;
|
PFNGLGETPROGRAMIVPROC glGetProgramiv = nullptr;
|
||||||
PFNGLGETPROGRAMINFOLOGPROC glGetProgramInfoLog = nullptr;
|
PFNGLGETPROGRAMINFOLOGPROC glGetProgramInfoLog = nullptr;
|
||||||
PFNGLGETQUERYIVPROC glGetQueryiv = nullptr;
|
PFNGLGETQUERYIVPROC glGetQueryiv = nullptr;
|
||||||
PFNGLGETQUERYOBJECTIVPROC glGetQueryObjectiv = nullptr;
|
PFNGLGETQUERYOBJECTIVPROC glGetQueryObjectiv = nullptr;
|
||||||
PFNGLGETQUERYOBJECTUIVPROC glGetQueryObjectuiv = nullptr;
|
PFNGLGETQUERYOBJECTUIVPROC glGetQueryObjectuiv = nullptr;
|
||||||
PFNGLGETSHADERINFOLOGPROC glGetShaderInfoLog = nullptr;
|
PFNGLGETSHADERINFOLOGPROC glGetShaderInfoLog = nullptr;
|
||||||
PFNGLGETSHADERIVPROC glGetShaderiv = nullptr;
|
PFNGLGETSHADERIVPROC glGetShaderiv = nullptr;
|
||||||
PFNGLGETSHADERSOURCEPROC glGetShaderSource = nullptr;
|
PFNGLGETSHADERSOURCEPROC glGetShaderSource = nullptr;
|
||||||
PFNGLGETSTRINGPROC glGetString = nullptr;
|
PFNGLGETSTRINGPROC glGetString = nullptr;
|
||||||
PFNGLGETSTRINGIPROC glGetStringi = nullptr;
|
PFNGLGETSTRINGIPROC glGetStringi = nullptr;
|
||||||
PFNGLGETTEXIMAGEPROC glGetTexImage = nullptr;
|
PFNGLGETTEXIMAGEPROC glGetTexImage = nullptr;
|
||||||
PFNGLGETTEXLEVELPARAMETERFVPROC glGetTexLevelParameterfv = nullptr;
|
PFNGLGETTEXLEVELPARAMETERFVPROC glGetTexLevelParameterfv = nullptr;
|
||||||
PFNGLGETTEXLEVELPARAMETERIVPROC glGetTexLevelParameteriv = nullptr;
|
PFNGLGETTEXLEVELPARAMETERIVPROC glGetTexLevelParameteriv = nullptr;
|
||||||
PFNGLGETTEXPARAMETERFVPROC glGetTexParameterfv = nullptr;
|
PFNGLGETTEXPARAMETERFVPROC glGetTexParameterfv = nullptr;
|
||||||
PFNGLGETTEXPARAMETERIVPROC glGetTexParameteriv = nullptr;
|
PFNGLGETTEXPARAMETERIVPROC glGetTexParameteriv = nullptr;
|
||||||
PFNGLGETUNIFORMLOCATIONPROC glGetUniformLocation = nullptr;
|
PFNGLGETUNIFORMLOCATIONPROC glGetUniformLocation = nullptr;
|
||||||
PFNGLLINKPROGRAMPROC glLinkProgram = nullptr;
|
PFNGLLINKPROGRAMPROC glLinkProgram = nullptr;
|
||||||
PFNGLMAPBUFFERPROC glMapBuffer = nullptr;
|
PFNGLMAPBUFFERPROC glMapBuffer = nullptr;
|
||||||
PFNGLMAPBUFFERRANGEPROC glMapBufferRange = nullptr;
|
PFNGLMAPBUFFERRANGEPROC glMapBufferRange = nullptr;
|
||||||
PFNGLPIXELSTOREIPROC glPixelStorei = nullptr;
|
PFNGLPIXELSTOREIPROC glPixelStorei = nullptr;
|
||||||
PFNGLPOLYGONMODEPROC glPolygonMode = nullptr;
|
PFNGLPOLYGONMODEPROC glPolygonMode = nullptr;
|
||||||
PFNGLPROGRAMUNIFORM1DPROC glProgramUniform1d = nullptr;
|
PFNGLPROGRAMUNIFORM1DPROC glProgramUniform1d = nullptr;
|
||||||
PFNGLPROGRAMUNIFORM1FPROC glProgramUniform1f = nullptr;
|
PFNGLPROGRAMUNIFORM1FPROC glProgramUniform1f = nullptr;
|
||||||
PFNGLPROGRAMUNIFORM1IPROC glProgramUniform1i = nullptr;
|
PFNGLPROGRAMUNIFORM1IPROC glProgramUniform1i = nullptr;
|
||||||
PFNGLPROGRAMUNIFORM2DVPROC glProgramUniform2dv = nullptr;
|
PFNGLPROGRAMUNIFORM2DVPROC glProgramUniform2dv = nullptr;
|
||||||
PFNGLPROGRAMUNIFORM2FVPROC glProgramUniform2fv = nullptr;
|
PFNGLPROGRAMUNIFORM2FVPROC glProgramUniform2fv = nullptr;
|
||||||
PFNGLPROGRAMUNIFORM3DVPROC glProgramUniform3dv = nullptr;
|
PFNGLPROGRAMUNIFORM3DVPROC glProgramUniform3dv = nullptr;
|
||||||
PFNGLPROGRAMUNIFORM3FVPROC glProgramUniform3fv = nullptr;
|
PFNGLPROGRAMUNIFORM3FVPROC glProgramUniform3fv = nullptr;
|
||||||
PFNGLPROGRAMUNIFORM4DVPROC glProgramUniform4dv = nullptr;
|
PFNGLPROGRAMUNIFORM4DVPROC glProgramUniform4dv = nullptr;
|
||||||
PFNGLPROGRAMUNIFORM4FVPROC glProgramUniform4fv = nullptr;
|
PFNGLPROGRAMUNIFORM4FVPROC glProgramUniform4fv = nullptr;
|
||||||
PFNGLPROGRAMUNIFORMMATRIX4DVPROC glProgramUniformMatrix4dv = nullptr;
|
PFNGLPROGRAMUNIFORMMATRIX4DVPROC glProgramUniformMatrix4dv = nullptr;
|
||||||
PFNGLPROGRAMUNIFORMMATRIX4FVPROC glProgramUniformMatrix4fv = nullptr;
|
PFNGLPROGRAMUNIFORMMATRIX4FVPROC glProgramUniformMatrix4fv = nullptr;
|
||||||
PFNGLREADPIXELSPROC glReadPixels = nullptr;
|
PFNGLREADPIXELSPROC glReadPixels = nullptr;
|
||||||
PFNGLRENDERBUFFERSTORAGEPROC glRenderbufferStorage = nullptr;
|
PFNGLRENDERBUFFERSTORAGEPROC glRenderbufferStorage = nullptr;
|
||||||
PFNGLSCISSORPROC glScissor = nullptr;
|
PFNGLSCISSORPROC glScissor = nullptr;
|
||||||
PFNGLSHADERSOURCEPROC glShaderSource = nullptr;
|
PFNGLSHADERSOURCEPROC glShaderSource = nullptr;
|
||||||
PFNGLSTENCILFUNCPROC glStencilFunc = nullptr;
|
PFNGLSTENCILFUNCPROC glStencilFunc = nullptr;
|
||||||
PFNGLSTENCILOPPROC glStencilOp = nullptr;
|
PFNGLSTENCILOPPROC glStencilOp = nullptr;
|
||||||
PFNGLTEXIMAGE1DPROC glTexImage1D = nullptr;
|
PFNGLTEXIMAGE1DPROC glTexImage1D = nullptr;
|
||||||
PFNGLTEXIMAGE2DPROC glTexImage2D = nullptr;
|
PFNGLTEXIMAGE2DPROC glTexImage2D = nullptr;
|
||||||
PFNGLTEXIMAGE3DPROC glTexImage3D = nullptr;
|
PFNGLTEXIMAGE3DPROC glTexImage3D = nullptr;
|
||||||
PFNGLTEXPARAMETERFPROC glTexParameterf = nullptr;
|
PFNGLTEXPARAMETERFPROC glTexParameterf = nullptr;
|
||||||
PFNGLTEXPARAMETERIPROC glTexParameteri = nullptr;
|
PFNGLTEXPARAMETERIPROC glTexParameteri = nullptr;
|
||||||
PFNGLTEXSTORAGE1DPROC glTexStorage1D = nullptr;
|
PFNGLTEXSTORAGE1DPROC glTexStorage1D = nullptr;
|
||||||
PFNGLTEXSTORAGE2DPROC glTexStorage2D = nullptr;
|
PFNGLTEXSTORAGE2DPROC glTexStorage2D = nullptr;
|
||||||
PFNGLTEXSTORAGE3DPROC glTexStorage3D = nullptr;
|
PFNGLTEXSTORAGE3DPROC glTexStorage3D = nullptr;
|
||||||
PFNGLTEXSUBIMAGE1DPROC glTexSubImage1D = nullptr;
|
PFNGLTEXSUBIMAGE1DPROC glTexSubImage1D = nullptr;
|
||||||
PFNGLTEXSUBIMAGE2DPROC glTexSubImage2D = nullptr;
|
PFNGLTEXSUBIMAGE2DPROC glTexSubImage2D = nullptr;
|
||||||
PFNGLTEXSUBIMAGE3DPROC glTexSubImage3D = nullptr;
|
PFNGLTEXSUBIMAGE3DPROC glTexSubImage3D = nullptr;
|
||||||
PFNGLUNIFORM1DPROC glUniform1d = nullptr;
|
PFNGLUNIFORM1DPROC glUniform1d = nullptr;
|
||||||
PFNGLUNIFORM1FPROC glUniform1f = nullptr;
|
PFNGLUNIFORM1FPROC glUniform1f = nullptr;
|
||||||
PFNGLUNIFORM1IPROC glUniform1i = nullptr;
|
PFNGLUNIFORM1IPROC glUniform1i = nullptr;
|
||||||
PFNGLUNIFORM2DVPROC glUniform2dv = nullptr;
|
PFNGLUNIFORM2DVPROC glUniform2dv = nullptr;
|
||||||
PFNGLUNIFORM2FVPROC glUniform2fv = nullptr;
|
PFNGLUNIFORM2FVPROC glUniform2fv = nullptr;
|
||||||
PFNGLUNIFORM3DVPROC glUniform3dv = nullptr;
|
PFNGLUNIFORM3DVPROC glUniform3dv = nullptr;
|
||||||
PFNGLUNIFORM3FVPROC glUniform3fv = nullptr;
|
PFNGLUNIFORM3FVPROC glUniform3fv = nullptr;
|
||||||
PFNGLUNIFORM4DVPROC glUniform4dv = nullptr;
|
PFNGLUNIFORM4DVPROC glUniform4dv = nullptr;
|
||||||
PFNGLUNIFORM4FVPROC glUniform4fv = nullptr;
|
PFNGLUNIFORM4FVPROC glUniform4fv = nullptr;
|
||||||
PFNGLUNIFORMMATRIX4DVPROC glUniformMatrix4dv = nullptr;
|
PFNGLUNIFORMMATRIX4DVPROC glUniformMatrix4dv = nullptr;
|
||||||
PFNGLUNIFORMMATRIX4FVPROC glUniformMatrix4fv = nullptr;
|
PFNGLUNIFORMMATRIX4FVPROC glUniformMatrix4fv = nullptr;
|
||||||
PFNGLUNMAPBUFFERPROC glUnmapBuffer = nullptr;
|
PFNGLUNMAPBUFFERPROC glUnmapBuffer = nullptr;
|
||||||
PFNGLUSEPROGRAMPROC glUseProgram = nullptr;
|
PFNGLUSEPROGRAMPROC glUseProgram = nullptr;
|
||||||
PFNGLVERTEXATTRIB4FPROC glVertexAttrib4f = nullptr;
|
PFNGLVERTEXATTRIB4FPROC glVertexAttrib4f = nullptr;
|
||||||
PFNGLVERTEXATTRIBPOINTERPROC glVertexAttribPointer = nullptr;
|
PFNGLVERTEXATTRIBPOINTERPROC glVertexAttribPointer = nullptr;
|
||||||
PFNGLVIEWPORTPROC glViewport = nullptr;
|
PFNGLVIEWPORTPROC glViewport = nullptr;
|
||||||
#if defined(NAZARA_PLATFORM_WINDOWS)
|
#if defined(NAZARA_PLATFORM_WINDOWS)
|
||||||
PFNWGLCHOOSEPIXELFORMATARBPROC wglChoosePixelFormat = nullptr;
|
PFNWGLCHOOSEPIXELFORMATARBPROC wglChoosePixelFormat = nullptr;
|
||||||
PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribs = nullptr;
|
PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribs = nullptr;
|
||||||
PFNWGLGETEXTENSIONSSTRINGARBPROC wglGetExtensionsStringARB = nullptr;
|
PFNWGLGETEXTENSIONSSTRINGARBPROC wglGetExtensionsStringARB = nullptr;
|
||||||
PFNWGLGETEXTENSIONSSTRINGEXTPROC wglGetExtensionsStringEXT = nullptr;
|
PFNWGLGETEXTENSIONSSTRINGEXTPROC wglGetExtensionsStringEXT = nullptr;
|
||||||
PFNWGLSWAPINTERVALEXTPROC wglSwapInterval = nullptr;
|
PFNWGLSWAPINTERVALEXTPROC wglSwapInterval = nullptr;
|
||||||
#elif defined(NAZARA_PLATFORM_LINUX)
|
#elif defined(NAZARA_PLATFORM_LINUX)
|
||||||
PFNGLXCREATECONTEXTATTRIBSARBPROC glXCreateContextAttribs = nullptr;
|
PFNGLXCREATECONTEXTATTRIBSARBPROC glXCreateContextAttribs = nullptr;
|
||||||
PFNGLXSWAPINTERVALSGIPROC glXSwapInterval = nullptr;
|
PFNGLXSWAPINTERVALSGIPROC glXSwapInterval = nullptr;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ m_parent(parent)
|
||||||
#ifdef NAZARA_DEBUG
|
#ifdef NAZARA_DEBUG
|
||||||
if (!m_parent)
|
if (!m_parent)
|
||||||
{
|
{
|
||||||
NazaraError("Parent mesh is null");
|
NazaraError("Parent mesh must be valid");
|
||||||
throw std::invalid_argument("Parent mesh must be valid");
|
throw std::invalid_argument("Parent mesh must be valid");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -30,7 +30,7 @@ void NzSubMesh::Animate(unsigned int frameA, unsigned int frameB, float interpol
|
||||||
#if NAZARA_UTILITY_SAFE
|
#if NAZARA_UTILITY_SAFE
|
||||||
if (!m_parent->HasAnimation())
|
if (!m_parent->HasAnimation())
|
||||||
{
|
{
|
||||||
NazaraError("SubMesh is not animated");
|
NazaraError("SubMesh has no animation");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue