From 48a06f730fc5225e57b20a4c1b8ff49bd6e1aaa7 Mon Sep 17 00:00:00 2001 From: George Marques Date: Sat, 3 Sep 2016 19:25:43 -0300 Subject: [PATCH 1/8] Implement missing WinRT functions - Fix buildsystem for WinRT/UWP platform. - Add audio driver and joystick mapping for WinRT. - Enable thread class for WinRT. - Refactor MSVC compiler architecture detection to methods.py, so it can be used by Windows and WinRT. --- main/input_default.cpp | 4 + methods.py | 71 ++++ platform/windows/detect.py | 324 +++++++++++------- platform/winrt/SCsub | 12 +- platform/winrt/app.cpp | 306 +++++++++++++++-- platform/winrt/app.h | 127 ++++--- platform/winrt/audio_driver_winrt.cpp | 244 ++++++++++++++ platform/winrt/audio_driver_winrt.h | 109 ++++++ platform/winrt/detect.py | 199 +++++------ platform/winrt/gl_context_egl.cpp | 25 +- platform/winrt/gl_context_egl.h | 5 + platform/winrt/joystick_winrt.cpp | 146 ++++++++ platform/winrt/joystick_winrt.h | 81 +++++ platform/winrt/os_winrt.cpp | 460 +++++++++++++++++++++----- platform/winrt/os_winrt.h | 123 ++++--- platform/winrt/thread_winrt.cpp | 6 +- 16 files changed, 1814 insertions(+), 428 deletions(-) create mode 100644 platform/winrt/audio_driver_winrt.cpp create mode 100644 platform/winrt/audio_driver_winrt.h create mode 100644 platform/winrt/joystick_winrt.cpp create mode 100644 platform/winrt/joystick_winrt.h diff --git a/main/input_default.cpp b/main/input_default.cpp index b9bc69f91bf..7e81aa6b940 100644 --- a/main/input_default.cpp +++ b/main/input_default.cpp @@ -741,6 +741,10 @@ static const char *s_ControllerMappings[] = { "303534632d303563342d576972656c65,PS4 Controller USB/Win,leftx:a0,lefty:a1,dpdown:b15,rightstick:b11,rightshoulder:b5,rightx:a2,start:b9,righty:a5,lefttrigger:a3,x:b0,dpup:b14,dpleft:b16,dpright:b17,back:b8,leftstick:b10,leftshoulder:b4,y:b3,a:b1,righttrigger:b7,b:b2,", "c2a94d6963726f736f66742058626f78,Wireless X360 Controller,leftx:a0,lefty:a1,dpdown:b14,rightstick:b10,rightshoulder:b5,rightx:a3,start:b7,righty:a4,dpleft:b11,lefttrigger:a2,x:b2,dpup:b13,back:b6,leftstick:b9,leftshoulder:b4,y:b3,a:b0,dpright:b12,righttrigger:a5,b:b1,", #endif + +#ifdef WINRT_ENABLED + "__WINRT_GAMEPAD__,Xbox Controller,a:b2,b:b3,x:b4,y:b5,start:b0,back:b1,leftstick:b12,rightstick:b13,leftshoulder:b10,rightshoulder:b11,dpup:b6,dpdown:b7,dpleft:b8,dpright:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,", +#endif NULL }; diff --git a/methods.py b/methods.py index 5dcbf8b96e6..949bc8dd4f8 100755 --- a/methods.py +++ b/methods.py @@ -1441,6 +1441,7 @@ def save_active_platforms(apnames, ap): for x in ap: pth = x + "/logo.png" # print("open path: "+pth) +<<<<<<< HEAD pngf = open(pth, "rb") b = pngf.read(1) str = " /* AUTOGENERATED FILE, DO NOT EDIT */ \n" @@ -1492,3 +1493,73 @@ def no_verbose(sys, env): env.Append(LINKCOMSTR=[link_program_message]) env.Append(JARCOMSTR=[java_library_message]) env.Append(JAVACCOMSTR=[java_compile_source_message]) + +def detect_visual_c_compiler_version(tools_env): + # tools_env is the variable scons uses to call tools that execute tasks, SCons's env['ENV'] that executes tasks... + # (see the SCons documentation for more information on what it does)... + # in order for this function to be well encapsulated i choose to force it to recieve SCons's TOOLS env (env['ENV'] + # and not scons setup environment (env)... so make sure you call the right environment on it or it will fail to detect + # the propper vc version that will be called + + # These is no flag to give to visual c compilers to set the architecture, ie scons bits argument (32,64,ARM etc) + # There are many different cl.exe files that are run, and each one compiles & links to a different architecture + # As far as I know, the only way to figure out what compiler will be run when Scons calls cl.exe via Program() + # is to check the PATH varaible and figure out which one will be called first. Code bellow does that and returns: + # the following string values: + + # "" Compiler not detected + # "amd64" Native 64 bit compiler + # "amd64_x86" 64 bit Cross Compiler for 32 bit + # "x86" Native 32 bit compiler + # "x86_amd64" 32 bit Cross Compiler for 64 bit + + # There are other architectures, but Godot does not support them currently, so this function does not detect arm/amd64_arm + # and similar architectures/compilers + + # Set chosen compiler to "not detected" + vc_chosen_compiler_index = -1 + vc_chosen_compiler_str = "" + + # find() works with -1 so big ifs bellow are needed... the simplest solution, in fact + # First test if amd64 and amd64_x86 compilers are present in the path + vc_amd64_compiler_detection_index = tools_env["PATH"].find(tools_env["VCINSTALLDIR"]+"BIN\\amd64;") + if(vc_amd64_compiler_detection_index > -1): + vc_chosen_compiler_index = vc_amd64_compiler_detection_index + vc_chosen_compiler_str = "amd64" + + vc_amd64_x86_compiler_detection_index = tools_env["PATH"].find(tools_env["VCINSTALLDIR"]+"BIN\\amd64_x86;") + if(vc_amd64_x86_compiler_detection_index > -1 + and (vc_chosen_compiler_index == -1 + or vc_chosen_compiler_index > vc_amd64_x86_compiler_detection_index)): + vc_chosen_compiler_index = vc_amd64_x86_compiler_detection_index + vc_chosen_compiler_str = "amd64_x86" + + + # Now check the 32 bit compilers + vc_x86_compiler_detection_index = tools_env["PATH"].find(tools_env["VCINSTALLDIR"]+"BIN;") + if(vc_x86_compiler_detection_index > -1 + and (vc_chosen_compiler_index == -1 + or vc_chosen_compiler_index > vc_x86_compiler_detection_index)): + vc_chosen_compiler_index = vc_x86_compiler_detection_index + vc_chosen_compiler_str = "x86" + + vc_x86_amd64_compiler_detection_index = tools_env["PATH"].find(tools_env['VCINSTALLDIR']+"BIN\\x86_amd64;") + if(vc_x86_amd64_compiler_detection_index > -1 + and (vc_chosen_compiler_index == -1 + or vc_chosen_compiler_index > vc_x86_amd64_compiler_detection_index)): + vc_chosen_compiler_index = vc_x86_amd64_compiler_detection_index + vc_chosen_compiler_str = "x86_amd64" + + # debug help + #print vc_amd64_compiler_detection_index + #print vc_amd64_x86_compiler_detection_index + #print vc_x86_compiler_detection_index + #print vc_x86_amd64_compiler_detection_index + #print "chosen "+str(vc_chosen_compiler_index)+ " | "+str(vc_chosen_compiler_str) + + return vc_chosen_compiler_str + +def precious_program(env, program, sources, **args): + program = env.ProgramOriginal(program, sources, **args) + env.Precious(program) + return program diff --git a/platform/windows/detect.py b/platform/windows/detect.py index 4b9066f4171..3938f5a1551 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -1,95 +1,96 @@ # -# tested on | Windows native | Linux cross-compilation -# ------------------------+-------------------+--------------------------- -# MSVS C++ 2010 Express | WORKS | n/a -# Mingw-w64 | WORKS | WORKS -# Mingw-w32 | WORKS | WORKS -# MinGW | WORKS | untested +# tested on | Windows native | Linux cross-compilation +# ------------------------+-------------------+--------------------------- +# MSVS C++ 2010 Express | WORKS | n/a +# Mingw-w64 | WORKS | WORKS +# Mingw-w32 | WORKS | WORKS +# MinGW | WORKS | untested # ##### # Notes about MSVS C++ : # -# - MSVC2010-Express compiles to 32bits only. +# - MSVC2010-Express compiles to 32bits only. # ##### # Notes about Mingw-w64 and Mingw-w32 under Windows : # -# - both can be installed using the official installer : -# http://mingw-w64.sourceforge.net/download.php#mingw-builds +# - both can be installed using the official installer : +# http://mingw-w64.sourceforge.net/download.php#mingw-builds # -# - if you want to compile both 32bits and 64bits, don't forget to -# run the installer twice to install them both. +# - if you want to compile both 32bits and 64bits, don't forget to +# run the installer twice to install them both. # -# - install them into a path that does not contain spaces -# ( example : "C:/Mingw-w32", "C:/Mingw-w64" ) +# - install them into a path that does not contain spaces +# ( example : "C:/Mingw-w32", "C:/Mingw-w64" ) # -# - if you want to compile faster using the "-j" option, don't forget -# to install the appropriate version of the Pywin32 python extension -# available from : http://sourceforge.net/projects/pywin32/files/ +# - if you want to compile faster using the "-j" option, don't forget +# to install the appropriate version of the Pywin32 python extension +# available from : http://sourceforge.net/projects/pywin32/files/ # -# - before running scons, you must add into the environment path -# the path to the "/bin" directory of the Mingw version you want -# to use : +# - before running scons, you must add into the environment path +# the path to the "/bin" directory of the Mingw version you want +# to use : # -# set PATH=C:/Mingw-w32/bin;%PATH% +# set PATH=C:/Mingw-w32/bin;%PATH% # -# - then, scons should be able to detect gcc. -# - Mingw-w32 only compiles 32bits. -# - Mingw-w64 only compiles 64bits. +# - then, scons should be able to detect gcc. +# - Mingw-w32 only compiles 32bits. +# - Mingw-w64 only compiles 64bits. # -# - it is possible to add them both at the same time into the PATH env, -# if you also define the MINGW32_PREFIX and MINGW64_PREFIX environment -# variables. -# For instance, you could store that set of commands into a .bat script -# that you would run just before scons : +# - it is possible to add them both at the same time into the PATH env, +# if you also define the MINGW32_PREFIX and MINGW64_PREFIX environment +# variables. +# For instance, you could store that set of commands into a .bat script +# that you would run just before scons : # -# set PATH=C:\mingw-w32\bin;%PATH% -# set PATH=C:\mingw-w64\bin;%PATH% -# set MINGW32_PREFIX=C:\mingw-w32\bin\ -# set MINGW64_PREFIX=C:\mingw-w64\bin\ +# set PATH=C:\mingw-w32\bin;%PATH% +# set PATH=C:\mingw-w64\bin;%PATH% +# set MINGW32_PREFIX=C:\mingw-w32\bin\ +# set MINGW64_PREFIX=C:\mingw-w64\bin\ # ##### # Notes about Mingw, Mingw-w64 and Mingw-w32 under Linux : # -# - default toolchain prefixes are : -# "i586-mingw32msvc-" for MinGW -# "i686-w64-mingw32-" for Mingw-w32 -# "x86_64-w64-mingw32-" for Mingw-w64 +# - default toolchain prefixes are : +# "i586-mingw32msvc-" for MinGW +# "i686-w64-mingw32-" for Mingw-w32 +# "x86_64-w64-mingw32-" for Mingw-w64 # -# - if both MinGW and Mingw-w32 are installed on your system -# Mingw-w32 should take the priority over MinGW. +# - if both MinGW and Mingw-w32 are installed on your system +# Mingw-w32 should take the priority over MinGW. # -# - it is possible to manually override prefixes by defining -# the MINGW32_PREFIX and MINGW64_PREFIX environment variables. +# - it is possible to manually override prefixes by defining +# the MINGW32_PREFIX and MINGW64_PREFIX environment variables. # ##### # Notes about Mingw under Windows : # -# - this is the MinGW version from http://mingw.org/ -# - install it into a path that does not contain spaces -# ( example : "C:/MinGW" ) -# - several DirectX headers might be missing. You can copy them into -# the C:/MinGW/include" directory from this page : -# https://code.google.com/p/mingw-lib/source/browse/trunk/working/avcodec_to_widget_5/directx_include/ -# - before running scons, add the path to the "/bin" directory : -# set PATH=C:/MinGW/bin;%PATH% -# - scons should be able to detect gcc. +# - this is the MinGW version from http://mingw.org/ +# - install it into a path that does not contain spaces +# ( example : "C:/MinGW" ) +# - several DirectX headers might be missing. You can copy them into +# the C:/MinGW/include" directory from this page : +# https://code.google.com/p/mingw-lib/source/browse/trunk/working/avcodec_to_widget_5/directx_include/ +# - before running scons, add the path to the "/bin" directory : +# set PATH=C:/MinGW/bin;%PATH% +# - scons should be able to detect gcc. # ##### # TODO : # -# - finish to cleanup this script to remove all the remains of previous hacks and workarounds -# - make it work with the Windows7 SDK that is supposed to enable 64bits compilation for MSVC2010-Express -# - confirm it works well with other Visual Studio versions. -# - update the wiki about the pywin32 extension required for the "-j" option under Windows. -# - update the wiki to document MINGW32_PREFIX and MINGW64_PREFIX +# - finish to cleanup this script to remove all the remains of previous hacks and workarounds +# - make it work with the Windows7 SDK that is supposed to enable 64bits compilation for MSVC2010-Express +# - confirm it works well with other Visual Studio versions. +# - update the wiki about the pywin32 extension required for the "-j" option under Windows. +# - update the wiki to document MINGW32_PREFIX and MINGW64_PREFIX # import os import sys +import methods def is_active(): return True @@ -97,6 +98,156 @@ def is_active(): def get_name(): return "Windows" + if (os.getenv("MINGW32_PREFIX")): + mingw32=os.getenv("MINGW32_PREFIX") + mingw = mingw32 + if (os.getenv("MINGW64_PREFIX")): + mingw64=os.getenv("MINGW64_PREFIX") + + + return [ + ('mingw_prefix','Mingw Prefix',mingw32), + ('mingw_prefix_64','Mingw Prefix 64 bits',mingw64), + ] + +def get_flags(): + + return [ + ('glew','yes'), + ('openssl','builtin'), #use builtin openssl + ] + +def build_res_file( target, source, env ): + + cmdbase = "" + if (env["bits"] == "32"): + cmdbase = env['mingw_prefix'] + else: + cmdbase = env['mingw_prefix_64'] + CPPPATH = env['CPPPATH'] + cmdbase = cmdbase + 'windres --include-dir . ' + import subprocess + for x in range(len(source)): + cmd = cmdbase + '-i ' + str(source[x]) + ' -o ' + str(target[x]) + try: + out = subprocess.Popen(cmd,shell = True,stderr = subprocess.PIPE).communicate() + if len(out[1]): + return 1 + except: + return 1 + return 0 + +def configure(env): + + env.Append(CPPPATH=['#platform/windows']) + env['is_mingw']=False + if (os.name=="nt" and os.getenv("VSINSTALLDIR")!=None): + #build using visual studio + env['ENV']['TMP'] = os.environ['TMP'] + env.Append(CPPPATH=['#platform/windows/include']) + env.Append(LIBPATH=['#platform/windows/lib']) + + + if (env["target"]=="release"): + + env.Append(CCFLAGS=['/O2']) + env.Append(LINKFLAGS=['/SUBSYSTEM:WINDOWS']) + env.Append(LINKFLAGS=['/ENTRY:mainCRTStartup']) + + elif (env["target"]=="release_debug"): + + env.Append(CCFLAGS=['/O2','/DDEBUG_ENABLED']) + env.Append(LINKFLAGS=['/SUBSYSTEM:CONSOLE']) + elif (env["target"]=="debug_release"): + + env.Append(CCFLAGS=['/Z7','/Od']) + env.Append(LINKFLAGS=['/DEBUG']) + env.Append(LINKFLAGS=['/SUBSYSTEM:WINDOWS']) + env.Append(LINKFLAGS=['/ENTRY:mainCRTStartup']) + + elif (env["target"]=="debug"): + + env.Append(CCFLAGS=['/Z7','/DDEBUG_ENABLED','/DDEBUG_MEMORY_ENABLED','/DD3D_DEBUG_INFO','/Od']) + env.Append(LINKFLAGS=['/SUBSYSTEM:CONSOLE']) + env.Append(LINKFLAGS=['/DEBUG']) + + + env.Append(CCFLAGS=['/MT','/Gd','/GR','/nologo']) + env.Append(CXXFLAGS=['/TP']) + env.Append(CPPFLAGS=['/DMSVC', '/GR', ]) + env.Append(CCFLAGS=['/I'+os.getenv("WindowsSdkDir")+"/Include"]) + env.Append(CCFLAGS=['/DWINDOWS_ENABLED']) + env.Append(CCFLAGS=['/DRTAUDIO_ENABLED']) + env.Append(CCFLAGS=['/DWIN32']) + env.Append(CCFLAGS=['/DTYPED_METHOD_BIND']) + + env.Append(CCFLAGS=['/DGLES2_ENABLED']) + LIBS=['winmm','opengl32','dsound','kernel32','ole32','oleaut32','user32','gdi32', 'IPHLPAPI','Shlwapi', 'wsock32','Ws2_32', 'shell32','advapi32','dinput8','dxguid'] + env.Append(LINKFLAGS=[p+env["LIBSUFFIX"] for p in LIBS]) + + env.Append(LIBPATH=[os.getenv("WindowsSdkDir")+"/Lib"]) + if (os.getenv("DXSDK_DIR")): + DIRECTX_PATH=os.getenv("DXSDK_DIR") + else: + DIRECTX_PATH="C:/Program Files/Microsoft DirectX SDK (March 2009)" + + if (os.getenv("VCINSTALLDIR")): + VC_PATH=os.getenv("VCINSTALLDIR") + else: + VC_PATH="" + + env.Append(CCFLAGS=["/I" + p for p in os.getenv("INCLUDE").split(";")]) + env.Append(LIBPATH=[p for p in os.getenv("LIB").split(";")]) + env.Append(CCFLAGS=["/I"+DIRECTX_PATH+"/Include"]) + env.Append(LIBPATH=[DIRECTX_PATH+"/Lib/x86"]) + env['ENV'] = os.environ; + + # This detection function needs the tools env (that is env['ENV'], not SCons's env), and that is why it's this far bellow in the code + compiler_version_str = methods.detect_visual_c_compiler_version(env['ENV']) + + # Note: this detection/override code from here onward should be here instead of in SConstruct because it's platform and compiler specific (MSVC/Windows) + if(env["bits"] != "default"): + print "Error: bits argument is disabled for MSVC" + print ("Bits argument is not supported for MSVC compilation. Architecture depends on the Native/Cross Compile Tools Prompt/Developer Console (or Visual Studio settings)" + +" that is being used to run SCons. As a consequence, bits argument is disabled. Run scons again without bits argument (example: scons p=windows) and SCons will attempt to detect what MSVC compiler" + +" will be executed and inform you.") + sys.exit() + + # Forcing bits argument because MSVC does not have a flag to set this through SCons... it's different compilers (cl.exe's) called from the propper command prompt + # that decide the architecture that is build for. Scons can only detect the os.getenviron (because vsvarsall.bat sets a lot of stuff for cl.exe to work with) + env["bits"]="32" + env["x86_opt_vc"]=True + + print "Detected MSVC compiler: "+compiler_version_str + # If building for 64bit architecture, disable assembly optimisations for 32 bit builds (theora as of writting)... vc compiler for 64bit can not compile _asm + if(compiler_version_str == "amd64" or compiler_version_str == "x86_amd64"): + env["bits"]="64" + env["x86_opt_vc"]=False + print "Compiled program architecture will be a 64 bit executable (forcing bits=64)." + elif (compiler_version_str=="x86" or compiler_version_str == "amd64_x86"): + print "Compiled program architecture will be a 32 bit executable. (forcing bits=32)." + else: + print "Failed to detect MSVC compiler architecture version... Defaulting to 32bit executable settings (forcing bits=32). Compilation attempt will continue, but SCons can not detect for what architecture this build is compiled for. You should check your settings/compilation setup." + if env["bits"]=="64": + env.Append(CCFLAGS=['/D_WIN64']) + + # Incremental linking fix + env['BUILDERS']['ProgramOriginal'] = env['BUILDERS']['Program'] + env['BUILDERS']['Program'] = methods.precious_program + + else: + + # Workaround for MinGW. See: + # http://www.scons.org/wiki/LongCmdLinesOnWin32 + env.use_windows_spawn_fix() + + #build using mingw + if (os.name=="nt"): + env['ENV']['TMP'] = os.environ['TMP'] #way to go scons, you can be so stupid sometimes + else: + env["PROGSUFFIX"]=env["PROGSUFFIX"]+".exe" # for linux cross-compilation + + mingw_prefix="" def can_build(): @@ -385,68 +536,3 @@ def configure(env): env.Append(BUILDERS={'GLSL': env.Builder(action=methods.build_glsl_headers, suffix='glsl.h', src_suffix='.glsl')}) env.Append(BUILDERS={'HLSL9': env.Builder(action=methods.build_hlsl_dx9_headers, suffix='hlsl.h', src_suffix='.hlsl')}) env.Append(BUILDERS={'GLSL120GLES': env.Builder(action=methods.build_gles2_headers, suffix='glsl.h', src_suffix='.glsl')}) - - -def detect_visual_c_compiler_version(tools_env): - # tools_env is the variable scons uses to call tools that execute tasks, SCons's env['ENV'] that executes tasks... - # (see the SCons documentation for more information on what it does)... - # in order for this function to be well encapsulated i choose to force it to recieve SCons's TOOLS env (env['ENV'] - # and not scons setup environment (env)... so make sure you call the right environment on it or it will fail to detect - # the propper vc version that will be called - - # These is no flag to give to visual c compilers to set the architecture, ie scons bits argument (32,64,ARM etc) - # There are many different cl.exe files that are run, and each one compiles & links to a different architecture - # As far as I know, the only way to figure out what compiler will be run when Scons calls cl.exe via Program() - # is to check the PATH varaible and figure out which one will be called first. Code bellow does that and returns: - # the following string values: - - # "" Compiler not detected - # "amd64" Native 64 bit compiler - # "amd64_x86" 64 bit Cross Compiler for 32 bit - # "x86" Native 32 bit compiler - # "x86_amd64" 32 bit Cross Compiler for 64 bit - - # There are other architectures, but Godot does not support them currently, so this function does not detect arm/amd64_arm - # and similar architectures/compilers - - # Set chosen compiler to "not detected" - vc_chosen_compiler_index = -1 - vc_chosen_compiler_str = "" - - # find() works with -1 so big ifs bellow are needed... the simplest solution, in fact - # First test if amd64 and amd64_x86 compilers are present in the path - vc_amd64_compiler_detection_index = tools_env["PATH"].find(tools_env["VCINSTALLDIR"] + "BIN\\amd64;") - if(vc_amd64_compiler_detection_index > -1): - vc_chosen_compiler_index = vc_amd64_compiler_detection_index - vc_chosen_compiler_str = "amd64" - - vc_amd64_x86_compiler_detection_index = tools_env["PATH"].find(tools_env["VCINSTALLDIR"] + "BIN\\amd64_x86;") - if(vc_amd64_x86_compiler_detection_index > -1 - and (vc_chosen_compiler_index == -1 - or vc_chosen_compiler_index > vc_amd64_x86_compiler_detection_index)): - vc_chosen_compiler_index = vc_amd64_x86_compiler_detection_index - vc_chosen_compiler_str = "amd64_x86" - - # Now check the 32 bit compilers - vc_x86_compiler_detection_index = tools_env["PATH"].find(tools_env["VCINSTALLDIR"] + "BIN;") - if(vc_x86_compiler_detection_index > -1 - and (vc_chosen_compiler_index == -1 - or vc_chosen_compiler_index > vc_x86_compiler_detection_index)): - vc_chosen_compiler_index = vc_x86_compiler_detection_index - vc_chosen_compiler_str = "x86" - - vc_x86_amd64_compiler_detection_index = tools_env["PATH"].find(tools_env['VCINSTALLDIR'] + "BIN\\x86_amd64;") - if(vc_x86_amd64_compiler_detection_index > -1 - and (vc_chosen_compiler_index == -1 - or vc_chosen_compiler_index > vc_x86_amd64_compiler_detection_index)): - vc_chosen_compiler_index = vc_x86_amd64_compiler_detection_index - vc_chosen_compiler_str = "x86_amd64" - - # debug help - # print vc_amd64_compiler_detection_index - # print vc_amd64_x86_compiler_detection_index - # print vc_x86_compiler_detection_index - # print vc_x86_amd64_compiler_detection_index - # print "chosen "+str(vc_chosen_compiler_index)+ " | "+str(vc_chosen_compiler_str) - - return vc_chosen_compiler_str diff --git a/platform/winrt/SCsub b/platform/winrt/SCsub index ad1a89c0b95..502ec2d0c91 100644 --- a/platform/winrt/SCsub +++ b/platform/winrt/SCsub @@ -4,10 +4,18 @@ Import('env') files = [ 'thread_winrt.cpp', - # '#platform/windows/stream_peer_winsock.cpp', + '#platform/windows/tcp_server_winsock.cpp', + '#platform/windows/packet_peer_udp_winsock.cpp', + '#platform/windows/stream_peer_winsock.cpp', + '#platform/windows/key_mapping_win.cpp', + 'joystick_winrt.cpp', 'gl_context_egl.cpp', + 'audio_driver_winrt.cpp', 'app.cpp', 'os_winrt.cpp', ] -env.Program('#bin/godot', files) +cmd = env.AlwaysBuild(env.ANGLE('libANGLE.lib', None)) + +prog = env.Program('#bin/godot', files) +env.Depends(prog, [cmd]) diff --git a/platform/winrt/app.cpp b/platform/winrt/app.cpp index 2421c38bac9..4211976a749 100644 --- a/platform/winrt/app.cpp +++ b/platform/winrt/app.cpp @@ -35,18 +35,25 @@ #include "core/os/dir_access.h" #include "core/os/file_access.h" -#include "main/main.h" +#include "core/os/keyboard.h" + +#include "platform/windows/key_mapping_win.h" + +#include using namespace Windows::ApplicationModel::Core; using namespace Windows::ApplicationModel::Activation; using namespace Windows::UI::Core; using namespace Windows::UI::Input; +using namespace Windows::Devices::Input; +using namespace Windows::UI::Xaml::Input; using namespace Windows::Foundation; using namespace Windows::Graphics::Display; +using namespace Windows::System; +using namespace Windows::System::Threading::Core; using namespace Microsoft::WRL; -using namespace Platform; -using namespace $ext_safeprojectname$; +using namespace GodotWinRT; // Helper to convert a length in device-independent pixels (DIPs) to a length in physical pixels. inline float ConvertDipsToPixels(float dips, float dpi) { @@ -55,7 +62,8 @@ inline float ConvertDipsToPixels(float dips, float dpi) { } // Implementation of the IFrameworkViewSource interface, necessary to run our app. -ref class HelloTriangleApplicationSource sealed : Windows::ApplicationModel::Core::IFrameworkViewSource { +ref class GodotWinrtViewSource sealed : Windows::ApplicationModel::Core::IFrameworkViewSource +{ public: virtual Windows::ApplicationModel::Core::IFrameworkView ^ CreateView() { return ref new App(); @@ -63,20 +71,24 @@ public: }; // The main function creates an IFrameworkViewSource for our app, and runs the app. -[Platform::MTAThread] int main(Platform::Array ^) { - auto helloTriangleApplicationSource = ref new HelloTriangleApplicationSource(); - CoreApplication::Run(helloTriangleApplicationSource); +[Platform::MTAThread] +int main(Platform::Array^) +{ + auto godotApplicationSource = ref new GodotWinrtViewSource(); + CoreApplication::Run(godotApplicationSource); return 0; } -App::App() - : mWindowClosed(false), - mWindowVisible(true), - mWindowWidth(0), - mWindowHeight(0), - mEglDisplay(EGL_NO_DISPLAY), - mEglContext(EGL_NO_CONTEXT), - mEglSurface(EGL_NO_SURFACE) { +App::App() : + mWindowClosed(false), + mWindowVisible(true), + mWindowWidth(0), + mWindowHeight(0), + mEglDisplay(EGL_NO_DISPLAY), + mEglContext(EGL_NO_CONTEXT), + mEglSurface(EGL_NO_SURFACE), + number_of_contacts(0) +{ } // The first method called when the IFrameworkView is being created. @@ -91,6 +103,7 @@ void App::Initialize(CoreApplicationView ^ applicationView) { // http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh994930.aspx os = new OSWinrt; + } // Called when the CoreWindow object is created (or re-created). @@ -114,19 +127,32 @@ void App::SetWindow(CoreWindow ^ p_window) { #endif window->PointerPressed += - ref new TypedEventHandler(this, &App::OnPointerPressed); - + ref new TypedEventHandler(this, &App::OnPointerPressed); window->PointerMoved += - ref new TypedEventHandler(this, &App::OnPointerMoved); - + ref new TypedEventHandler(this, &App::OnPointerMoved); window->PointerReleased += - ref new TypedEventHandler(this, &App::OnPointerReleased); + ref new TypedEventHandler(this, &App::OnPointerReleased); + window->PointerWheelChanged += + ref new TypedEventHandler(this, &App::OnPointerWheelChanged); - //window->PointerWheelChanged += - // ref new TypedEventHandler(this, &App::OnPointerWheelChanged); + mouseChangedNotifier = SignalNotifier::AttachToEvent(L"os_mouse_mode_changed", ref new SignalHandler( + this, &App::OnMouseModeChanged + )); - char *args[] = { "-path", "game", NULL }; - Main::setup("winrt", 2, args, false); + mouseChangedNotifier->Enable(); + + window->CharacterReceived += + ref new TypedEventHandler(this, &App::OnCharacterReceived); + window->KeyDown += + ref new TypedEventHandler(this, &App::OnKeyDown); + window->KeyUp += + ref new TypedEventHandler(this, &App::OnKeyUp); + + + unsigned int argc; + char** argv = get_command_line(&argc); + + Main::setup("winrt", argc, argv, false); // The CoreWindow has been created, so EGL can be initialized. ContextEGL *context = memnew(ContextEGL(window)); @@ -232,7 +258,7 @@ static int _get_finger(uint32_t p_touch_id) { return p_touch_id % 31; // for now }; -void App::pointer_event(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::PointerEventArgs ^ args, bool p_pressed) { +void App::pointer_event(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args, bool p_pressed, bool p_is_wheel) { Windows::UI::Input::PointerPoint ^ point = args->CurrentPoint; Windows::Foundation::Point pos = _get_pixel_position(window, point->Position, os); @@ -251,7 +277,7 @@ void App::pointer_event(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Cor last_touch_y[event.screen_touch.index] = pos.Y; os->input_event(event); - if (event.screen_touch.index != 0) + if (number_of_contacts > 1) return; }; // fallthrought of sorts @@ -266,6 +292,14 @@ void App::pointer_event(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Cor event.mouse_button.global_x = pos.X; event.mouse_button.global_y = pos.Y; + if (p_is_wheel) { + if (point->Properties->MouseWheelDelta > 0) { + event.mouse_button.button_index = point->Properties->IsHorizontalMouseWheel ? BUTTON_WHEEL_RIGHT : BUTTON_WHEEL_UP; + } else if (point->Properties->MouseWheelDelta < 0) { + event.mouse_button.button_index = point->Properties->IsHorizontalMouseWheel ? BUTTON_WHEEL_LEFT : BUTTON_WHEEL_DOWN; + } + } + last_touch_x[31] = pos.X; last_touch_y[31] = pos.Y; @@ -274,20 +308,55 @@ void App::pointer_event(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Cor void App::OnPointerPressed(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::PointerEventArgs ^ args) { + number_of_contacts++; pointer_event(sender, args, true); }; void App::OnPointerReleased(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::PointerEventArgs ^ args) { + number_of_contacts--; pointer_event(sender, args, false); }; -void App::OnPointerMoved(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::PointerEventArgs ^ args) { +void App::OnPointerWheelChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args) { + + pointer_event(sender, args, true, true); +} + +void App::OnMouseModeChanged(Windows::System::Threading::Core::SignalNotifier^ signalNotifier, bool timedOut) { + + OS::MouseMode mode = os->get_mouse_mode(); + SignalNotifier^ notifier = mouseChangedNotifier; + + window->Dispatcher->RunAsync( + CoreDispatcherPriority::High, + ref new DispatchedHandler( + [mode, notifier, this]() { + if (mode == OS::MOUSE_MODE_CAPTURED) { + + this->MouseMovedToken = MouseDevice::GetForCurrentView()->MouseMoved += + ref new TypedEventHandler(this, &App::OnMouseMoved); + + } else { + + MouseDevice::GetForCurrentView()->MouseMoved -= MouseMovedToken; + + } + + notifier->Enable(); + })); + + ResetEvent(os->mouse_mode_changed); + + +} + +void App::OnPointerMoved(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args) { Windows::UI::Input::PointerPoint ^ point = args->CurrentPoint; Windows::Foundation::Point pos = _get_pixel_position(window, point->Position, os); - if (_is_touch(point)) { + if (point->IsInContact && _is_touch(point)) { InputEvent event; event.type = InputEvent::SCREEN_DRAG; @@ -299,11 +368,15 @@ void App::OnPointerMoved(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Co event.screen_drag.relative_y = event.screen_drag.y - last_touch_y[event.screen_drag.index]; os->input_event(event); - if (event.screen_drag.index != 0) + if (number_of_contacts > 1) return; }; // fallthrought of sorts + // In case the mouse grabbed, MouseMoved will handle this + if (os->get_mouse_mode() == OS::MouseMode::MOUSE_MODE_CAPTURED) + return; + InputEvent event; event.type = InputEvent::MOUSE_MOTION; event.device = 0; @@ -314,13 +387,88 @@ void App::OnPointerMoved(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Co event.mouse_motion.relative_x = pos.X - last_touch_x[31]; event.mouse_motion.relative_y = pos.Y - last_touch_y[31]; + last_mouse_pos = pos; + os->input_event(event); -}; + +} + +void App::OnMouseMoved(MouseDevice ^ mouse_device, MouseEventArgs ^ args) { + + // In case the mouse isn't grabbed, PointerMoved will handle this + if (os->get_mouse_mode() != OS::MouseMode::MOUSE_MODE_CAPTURED) + return; + + Windows::Foundation::Point pos; + pos.X = last_mouse_pos.X + args->MouseDelta.X; + pos.Y = last_mouse_pos.Y + args->MouseDelta.Y; + + InputEvent event; + event.type = InputEvent::MOUSE_MOTION; + event.device = 0; + event.mouse_motion.x = pos.X; + event.mouse_motion.y = pos.Y; + event.mouse_motion.global_x = pos.X; + event.mouse_motion.global_y = pos.Y; + event.mouse_motion.relative_x = args->MouseDelta.X; + event.mouse_motion.relative_y = args->MouseDelta.Y; + + last_mouse_pos = pos; + + os->input_event(event); +} + +void App::key_event(Windows::UI::Core::CoreWindow^ sender, bool p_pressed, Windows::UI::Core::KeyEventArgs^ key_args, Windows::UI::Core::CharacterReceivedEventArgs^ char_args) +{ + + OSWinrt::KeyEvent ke; + + InputModifierState mod; + mod.meta = false; + mod.command = false; + mod.control = sender->GetAsyncKeyState(VirtualKey::Control) == CoreVirtualKeyStates::Down; + mod.alt = sender->GetAsyncKeyState(VirtualKey::Menu) == CoreVirtualKeyStates::Down; + mod.shift = sender->GetAsyncKeyState(VirtualKey::Shift) == CoreVirtualKeyStates::Down; + ke.mod_state = mod; + + ke.pressed = p_pressed; + + if (key_args != nullptr) { + + ke.type = OSWinrt::KeyEvent::MessageType::KEY_EVENT_MESSAGE; + ke.unicode = 0; + ke.scancode = KeyMappingWindows::get_keysym((unsigned int)key_args->VirtualKey); + ke.echo = (!p_pressed && !key_args->KeyStatus.IsKeyReleased) || (p_pressed && key_args->KeyStatus.WasKeyDown); + + } else { + + ke.type = OSWinrt::KeyEvent::MessageType::CHAR_EVENT_MESSAGE; + ke.unicode = char_args->KeyCode; + ke.scancode = 0; + ke.echo = (!p_pressed && !char_args->KeyStatus.IsKeyReleased) || (p_pressed && char_args->KeyStatus.WasKeyDown); + } + + os->queue_key_event(ke); + +} +void App::OnKeyDown(CoreWindow^ sender, KeyEventArgs^ args) +{ + key_event(sender, true, args); +} + +void App::OnKeyUp(CoreWindow^ sender, KeyEventArgs^ args) +{ + key_event(sender, false, args); +} + +void App::OnCharacterReceived(CoreWindow^ sender, CharacterReceivedEventArgs^ args) +{ + key_event(sender, true, nullptr, args); +} // Initializes scene resources -void App::Load(Platform::String ^ entryPoint) { - //char* args[] = {"-test", "render", NULL}; - //Main::setup("winrt", 2, args); +void App::Load(Platform::String^ entryPoint) +{ } // This method is called after the window becomes active. @@ -386,3 +534,95 @@ void App::UpdateWindowSize(Size size) { vm.resizable = false; os->set_video_mode(vm); } + +char** App::get_command_line(unsigned int* out_argc) { + + static char* fail_cl[] = { "-path", "game", NULL }; + *out_argc = 2; + + FILE* f = _wfopen(L"__cl__.cl", L"rb"); + + if (f == NULL) { + + wprintf(L"Couldn't open command line file."); + return fail_cl; + } + +#define READ_LE_4(v) ((int)(##v[3] & 0xFF) << 24) | ((int)(##v[2] & 0xFF) << 16) | ((int)(##v[1] & 0xFF) << 8) | ((int)(##v[0] & 0xFF)) +#define CMD_MAX_LEN 65535 + + uint8_t len[4]; + int r = fread(len, sizeof(uint8_t), 4, f); + + Platform::Collections::Vector cl; + + if (r < 4) { + fclose(f); + wprintf(L"Wrong cmdline length."); + return(fail_cl); + } + + int argc = READ_LE_4(len); + + for (int i = 0; i < argc; i++) { + + r = fread(len, sizeof(uint8_t), 4, f); + + if (r < 4) { + fclose(f); + wprintf(L"Wrong cmdline param length."); + return(fail_cl); + } + + int strlen = READ_LE_4(len); + + if (strlen > CMD_MAX_LEN) { + fclose(f); + wprintf(L"Wrong command length."); + return(fail_cl); + } + + char* arg = new char[strlen + 1]; + r = fread(arg, sizeof(char), strlen, f); + arg[strlen] = '\0'; + + if (r == strlen) { + + int warg_size = MultiByteToWideChar(CP_UTF8, 0, arg, -1, NULL, 0); + wchar_t* warg = new wchar_t[warg_size]; + + MultiByteToWideChar(CP_UTF8, 0, arg, -1, warg, warg_size); + + cl.Append(ref new Platform::String(warg, warg_size)); + + } else { + + delete[] arg; + fclose(f); + wprintf(L"Error reading command."); + return(fail_cl); + } + } + +#undef READ_LE_4 +#undef CMD_MAX_LEN + + fclose(f); + + char** ret = new char*[cl.Size + 1]; + + for (int i = 0; i < cl.Size; i++) { + + int arg_size = WideCharToMultiByte(CP_UTF8, 0, cl.GetAt(i)->Data(), -1, NULL, 0, NULL, NULL); + char* arg = new char[arg_size]; + + WideCharToMultiByte(CP_UTF8, 0, cl.GetAt(i)->Data(), -1, arg, arg_size, NULL, NULL); + + ret[i] = arg; + + } + ret[cl.Size] = NULL; + *out_argc = cl.Size; + + return ret; +} diff --git a/platform/winrt/app.h b/platform/winrt/app.h index 7e13bd6fe27..7c820547bf1 100644 --- a/platform/winrt/app.h +++ b/platform/winrt/app.h @@ -1,4 +1,32 @@ -#pragma once +/*************************************************************************/ +/* app.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is 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 Software. */ +/* */ +/* 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 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 */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +#pragma once #include @@ -7,51 +35,74 @@ #include "GLES2/gl2.h" #include "os_winrt.h" -namespace $ext_safeprojectname$ { -ref class App sealed : public Windows::ApplicationModel::Core::IFrameworkView { -public: - App(); +namespace GodotWinRT +{ + ref class App sealed : public Windows::ApplicationModel::Core::IFrameworkView + { + public: + App(); - // IFrameworkView Methods. - virtual void Initialize(Windows::ApplicationModel::Core::CoreApplicationView ^ applicationView); - virtual void SetWindow(Windows::UI::Core::CoreWindow ^ window); - virtual void Load(Platform::String ^ entryPoint); - virtual void Run(); - virtual void Uninitialize(); + // IFrameworkView Methods. + virtual void Initialize(Windows::ApplicationModel::Core::CoreApplicationView^ applicationView); + virtual void SetWindow(Windows::UI::Core::CoreWindow^ window); + virtual void Load(Platform::String^ entryPoint); + virtual void Run(); + virtual void Uninitialize(); -private: - void RecreateRenderer(); + property Windows::Foundation::EventRegistrationToken MouseMovedToken { + Windows::Foundation::EventRegistrationToken get() { return this->mouseMovedToken; } + void set(Windows::Foundation::EventRegistrationToken p_token) { this->mouseMovedToken = p_token; } + }; - // Application lifecycle event handlers. - void OnActivated(Windows::ApplicationModel::Core::CoreApplicationView ^ applicationView, Windows::ApplicationModel::Activation::IActivatedEventArgs ^ args); + private: + void RecreateRenderer(); - // Window event handlers. - void OnWindowSizeChanged(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::WindowSizeChangedEventArgs ^ args); - void OnVisibilityChanged(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::VisibilityChangedEventArgs ^ args); - void OnWindowClosed(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::CoreWindowEventArgs ^ args); + // Application lifecycle event handlers. + void OnActivated(Windows::ApplicationModel::Core::CoreApplicationView^ applicationView, Windows::ApplicationModel::Activation::IActivatedEventArgs^ args); - void pointer_event(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::PointerEventArgs ^ args, bool p_pressed); - void OnPointerPressed(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::PointerEventArgs ^ args); - void OnPointerReleased(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::PointerEventArgs ^ args); - void OnPointerMoved(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::PointerEventArgs ^ args); + // Window event handlers. + void OnWindowSizeChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::WindowSizeChangedEventArgs^ args); + void OnVisibilityChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::VisibilityChangedEventArgs^ args); + void OnWindowClosed(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::CoreWindowEventArgs^ args); - void UpdateWindowSize(Windows::Foundation::Size size); - void InitializeEGL(Windows::UI::Core::CoreWindow ^ window); - void CleanupEGL(); + void pointer_event(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args, bool p_pressed, bool p_is_wheel = false); + void OnPointerPressed(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args); + void OnPointerReleased(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args); + void OnPointerMoved(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args); + void OnMouseMoved(Windows::Devices::Input::MouseDevice^ mouse_device, Windows::Devices::Input::MouseEventArgs^ args); + void OnPointerWheelChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args); - bool mWindowClosed; - bool mWindowVisible; - GLsizei mWindowWidth; - GLsizei mWindowHeight; + Windows::System::Threading::Core::SignalNotifier^ mouseChangedNotifier; + Windows::Foundation::EventRegistrationToken mouseMovedToken; + void OnMouseModeChanged(Windows::System::Threading::Core::SignalNotifier^ signalNotifier, bool timedOut); - EGLDisplay mEglDisplay; - EGLContext mEglContext; - EGLSurface mEglSurface; + void key_event(Windows::UI::Core::CoreWindow^ sender, bool p_pressed, Windows::UI::Core::KeyEventArgs^ key_args = nullptr, Windows::UI::Core::CharacterReceivedEventArgs^ char_args = nullptr); + void OnKeyDown(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::KeyEventArgs^ args); + void OnKeyUp(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::KeyEventArgs^ args); + void OnCharacterReceived(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::CharacterReceivedEventArgs^ args); - CoreWindow ^ window; - OSWinrt *os; + void UpdateWindowSize(Windows::Foundation::Size size); + void InitializeEGL(Windows::UI::Core::CoreWindow^ window); + void CleanupEGL(); + + char** get_command_line(unsigned int* out_argc); + + bool mWindowClosed; + bool mWindowVisible; + GLsizei mWindowWidth; + GLsizei mWindowHeight; + + EGLDisplay mEglDisplay; + EGLContext mEglContext; + EGLSurface mEglSurface; + + CoreWindow^ window; + OSWinrt* os; + + int last_touch_x[32]; // 20 fingers, index 31 reserved for the mouse + int last_touch_y[32]; + int number_of_contacts; + Windows::Foundation::Point last_mouse_pos; + }; - int last_touch_x[32]; // 20 fingers, index 31 reserved for the mouse - int last_touch_y[32]; -}; } diff --git a/platform/winrt/audio_driver_winrt.cpp b/platform/winrt/audio_driver_winrt.cpp new file mode 100644 index 00000000000..ff46244ac3d --- /dev/null +++ b/platform/winrt/audio_driver_winrt.cpp @@ -0,0 +1,244 @@ +/*************************************************************************/ +/* audio_driver_winrt.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is 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 Software. */ +/* */ +/* 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 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 */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +#include "audio_driver_winrt.h" + +#include "globals.h" +#include "os/os.h" + +using namespace Windows::Media; +using namespace Windows::Media::Core; +using namespace Windows::Media::MediaProperties; +using namespace Windows::Media::Editing; +using namespace Windows::Foundation; + +const char * AudioDriverWinRT::get_name() const +{ + return "WinRT"; +} + +Error AudioDriverWinRT::init() { + + active = false; + thread_exited = false; + exit_thread = false; + pcm_open = false; + samples_in = NULL; + + + mix_rate = 48000; + output_format = OUTPUT_STEREO; + channels = 2; + + int latency = GLOBAL_DEF("audio/output_latency", 25); + buffer_size = nearest_power_of_2(latency * mix_rate / 1000); + + samples_in = memnew_arr(int32_t, buffer_size*channels); + for (int i = 0; i < AUDIO_BUFFERS; i++) { + samples_out[i] = memnew_arr(int16_t, buffer_size*channels); + xaudio_buffer[i].AudioBytes = buffer_size * channels * sizeof(int16_t); + xaudio_buffer[i].pAudioData = (const BYTE*)(samples_out[i]); + xaudio_buffer[i].Flags = 0; + } + + HRESULT hr; + hr = XAudio2Create(&xaudio, 0, XAUDIO2_DEFAULT_PROCESSOR); + if (hr != S_OK) { + ERR_EXPLAIN("Error creating XAudio2 engine."); + ERR_FAIL_V(ERR_UNAVAILABLE); + } + hr = xaudio->CreateMasteringVoice(&mastering_voice); + if (hr != S_OK) { + ERR_EXPLAIN("Error creating XAudio2 mastering voice."); + ERR_FAIL_V(ERR_UNAVAILABLE); + } + + wave_format.nChannels = channels; + wave_format.cbSize = 0; + wave_format.nSamplesPerSec = mix_rate; + wave_format.wFormatTag = WAVE_FORMAT_PCM; + wave_format.wBitsPerSample = 16; + wave_format.nBlockAlign = channels * wave_format.wBitsPerSample >> 3; + wave_format.nAvgBytesPerSec = mix_rate * wave_format.nBlockAlign; + + voice_callback = memnew(XAudio2DriverVoiceCallback); + + hr = xaudio->CreateSourceVoice(&source_voice, &wave_format, 0, XAUDIO2_MAX_FREQ_RATIO, voice_callback); + if (hr != S_OK) { + ERR_EXPLAIN("Error creating XAudio2 source voice. " + itos(hr)); + ERR_FAIL_V(ERR_UNAVAILABLE); + } + + mutex = Mutex::create(); + thread = Thread::create(AudioDriverWinRT::thread_func, this); + + return OK; +}; + +void AudioDriverWinRT::thread_func(void* p_udata) { + + AudioDriverWinRT* ad = (AudioDriverWinRT*)p_udata; + + uint64_t usdelay = (ad->buffer_size / float(ad->mix_rate)) * 1000000; + + while (!ad->exit_thread) { + + + if (!ad->active) { + + for (int i = 0; i < AUDIO_BUFFERS; i++) { + ad->xaudio_buffer[i].Flags = XAUDIO2_END_OF_STREAM; + } + + } else { + + ad->lock(); + + ad->audio_server_process(ad->buffer_size, ad->samples_in); + + ad->unlock(); + + for (unsigned int i = 0;i < ad->buffer_size*ad->channels;i++) { + + ad->samples_out[ad->current_buffer][i] = ad->samples_in[i] >> 16; + } + + ad->xaudio_buffer[ad->current_buffer].Flags = 0; + ad->xaudio_buffer[ad->current_buffer].AudioBytes = ad->buffer_size * ad->channels * sizeof(int16_t); + ad->xaudio_buffer[ad->current_buffer].pAudioData = (const BYTE*)(ad->samples_out[ad->current_buffer]); + ad->xaudio_buffer[ad->current_buffer].PlayBegin = 0; + ad->source_voice->SubmitSourceBuffer(&(ad->xaudio_buffer[ad->current_buffer])); + + ad->current_buffer = (ad->current_buffer + 1) % AUDIO_BUFFERS; + + XAUDIO2_VOICE_STATE state; + while (ad->source_voice->GetState(&state), state.BuffersQueued > AUDIO_BUFFERS - 1) + { + WaitForSingleObject(ad->voice_callback->buffer_end_event, INFINITE); + } + } + + }; + + ad->thread_exited = true; + +}; + +void AudioDriverWinRT::start() { + + active = true; + HRESULT hr = source_voice->Start(0); + if (hr != S_OK) { + ERR_EXPLAIN("XAudio2 start error " + itos(hr)); + ERR_FAIL(); + } +}; + +int AudioDriverWinRT::get_mix_rate() const { + + return mix_rate; +}; + +AudioDriverSW::OutputFormat AudioDriverWinRT::get_output_format() const { + + return output_format; +}; + +float AudioDriverWinRT::get_latency() { + + XAUDIO2_PERFORMANCE_DATA perf_data; + xaudio->GetPerformanceData(&perf_data); + if (perf_data.CurrentLatencyInSamples) { + return (float)(perf_data.CurrentLatencyInSamples / ((float)mix_rate)); + } else { + return 0; + } +} + +void AudioDriverWinRT::lock() { + + if (!thread || !mutex) + return; + mutex->lock(); +}; +void AudioDriverWinRT::unlock() { + + if (!thread || !mutex) + return; + mutex->unlock(); +}; + +void AudioDriverWinRT::finish() { + + if (!thread) + return; + + exit_thread = true; + Thread::wait_to_finish(thread); + + if (source_voice) { + source_voice->Stop(0); + memdelete(source_voice); + } + + if (samples_in) { + memdelete_arr(samples_in); + }; + if (samples_out[0]) { + for (int i = 0; i < AUDIO_BUFFERS; i++) { + memdelete_arr(samples_out[i]); + } + }; + + memdelete(voice_callback); + memdelete(mastering_voice); + + memdelete(thread); + if (mutex) + memdelete(mutex); + thread = NULL; +}; + +AudioDriverWinRT::AudioDriverWinRT() { + + mutex = NULL; + thread = NULL; + wave_format = { 0 }; + for (int i = 0; i < AUDIO_BUFFERS; i++) { + xaudio_buffer[i] = { 0 }; + samples_out[i] = 0; + } + current_buffer = 0; +}; + +AudioDriverWinRT::~AudioDriverWinRT() { + + +}; + + diff --git a/platform/winrt/audio_driver_winrt.h b/platform/winrt/audio_driver_winrt.h new file mode 100644 index 00000000000..d7a69994f8f --- /dev/null +++ b/platform/winrt/audio_driver_winrt.h @@ -0,0 +1,109 @@ +/*************************************************************************/ +/* audio_driver_winrt.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is 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 Software. */ +/* */ +/* 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 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 */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +#ifndef AUDIO_DRIVER_WINRT_H +#define AUDIO_DRIVER_WINRT_H + +#include "servers/audio/audio_server_sw.h" + +#include "core/os/thread.h" +#include "core/os/mutex.h" + +#include +#include +#include +#include +#include + +class AudioDriverWinRT : public AudioDriverSW { + + enum { + AUDIO_BUFFERS = 2 + }; + + struct XAudio2DriverVoiceCallback : public IXAudio2VoiceCallback { + + HANDLE buffer_end_event; + XAudio2DriverVoiceCallback() : buffer_end_event(CreateEvent(NULL, FALSE, FALSE, NULL)) {} + void STDMETHODCALLTYPE OnBufferEnd(void* pBufferContext) { /*print_line("buffer ended");*/ SetEvent(buffer_end_event); } + + //Unused methods are stubs + void STDMETHODCALLTYPE OnStreamEnd() { } + void STDMETHODCALLTYPE OnVoiceProcessingPassEnd() { } + void STDMETHODCALLTYPE OnVoiceProcessingPassStart(UINT32 SamplesRequired) { } + void STDMETHODCALLTYPE OnBufferStart(void * pBufferContext) { } + void STDMETHODCALLTYPE OnLoopEnd(void * pBufferContext) { } + void STDMETHODCALLTYPE OnVoiceError(void * pBufferContext, HRESULT Error) { } + + }; + + Thread* thread; + Mutex* mutex; + + int32_t* samples_in; + int16_t* samples_out[AUDIO_BUFFERS]; + + static void thread_func(void* p_udata); + int buffer_size; + + unsigned int mix_rate; + OutputFormat output_format; + + int channels; + + bool active; + bool thread_exited; + mutable bool exit_thread; + bool pcm_open; + + WAVEFORMATEX wave_format; + Microsoft::WRL::ComPtr xaudio; + int current_buffer; + IXAudio2MasteringVoice* mastering_voice; + XAUDIO2_BUFFER xaudio_buffer[AUDIO_BUFFERS]; + IXAudio2SourceVoice* source_voice; + XAudio2DriverVoiceCallback* voice_callback; + +public: + + const char* get_name() const; + + virtual Error init(); + virtual void start(); + virtual int get_mix_rate() const; + virtual OutputFormat get_output_format() const; + virtual float get_latency(); + virtual void lock(); + virtual void unlock(); + virtual void finish(); + + AudioDriverWinRT(); + ~AudioDriverWinRT(); +}; + +#endif diff --git a/platform/winrt/detect.py b/platform/winrt/detect.py index d063be46527..e4fec86d449 100644 --- a/platform/winrt/detect.py +++ b/platform/winrt/detect.py @@ -1,9 +1,8 @@ - - import os import sys import string +import methods def is_active(): @@ -15,145 +14,157 @@ def get_name(): def can_build(): - if (os.name == "nt"): - # building natively on windows! + if (os.name=="nt"): + #building natively on windows! if (os.getenv("VSINSTALLDIR")): + + if (os.getenv("ANGLE_SRC_PATH") == None): + print("You need to define ANGLE_SRC_PATH to the path of ANGLE source root.") + return False + + if not os.path.isfile(str(os.getenv("ANGLE_SRC_PATH")) + "/winrt/10/src/angle.sln"): + print ("Couldn't find the ANGLE solution. Is ANGLE_SRC_PATH configured to the right path?") + return False + return True return False - def get_opts(): return [] def get_flags(): - - return [] + return [ + ('tools', 'no'), + ('openssl', 'builtin'), + ] def configure(env): - env.Append(CPPPATH=['#platform/winrt', '#platform/winrt/include']) + if(env["bits"] != "default"): + print "Error: bits argument is disabled for MSVC" + print ("Bits argument is not supported for MSVC compilation. Architecture depends on the Native/Cross Compile Tools Prompt/Developer Console (or Visual Studio settings)" + +" that is being used to run SCons. As a consequence, bits argument is disabled. Run scons again without bits argument (example: scons p=winrt) and SCons will attempt to detect what MSVC compiler" + +" will be executed and inform you.") + sys.exit() + arch = "" + env['ENV'] = os.environ; - if os.getenv('PLATFORM') == "ARM": + # ANGLE + angle_root = os.getenv("ANGLE_SRC_PATH") + env.Append(CPPPATH=[angle_root + '/include']) + jobs = str(env.GetOption("num_jobs")) + angle_build_cmd = "msbuild.exe " + angle_root + "/winrt/10/src/angle.sln /nologo /v:m /m:" + jobs + " /p:Configuration=Release /p:Platform=" - # compiler commandline - # debug: /Yu"pch.h" /MP /GS /analyze- /W3 /wd"4453" /wd"28204" /Zc:wchar_t /I"C:\Users\ariel\Documents\Visual Studio 2013\Projects\App2\App2\App2.WindowsPhone\" /I"Generated Files\" /I"ARM\Debug\" /I"C:\Users\ariel\Documents\Visual Studio 2013\Projects\App2\App2\App2.Shared\" /ZW:nostdlib /Zi /Gm- /Od /sdl /Fd"ARM\Debug\vc120.pdb" /fp:precise /D "PSAPI_VERSION=2" /D "WINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP" /D "_UITHREADCTXT_SUPPORT=0" /D "_UNICODE" /D "UNICODE" /D "_DEBUG" /errorReport:prompt /WX- /Zc:forScope /RTC1 /ZW /Gd /Oy- /MDd /Fa"ARM\Debug\" /EHsc /nologo /Fo"ARM\Debug\" /Fp"ARM\Debug\App2.WindowsPhone.pch" - # release: /Yu"pch.h" /MP /GS /GL /analyze- /W3 /wd"4453" /wd"28204" /Gy /Zc:wchar_t /I"C:\Users\ariel\Documents\Visual Studio 2013\Projects\App2\App2\App2.WindowsPhone\" /I"Generated Files\" /I"ARM\Release\" /I"C:\Users\ariel\Documents\Visual Studio 2013\Projects\App2\App2\App2.Shared\" /ZW:nostdlib /Zi /Gm- /O2 /sdl /Fd"ARM\Release\vc120.pdb" /fp:precise /D "PSAPI_VERSION=2" /D "WINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP" /D "_UITHREADCTXT_SUPPORT=0" /D "_UNICODE" /D "UNICODE" /errorReport:prompt /WX- /Zc:forScope /ZW /Gd /Oy- /Oi /MD /Fa"ARM\Release\" /EHsc /nologo /Fo"ARM\Release\" /Fp"ARM\Release\App2.WindowsPhone.pch" + if os.getenv('Platform') == "ARM": - # linker commandline - # debug: /OUT:"C:\Users\ariel\Documents\Visual Studio 2013\Projects\App2\ARM\Debug\App2.WindowsPhone\App2.WindowsPhone.exe" /MANIFEST:NO /NXCOMPAT /PDB:"C:\Users\ariel\Documents\Visual Studio 2013\Projects\App2\ARM\Debug\App2.WindowsPhone\App2.WindowsPhone.pdb" /DYNAMICBASE "WindowsPhoneCore.lib" "RuntimeObject.lib" "PhoneAppModelHost.lib" /DEBUG /MACHINE:ARM /NODEFAULTLIB:"kernel32.lib" /NODEFAULTLIB:"ole32.lib" /WINMD /APPCONTAINER /INCREMENTAL /PGD:"C:\Users\ariel\Documents\Visual Studio 2013\Projects\App2\ARM\Debug\App2.WindowsPhone\App2.WindowsPhone.pgd" /WINMDFILE:"C:\Users\ariel\Documents\Visual Studio 2013\Projects\App2\ARM\Debug\App2.WindowsPhone\App2.winmd" /SUBSYSTEM:WINDOWS /MANIFESTUAC:NO /ManifestFile:"ARM\Debug\App2.WindowsPhone.exe.intermediate.manifest" /ERRORREPORT:PROMPT /NOLOGO /TLBID:1 - # release: /OUT:"C:\Users\ariel\Documents\Visual Studio 2013\Projects\App2\ARM\Release\App2.WindowsPhone\App2.WindowsPhone.exe" /MANIFEST:NO /LTCG /NXCOMPAT /PDB:"C:\Users\ariel\Documents\Visual Studio 2013\Projects\App2\ARM\Release\App2.WindowsPhone\App2.WindowsPhone.pdb" /DYNAMICBASE "WindowsPhoneCore.lib" "RuntimeObject.lib" "PhoneAppModelHost.lib" /DEBUG /MACHINE:ARM /NODEFAULTLIB:"kernel32.lib" /NODEFAULTLIB:"ole32.lib" /WINMD /APPCONTAINER /OPT:REF /PGD:"C:\Users\ariel\Documents\Visual Studio 2013\Projects\App2\ARM\Release\App2.WindowsPhone\App2.WindowsPhone.pgd" /WINMDFILE:"C:\Users\ariel\Documents\Visual Studio 2013\Projects\App2\ARM\Release\App2.WindowsPhone\App2.winmd" /SUBSYSTEM:WINDOWS /MANIFESTUAC:NO /ManifestFile:"ARM\Release\App2.WindowsPhone.exe.intermediate.manifest" /OPT:ICF /ERRORREPORT:PROMPT /NOLOGO /TLBID:1 + print "Compiled program architecture will be an ARM executable. (forcing bits=32)." - arch = "arm" + arch="arm" + env["bits"]="32" + env.Append(LINKFLAGS=['/MACHINE:ARM']) + env.Append(LIBPATH=[os.environ['VCINSTALLDIR'] + 'lib/store/arm']) - env.Append(LINKFLAGS=['/INCREMENTAL:NO', '/MANIFEST:NO', '/NXCOMPAT', '/DYNAMICBASE', "WindowsPhoneCore.lib", "RuntimeObject.lib", "PhoneAppModelHost.lib", "/DEBUG", "/MACHINE:ARM", '/NODEFAULTLIB:"kernel32.lib"', '/NODEFAULTLIB:"ole32.lib"', '/WINMD', '/APPCONTAINER', '/MANIFESTUAC:NO', '/ERRORREPORT:PROMPT', '/NOLOGO', '/TLBID:1']) - env.Append(LIBPATH=['#platform/winrt/ARM/lib']) + angle_build_cmd += "ARM" - env.Append(CCFLAGS=string.split('/MP /GS /wd"4453" /wd"28204" /analyze- /Zc:wchar_t /Zi /Gm- /Od /fp:precise /fp:precise /D "PSAPI_VERSION=2" /D "WINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP" /DWINDOWSPHONE_ENABLED /D "_UITHREADCTXT_SUPPORT=0" /D "_UNICODE" /D "UNICODE" /errorReport:prompt /WX- /Zc:forScope /Gd /Oy- /Oi /MD /RTC1 /Gd /EHsc /nologo')) - env.Append(CXXFLAGS=string.split('/ZW')) - - if (env["target"] == "release"): - - env.Append(CCFLAGS=['/O2']) - env.Append(LINKFLAGS=['/SUBSYSTEM:WINDOWS']) - - elif (env["target"] == "test"): - - env.Append(CCFLAGS=['/O2', '/DDEBUG_ENABLED', '/DD3D_DEBUG_INFO']) - env.Append(LINKFLAGS=['/SUBSYSTEM:CONSOLE']) - - elif (env["target"] == "debug"): - - env.Append(CCFLAGS=['/Zi', '/DDEBUG_ENABLED', '/DD3D_DEBUG_INFO']) - env.Append(LINKFLAGS=['/SUBSYSTEM:CONSOLE']) - env.Append(LINKFLAGS=['/DEBUG', '/D_DEBUG']) - - elif (env["target"] == "profile"): - - env.Append(CCFLAGS=['-g', '-pg']) - env.Append(LINKFLAGS=['-pg']) - - env['ENV'] = os.environ - # fix environment for windows phone 8.1 - env['ENV']['WINDOWSPHONEKITDIR'] = env['ENV']['WINDOWSPHONEKITDIR'].replace("8.0", "8.1") # wtf - env['ENV']['INCLUDE'] = env['ENV']['INCLUDE'].replace("8.0", "8.1") - env['ENV']['LIB'] = env['ENV']['LIB'].replace("8.0", "8.1") - env['ENV']['PATH'] = env['ENV']['PATH'].replace("8.0", "8.1") - env['ENV']['LIBPATH'] = env['ENV']['LIBPATH'].replace("8.0\\Windows Metadata", "8.1\\References\\CommonConfiguration\\Neutral") + env.Append(LIBPATH=[angle_root + '/winrt/10/src/Release_ARM/lib']) else: - arch = "x64" - env.Append(LINKFLAGS=['/MANIFEST:NO', '/NXCOMPAT', '/DYNAMICBASE', "kernel32.lib", '/MACHINE:X64', '/WINMD', '/APPCONTAINER', '/MANIFESTUAC:NO', '/ERRORREPORT:PROMPT', '/NOLOGO', '/TLBID:1']) + compiler_version_str = methods.detect_visual_c_compiler_version(env['ENV']) - env.Append(LIBPATH=['#platform/winrt/x64/lib']) + if(compiler_version_str == "amd64" or compiler_version_str == "x86_amd64"): + env["bits"]="64" + print "Compiled program architecture will be a x64 executable (forcing bits=64)." + elif (compiler_version_str=="x86" or compiler_version_str == "amd64_x86"): + env["bits"]="32" + print "Compiled program architecture will be a x86 executable. (forcing bits=32)." + else: + print "Failed to detect MSVC compiler architecture version... Defaulting to 32bit executable settings (forcing bits=32). Compilation attempt will continue, but SCons can not detect for what architecture this build is compiled for. You should check your settings/compilation setup." + env["bits"]="32" - if (env["target"] == "release"): + if (env["bits"] == "32"): + arch = "x86" - env.Append(CCFLAGS=['/O2']) - env.Append(LINKFLAGS=['/SUBSYSTEM:WINDOWS']) - env.Append(LINKFLAGS=['/ENTRY:mainCRTStartup']) + angle_build_cmd += "Win32" - elif (env["target"] == "test"): + env.Append(CPPFLAGS=['/DPNG_ABORT=abort']) + env.Append(LINKFLAGS=['/MACHINE:X86']) + env.Append(LIBPATH=[os.environ['VCINSTALLDIR'] + 'lib/store']) + env.Append(LIBPATH=[angle_root + '/winrt/10/src/Release_Win32/lib']) - env.Append(CCFLAGS=['/O2', '/DDEBUG_ENABLED', '/DD3D_DEBUG_INFO']) - env.Append(LINKFLAGS=['/SUBSYSTEM:CONSOLE']) + else: + arch = "x64" - elif (env["target"] == "debug"): + angle_build_cmd += "x64" - env.Append(CCFLAGS=['/Zi', '/DDEBUG_ENABLED', '/DD3D_DEBUG_INFO']) - env.Append(LINKFLAGS=['/SUBSYSTEM:CONSOLE']) - env.Append(LINKFLAGS=['/DEBUG', '/D_DEBUG']) + env.Append(LINKFLAGS=['/MACHINE:X64']) + env.Append(LIBPATH=[os.environ['VCINSTALLDIR'] + 'lib/store/amd64']) + env.Append(LIBPATH=[angle_root + '/winrt/10/src/Release_x64/lib']) - elif (env["target"] == "profile"): + env.Append(CPPPATH=['#platform/winrt','#drivers/windows']) + env.Append(LINKFLAGS=['/MANIFEST:NO', '/NXCOMPAT', '/DYNAMICBASE', '/WINMD', '/APPCONTAINER', '/ERRORREPORT:PROMPT', '/NOLOGO', '/TLBID:1', '/NODEFAULTLIB:"kernel32.lib"', '/NODEFAULTLIB:"ole32.lib"']) + env.Append(CPPFLAGS=['/D','__WRL_NO_DEFAULT_LIB__','/D','WIN32']) + env.Append(CPPFLAGS=['/FU', os.environ['VCINSTALLDIR'] + 'lib/store/references/platform.winmd']) + env.Append(CPPFLAGS=['/AI', os.environ['VCINSTALLDIR'] + 'lib/store/references']) - env.Append(CCFLAGS=['-g', '-pg']) - env.Append(LINKFLAGS=['-pg']) + env.Append(LIBPATH=[os.environ['VCINSTALLDIR'] + 'lib/store/references']) - env.Append(CCFLAGS=string.split('/MP /GS /wd"4453" /wd"28204" /Zc:wchar_t /Gm- /Od /fp:precise /D "_UNICODE" /D "UNICODE" /D "WINAPI_FAMILY=WINAPI_FAMILY_APP" /errorReport:prompt /WX- /Zc:forScope /RTC1 /Gd /MDd /EHsc /nologo')) - env.Append(CXXFLAGS=string.split('/ZW')) - env.Append(CCFLAGS=['/AI', os.environ['VCINSTALLDIR'] + '\\vcpackages', '/AI', os.environ['WINDOWSSDKDIR'] + '\\References\\CommonConfiguration\\Neutral']) - env.Append(CCFLAGS=['/DWINAPI_FAMILY=WINAPI_FAMILY_APP', '/D_WIN32_WINNT=0x0603', '/DNTDDI_VERSION=0x06030000']) + if (env["target"]=="release"): - env['ENV'] = os.environ + env.Append(CPPFLAGS=['/O2', '/GL']) + env.Append(CPPFLAGS=['/MD']) + env.Append(LINKFLAGS=['/SUBSYSTEM:WINDOWS', '/LTCG']) + + elif (env["target"]=="release_debug"): + + env.Append(CCFLAGS=['/O2','/Zi','/DDEBUG_ENABLED']) + env.Append(CPPFLAGS=['/MD']) + env.Append(LINKFLAGS=['/SUBSYSTEM:CONSOLE']) + + elif (env["target"]=="debug"): + + env.Append(CCFLAGS=['/Zi','/DDEBUG_ENABLED','/DDEBUG_MEMORY_ENABLED']) + env.Append(CPPFLAGS=['/MDd']) + env.Append(LINKFLAGS=['/SUBSYSTEM:CONSOLE']) + env.Append(LINKFLAGS=['/DEBUG']) + + + env.Append(CCFLAGS=string.split('/FS /MP /GS /wd"4453" /wd"28204" /wd"4291" /Zc:wchar_t /Gm- /fp:precise /D "_UNICODE" /D "UNICODE" /D "WINAPI_FAMILY=WINAPI_FAMILY_APP" /errorReport:prompt /WX- /Zc:forScope /Gd /EHsc /nologo')) + env.Append(CXXFLAGS=string.split('/ZW /FS')) + env.Append(CCFLAGS=['/AI', os.environ['VCINSTALLDIR']+'\\vcpackages', '/AI', os.environ['WINDOWSSDKDIR']+'\\References\\CommonConfiguration\\Neutral']) + + env['ENV'] = os.environ env["PROGSUFFIX"] = "." + arch + env["PROGSUFFIX"] env["OBJSUFFIX"] = "." + arch + env["OBJSUFFIX"] env["LIBSUFFIX"] = "." + arch + env["LIBSUFFIX"] - #env.Append(CCFLAGS=['/Gd','/GR','/nologo', '/EHsc']) - #env.Append(CXXFLAGS=['/TP', '/ZW']) - #env.Append(CPPFLAGS=['/DMSVC', '/GR', ]) - # env.Append(CCFLAGS=['/I'+os.getenv("WindowsSdkDir")+"/Include"]) env.Append(CCFLAGS=['/DWINRT_ENABLED']) env.Append(CCFLAGS=['/DWINDOWS_ENABLED']) - env.Append(CCFLAGS=['/DRTAUDIO_ENABLED']) - # env.Append(CCFLAGS=['/DWIN32']) env.Append(CCFLAGS=['/DTYPED_METHOD_BIND']) - env.Append(CCFLAGS=['/DGLES2_ENABLED']) - # env.Append(CCFLAGS=['/DGLES1_ENABLED']) - - winver = "0x0602" # Windows 8 is the minimum target for UWP build - env.Append(CCFLAGS=['/DWINVER=%s' % winver, '/D_WIN32_WINNT=%s' % winver]) + env.Append(CCFLAGS=['/DGLES2_ENABLED','/DGL_GLEXT_PROTOTYPES','/DEGL_EGLEXT_PROTOTYPES','/DANGLE_ENABLED']) LIBS = [ - #'winmm', - 'ws2_32', + 'xaudio2', + 'WindowsApp', + 'mincore', + 'libANGLE', 'libEGL', 'libGLESv2', - 'libANGLE', - #'kernel32','ole32','user32', 'advapi32' - ] - env.Append(LINKFLAGS=[p + ".lib" for p in LIBS]) + ] + env.Append(LINKFLAGS=[p+".lib" for p in LIBS]) - import methods - env.Append(BUILDERS={'GLSL120': env.Builder(action=methods.build_legacygl_headers, suffix='glsl.h', src_suffix='.glsl')}) - env.Append(BUILDERS={'GLSL': env.Builder(action=methods.build_glsl_headers, suffix='glsl.h', src_suffix='.glsl')}) - env.Append(BUILDERS={'HLSL9': env.Builder(action=methods.build_hlsl_dx9_headers, suffix='hlsl.h', src_suffix='.hlsl')}) - env.Append(BUILDERS={'GLSL120GLES': env.Builder(action=methods.build_gles2_headers, suffix='glsl.h', src_suffix='.glsl')}) + # Incremental linking fix + env['BUILDERS']['ProgramOriginal'] = env['BUILDERS']['Program'] + env['BUILDERS']['Program'] = methods.precious_program + env.Append( BUILDERS = { 'ANGLE' : env.Builder(action = angle_build_cmd) } ) -#/c/Program Files (x86)/Windows Phone Kits/8.1/lib/ARM/WindowsPhoneCore.lib + env.Append( BUILDERS = { 'GLSL120' : env.Builder(action = methods.build_legacygl_headers, suffix = 'glsl.h',src_suffix = '.glsl') } ) + env.Append( BUILDERS = { 'GLSL' : env.Builder(action = methods.build_glsl_headers, suffix = 'glsl.h',src_suffix = '.glsl') } ) + env.Append( BUILDERS = { 'HLSL9' : env.Builder(action = methods.build_hlsl_dx9_headers, suffix = 'hlsl.h',src_suffix = '.hlsl') } ) + env.Append( BUILDERS = { 'GLSL120GLES' : env.Builder(action = methods.build_gles2_headers, suffix = 'glsl.h',src_suffix = '.glsl') } ) diff --git a/platform/winrt/gl_context_egl.cpp b/platform/winrt/gl_context_egl.cpp index 3d09def4dff..0b5290a896e 100644 --- a/platform/winrt/gl_context_egl.cpp +++ b/platform/winrt/gl_context_egl.cpp @@ -102,12 +102,25 @@ Error ContextEGL::initialize() { try { const EGLint displayAttributes[] = - { - EGL_PLATFORM_ANGLE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, - EGL_PLATFORM_ANGLE_MAX_VERSION_MAJOR_ANGLE, 9, - EGL_PLATFORM_ANGLE_MAX_VERSION_MINOR_ANGLE, 3, - EGL_NONE, - }; + { + /*EGL_PLATFORM_ANGLE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, + EGL_PLATFORM_ANGLE_MAX_VERSION_MAJOR_ANGLE, 9, + EGL_PLATFORM_ANGLE_MAX_VERSION_MINOR_ANGLE, 3, + EGL_NONE,*/ + // These are the default display attributes, used to request ANGLE's D3D11 renderer. + // eglInitialize will only succeed with these attributes if the hardware supports D3D11 Feature Level 10_0+. + EGL_PLATFORM_ANGLE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, + + // EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER is an optimization that can have large performance benefits on mobile devices. + // Its syntax is subject to change, though. Please update your Visual Studio templates if you experience compilation issues with it. + //EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER, EGL_TRUE, + + // EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE is an option that enables ANGLE to automatically call + // the IDXGIDevice3::Trim method on behalf of the application when it gets suspended. + // Calling IDXGIDevice3::Trim when an application is suspended is a Windows Store application certification requirement. + EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE, EGL_TRUE, + EGL_NONE, + }; PFNEGLGETPLATFORMDISPLAYEXTPROC eglGetPlatformDisplayEXT = reinterpret_cast(eglGetProcAddress("eglGetPlatformDisplayEXT")); diff --git a/platform/winrt/gl_context_egl.h b/platform/winrt/gl_context_egl.h index 89cd8eb8317..908b8dceeca 100644 --- a/platform/winrt/gl_context_egl.h +++ b/platform/winrt/gl_context_egl.h @@ -50,6 +50,8 @@ class ContextEGL : public ContextGL { EGLint width; EGLint height; + bool vsync; + public: virtual void release_current(); @@ -59,6 +61,9 @@ public: virtual int get_window_height(); virtual void swap_buffers(); + void set_use_vsync(bool use) { vsync = use; } + bool is_using_vsync() const { return vsync; } + virtual Error initialize(); void reset(); diff --git a/platform/winrt/joystick_winrt.cpp b/platform/winrt/joystick_winrt.cpp new file mode 100644 index 00000000000..4816e9c8315 --- /dev/null +++ b/platform/winrt/joystick_winrt.cpp @@ -0,0 +1,146 @@ +/*************************************************************************/ +/* joystick.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is 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 Software. */ +/* */ +/* 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 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 */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ + +#include "joystick_winrt.h" + +using namespace Windows::Gaming::Input; +using namespace Windows::Foundation; + +void JoystickWinrt::register_events() { + + Gamepad::GamepadAdded += + ref new EventHandler(this, &JoystickWinrt::OnGamepadAdded); + Gamepad::GamepadRemoved += + ref new EventHandler(this, &JoystickWinrt::OnGamepadRemoved); +} + +uint32_t JoystickWinrt::process_controllers(uint32_t p_last_id) { + + for (int i = 0; i < MAX_CONTROLLERS; i++) { + + if (!controllers[i].connected) break; + + switch (controllers[i].type) { + + case ControllerType::GAMEPAD_CONTROLLER: { + + GamepadReading reading = ((Gamepad^)controllers[i].controller_reference)->GetCurrentReading(); + + int button_mask = (int)GamepadButtons::Menu; + for (int j = 0; j < 14; j++) { + + p_last_id = input->joy_button(p_last_id, controllers[i].id, j,(int)reading.Buttons & button_mask); + button_mask *= 2; + } + + p_last_id = input->joy_axis(p_last_id, controllers[i].id, JOY_AXIS_0, axis_correct(reading.LeftThumbstickX)); + p_last_id = input->joy_axis(p_last_id, controllers[i].id, JOY_AXIS_1, axis_correct(reading.LeftThumbstickY, true)); + p_last_id = input->joy_axis(p_last_id, controllers[i].id, JOY_AXIS_2, axis_correct(reading.RightThumbstickX)); + p_last_id = input->joy_axis(p_last_id, controllers[i].id, JOY_AXIS_3, axis_correct(reading.RightThumbstickY, true)); + p_last_id = input->joy_axis(p_last_id, controllers[i].id, JOY_AXIS_4, axis_correct(reading.LeftTrigger, false, true)); + p_last_id = input->joy_axis(p_last_id, controllers[i].id, JOY_AXIS_5, axis_correct(reading.RightTrigger, false, true)); + + break; + } + } + } + + return p_last_id; +} + +JoystickWinrt::JoystickWinrt() { + + for (int i = 0; i < MAX_CONTROLLERS; i++) + controllers[i].id = i; +} + +JoystickWinrt::JoystickWinrt(InputDefault * p_input) { + + input = p_input; + + JoystickWinrt(); +} + +void JoystickWinrt::OnGamepadAdded(Platform::Object ^ sender, Windows::Gaming::Input::Gamepad ^ value) { + + short idx = -1; + + for (int i = 0; i < MAX_CONTROLLERS; i++) { + + if (!controllers[i].connected) { + idx = i; + break; + } + } + + ERR_FAIL_COND(idx == -1); + + controllers[idx].connected = true; + controllers[idx].controller_reference = value; + controllers[idx].type = ControllerType::GAMEPAD_CONTROLLER; + + input->joy_connection_changed(idx, true, "Xbox Controller", "__WINRT_GAMEPAD__"); +} + +void JoystickWinrt::OnGamepadRemoved(Platform::Object ^ sender, Windows::Gaming::Input::Gamepad ^ value) { + + short idx = -1; + + for (int i = 0; i < MAX_CONTROLLERS; i++) { + + if (controllers[i].controller_reference == value) { + idx = i; + break; + } + } + + ERR_FAIL_COND(idx == -1); + + for (int i = idx + 1; i < MAX_CONTROLLERS - 1; i++) { + + if (!controllers[i].connected) { + break; + } + + controllers[i - 1] = controllers[i]; + } + controllers[MAX_CONTROLLERS - 1] = ControllerDevice(); + + input->joy_connection_changed(idx, false, "Xbox Controller"); +} + +InputDefault::JoyAxis JoystickWinrt::axis_correct(double p_val, bool p_negate, bool p_trigger) const { + + InputDefault::JoyAxis jx; + + jx.min = p_trigger ? 0 : -1; + jx.value = (float)(p_negate ? -p_val : p_val); + + return jx; +} diff --git a/platform/winrt/joystick_winrt.h b/platform/winrt/joystick_winrt.h new file mode 100644 index 00000000000..17f9565708c --- /dev/null +++ b/platform/winrt/joystick_winrt.h @@ -0,0 +1,81 @@ +/*************************************************************************/ +/* joystick.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is 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 Software. */ +/* */ +/* 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 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 */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +#ifndef JOYSTICK_WINRT_H +#define JOYSTICK_WINRT_H + +#include "main/input_default.h" + +ref class JoystickWinrt sealed { + +internal: + + void register_events(); + uint32_t process_controllers(uint32_t p_last_id); + + JoystickWinrt(); + JoystickWinrt(InputDefault* p_input); + +private: + + enum { + MAX_CONTROLLERS = 4, + }; + + enum ControllerType { + GAMEPAD_CONTROLLER, + ARCADE_STICK_CONTROLLER, + RACING_WHEEL_CONTROLLER, + }; + + struct ControllerDevice { + + Windows::Gaming::Input::IGameController^ controller_reference; + + int id; + bool connected; + ControllerType type; + + ControllerDevice() { + id = -1; + connected = false; + type = ControllerType::GAMEPAD_CONTROLLER; + } + }; + + ControllerDevice controllers[MAX_CONTROLLERS]; + + InputDefault* input; + + void OnGamepadAdded(Platform::Object^ sender, Windows::Gaming::Input::Gamepad^ value); + void OnGamepadRemoved(Platform::Object^ sender, Windows::Gaming::Input::Gamepad^ value); + + InputDefault::JoyAxis axis_correct(double p_val, bool p_negate = false, bool p_trigger = false) const; +}; + +#endif diff --git a/platform/winrt/os_winrt.cpp b/platform/winrt/os_winrt.cpp index e14b0f07459..40bc3f4fea5 100644 --- a/platform/winrt/os_winrt.cpp +++ b/platform/winrt/os_winrt.cpp @@ -31,9 +31,7 @@ #include "drivers/unix/memory_pool_static_malloc.h" #include "os/memory_pool_dynamic_static.h" #include "thread_winrt.h" -//#include "drivers/windows/semaphore_windows.h" -#include "drivers/windows/dir_access_windows.h" -#include "drivers/windows/file_access_windows.h" +#include "drivers/windows/semaphore_windows.h" #include "drivers/windows/mutex_windows.h" #include "main/main.h" @@ -45,15 +43,27 @@ #include "io/marshalls.h" #include "os/memory_pool_dynamic_prealloc.h" +#include "platform/windows/packet_peer_udp_winsock.h" +#include "platform/windows/stream_peer_winsock.h" +#include "platform/windows/tcp_server_winsock.h" +#include "drivers/unix/ip_unix.h" + #include +#include using namespace Windows::ApplicationModel::Core; using namespace Windows::ApplicationModel::Activation; using namespace Windows::UI::Core; using namespace Windows::UI::Input; +using namespace Windows::UI::Popups; using namespace Windows::Foundation; using namespace Windows::Graphics::Display; using namespace Microsoft::WRL; +using namespace Windows::UI::ViewManagement; +using namespace Windows::Devices::Input; +using namespace Windows::Devices::Sensors; +using namespace Windows::ApplicationModel::DataTransfer; +using namespace concurrency; int OSWinrt::get_video_driver_count() const { @@ -69,6 +79,66 @@ OS::VideoMode OSWinrt::get_default_video_mode() const { return video_mode; } +Size2 OSWinrt::get_window_size() const { + Size2 size; + size.width = video_mode.width; + size.height = video_mode.height; + return size; +} + +void OSWinrt::set_window_size(const Size2 p_size) { + + Windows::Foundation::Size new_size; + new_size.Width = p_size.width; + new_size.Height = p_size.height; + + ApplicationView^ view = ApplicationView::GetForCurrentView(); + + if (view->TryResizeView(new_size)) { + + video_mode.width = p_size.width; + video_mode.height = p_size.height; + } +} + +void OSWinrt::set_window_fullscreen(bool p_enabled) { + + ApplicationView^ view = ApplicationView::GetForCurrentView(); + + video_mode.fullscreen = view->IsFullScreenMode; + + if (video_mode.fullscreen == p_enabled) + return; + + if (p_enabled) { + + video_mode.fullscreen = view->TryEnterFullScreenMode(); + + } else { + + view->ExitFullScreenMode(); + video_mode.fullscreen = false; + + } +} + +bool OSWinrt::is_window_fullscreen() const { + + return ApplicationView::GetForCurrentView()->IsFullScreenMode; +} + +void OSWinrt::set_keep_screen_on(bool p_enabled) { + + if (is_keep_screen_on() == p_enabled) return; + + if (p_enabled) + display_request->RequestActive(); + else + display_request->RequestRelease(); + + OS::set_keep_screen_on(p_enabled); +} + int OSWinrt::get_audio_driver_count() const { return AudioDriverManagerSW::get_driver_count(); @@ -90,7 +160,7 @@ void OSWinrt::initialize_core() { //RedirectIOToConsole(); ThreadWinrt::make_default(); - //SemaphoreWindows::make_default(); + SemaphoreWindows::make_default(); MutexWindows::make_default(); FileAccess::make_default(FileAccess::ACCESS_RESOURCES); @@ -104,6 +174,10 @@ void OSWinrt::initialize_core() { //TCPServerWinsock::make_default(); //StreamPeerWinsock::make_default(); + TCPServerWinsock::make_default(); + StreamPeerWinsock::make_default(); + PacketPeerUDPWinsock::make_default(); + mempool_static = new MemoryPoolStaticMalloc; #if 1 mempool_dynamic = memnew(MemoryPoolDynamicStatic); @@ -122,7 +196,9 @@ void OSWinrt::initialize_core() { ticks_start = 0; ticks_start = get_ticks_usec(); - cursor_shape = CURSOR_ARROW; + IP_Unix::make_default(); + + cursor_shape=CURSOR_ARROW; } bool OSWinrt::can_draw() const { @@ -149,9 +225,38 @@ void OSWinrt::initialize(const VideoMode &p_desired, int p_video_driver, int p_a VideoMode vm; vm.width = gl_context->get_window_width(); vm.height = gl_context->get_window_height(); - vm.fullscreen = true; vm.resizable = false; + ApplicationView^ view = ApplicationView::GetForCurrentView(); + vm.fullscreen = view->IsFullScreenMode; + + view->SetDesiredBoundsMode(ApplicationViewBoundsMode::UseVisible); + view->PreferredLaunchWindowingMode = ApplicationViewWindowingMode::PreferredLaunchViewSize; + + if (p_desired.fullscreen != view->IsFullScreenMode) { + if (p_desired.fullscreen) { + + vm.fullscreen = view->TryEnterFullScreenMode(); + + } else { + + view->ExitFullScreenMode(); + vm.fullscreen = false; + } + } + + Windows::Foundation::Size desired; + desired.Width = p_desired.width; + desired.Height = p_desired.height; + + view->PreferredLaunchViewSize = desired; + + if (view->TryResizeView(desired)) { + + vm.width = view->VisibleBounds.Width; + vm.height = view->VisibleBounds.Height; + } + set_video_mode(vm); gl_context->make_current(); @@ -174,6 +279,9 @@ void OSWinrt::initialize(const VideoMode &p_desired, int p_video_driver, int p_a input = memnew(InputDefault); + joystick = ref new JoystickWinrt(input); + joystick->register_events(); + AudioDriverManagerSW::get_driver(p_audio_driver)->set_singleton(); if (AudioDriverManagerSW::get_driver(p_audio_driver)->init() != OK) { @@ -191,94 +299,76 @@ void OSWinrt::initialize(const VideoMode &p_desired, int p_video_driver, int p_a spatial_sound_2d_server = memnew(SpatialSound2DServerSW); spatial_sound_2d_server->init(); + managed_object->update_clipboard(); + + Clipboard::ContentChanged += ref new EventHandler(managed_object, &ManagedType::on_clipboard_changed); + + accelerometer = Accelerometer::GetDefault(); + if (accelerometer != nullptr) { + // 60 FPS + accelerometer->ReportInterval = (1.0f / 60.0f) * 1000; + accelerometer->ReadingChanged += + ref new TypedEventHandler + (managed_object, &ManagedType::on_accelerometer_reading_changed); + } + + magnetometer = Magnetometer::GetDefault(); + if (magnetometer != nullptr) { + // 60 FPS + magnetometer->ReportInterval = (1.0f / 60.0f) * 1000; + magnetometer->ReadingChanged += + ref new TypedEventHandler + (managed_object, &ManagedType::on_magnetometer_reading_changed); + } + + gyrometer = Gyrometer::GetDefault(); + if (gyrometer != nullptr) { + // 60 FPS + gyrometer->ReportInterval = (1.0f / 60.0f) * 1000; + gyrometer->ReadingChanged += + ref new TypedEventHandler + (managed_object, &ManagedType::on_gyroscope_reading_changed); + } + _ensure_data_dir(); + + if (is_keep_screen_on()) + display_request->RequestActive(); + + set_keep_screen_on(GLOBAL_DEF("display/keep_screen_on", true)); + } -void OSWinrt::set_clipboard(const String &p_text){ +void OSWinrt::set_clipboard(const String& p_text) { - /* - if (!OpenClipboard(hWnd)) { - ERR_EXPLAIN("Unable to open clipboard."); - ERR_FAIL(); - }; - EmptyClipboard(); + DataPackage^ clip = ref new DataPackage(); + clip->RequestedOperation = DataPackageOperation::Copy; + clip->SetText(ref new Platform::String((const wchar_t*)p_text.c_str())); - HGLOBAL mem = GlobalAlloc(GMEM_MOVEABLE, (p_text.length() + 1) * sizeof(CharType)); - if (mem == NULL) { - ERR_EXPLAIN("Unable to allocate memory for clipboard contents."); - ERR_FAIL(); - }; - LPWSTR lptstrCopy = (LPWSTR)GlobalLock(mem); - memcpy(lptstrCopy, p_text.c_str(), (p_text.length() + 1) * sizeof(CharType)); - //memset((lptstrCopy + p_text.length()), 0, sizeof(CharType)); - GlobalUnlock(mem); - - SetClipboardData(CF_UNICODETEXT, mem); - - // set the CF_TEXT version (not needed?) - CharString utf8 = p_text.utf8(); - mem = GlobalAlloc(GMEM_MOVEABLE, utf8.length() + 1); - if (mem == NULL) { - ERR_EXPLAIN("Unable to allocate memory for clipboard contents."); - ERR_FAIL(); - }; - LPTSTR ptr = (LPTSTR)GlobalLock(mem); - memcpy(ptr, utf8.get_data(), utf8.length()); - ptr[utf8.length()] = 0; - GlobalUnlock(mem); - - SetClipboardData(CF_TEXT, mem); - - CloseClipboard(); - */ + Clipboard::SetContent(clip); }; String OSWinrt::get_clipboard() const { - /* - String ret; - if (!OpenClipboard(hWnd)) { - ERR_EXPLAIN("Unable to open clipboard."); - ERR_FAIL_V(""); - }; - - if (IsClipboardFormatAvailable(CF_UNICODETEXT)) { - - HGLOBAL mem = GetClipboardData(CF_UNICODETEXT); - if (mem != NULL) { - - LPWSTR ptr = (LPWSTR)GlobalLock(mem); - if (ptr != NULL) { - - ret = String((CharType*)ptr); - GlobalUnlock(mem); - }; - }; - - } else if (IsClipboardFormatAvailable(CF_TEXT)) { - - HGLOBAL mem = GetClipboardData(CF_UNICODETEXT); - if (mem != NULL) { - - LPTSTR ptr = (LPTSTR)GlobalLock(mem); - if (ptr != NULL) { - - ret.parse_utf8((const char*)ptr); - GlobalUnlock(mem); - }; - }; - }; - - CloseClipboard(); - - return ret; - */ - return ""; + if (managed_object->clipboard != nullptr) + return managed_object->clipboard->Data(); + else + return ""; }; void OSWinrt::input_event(InputEvent &p_event) { + p_event.ID = ++last_id; + input->parse_input_event(p_event); + + if (p_event.type == InputEvent::MOUSE_BUTTON && p_event.mouse_button.pressed && p_event.mouse_button.button_index>3) { + + //send release for mouse wheel + p_event.mouse_button.pressed = false; + p_event.ID = ++last_id; + input->parse_input_event(p_event); + } }; void OSWinrt::delete_main_loop() { @@ -331,6 +421,9 @@ void OSWinrt::finalize() { physics_2d_server->finish(); memdelete(physics_2d_server); + + joystick = nullptr; + } void OSWinrt::finalize_core() { @@ -360,9 +453,6 @@ void OSWinrt::vprint(const char *p_format, va_list p_list, bool p_stderr) { else wprintf(L"%s", wbuf); -#ifdef STDOUT_FILE -//vwfprintf(stdo,p_format,p_list); -#endif free(wbuf); fflush(stdout); @@ -370,10 +460,101 @@ void OSWinrt::vprint(const char *p_format, va_list p_list, bool p_stderr) { void OSWinrt::alert(const String &p_alert, const String &p_title) { - print_line("ALERT: " + p_alert); + Platform::String^ alert = ref new Platform::String(p_alert.c_str()); + Platform::String^ title = ref new Platform::String(p_title.c_str()); + + MessageDialog^ msg = ref new MessageDialog(alert, title); + + UICommand^ close = ref new UICommand("Close", ref new UICommandInvokedHandler(managed_object, &OSWinrt::ManagedType::alert_close)); + msg->Commands->Append(close); + msg->DefaultCommandIndex = 0; + + managed_object->alert_close_handle = true; + + msg->ShowAsync(); +} + +void OSWinrt::ManagedType::alert_close(IUICommand^ command) { + + alert_close_handle = false; +} + +void OSWinrt::ManagedType::on_clipboard_changed(Platform::Object ^ sender, Platform::Object ^ ev) { + + update_clipboard(); +} + +void OSWinrt::ManagedType::update_clipboard() { + + DataPackageView^ data = Clipboard::GetContent(); + + if (data->Contains(StandardDataFormats::Text)) { + + create_task(data->GetTextAsync()).then( + [this](Platform::String^ clipboard_content) { + + this->clipboard = clipboard_content; + }); + } +} + +void OSWinrt::ManagedType::on_accelerometer_reading_changed(Accelerometer ^ sender, AccelerometerReadingChangedEventArgs ^ args) { + + AccelerometerReading^ reading = args->Reading; + + os->input->set_accelerometer(Vector3( + reading->AccelerationX, + reading->AccelerationY, + reading->AccelerationZ + )); +} + +void OSWinrt::ManagedType::on_magnetometer_reading_changed(Magnetometer ^ sender, MagnetometerReadingChangedEventArgs ^ args) { + + MagnetometerReading^ reading = args->Reading; + + os->input->set_magnetometer(Vector3( + reading->MagneticFieldX, + reading->MagneticFieldY, + reading->MagneticFieldZ + )); +} + +void OSWinrt::ManagedType::on_gyroscope_reading_changed(Gyrometer ^ sender, GyrometerReadingChangedEventArgs ^ args) { + + GyrometerReading^ reading = args->Reading; + + os->input->set_magnetometer(Vector3( + reading->AngularVelocityX, + reading->AngularVelocityY, + reading->AngularVelocityZ + )); } void OSWinrt::set_mouse_mode(MouseMode p_mode) { + + if (p_mode == MouseMode::MOUSE_MODE_CAPTURED) { + + CoreWindow::GetForCurrentThread()->SetPointerCapture(); + + } else { + + CoreWindow::GetForCurrentThread()->ReleasePointerCapture(); + + } + + if (p_mode == MouseMode::MOUSE_MODE_CAPTURED || p_mode == MouseMode::MOUSE_MODE_HIDDEN) { + + CoreWindow::GetForCurrentThread()->PointerCursor = nullptr; + + } else { + + CoreWindow::GetForCurrentThread()->PointerCursor = ref new CoreCursor(CoreCursorType::Arrow, 0); + } + + mouse_mode = p_mode; + + SetEvent(mouse_mode_changed); } OSWinrt::MouseMode OSWinrt::get_mouse_mode() const { @@ -465,7 +646,7 @@ OS::Time OSWinrt::get_time(bool utc) const { return time; } -OS::TimeZoneInfo OS_Windows::get_time_zone_info() const { +OS::TimeZoneInfo OSWinrt::get_time_zone_info() const { TIME_ZONE_INFORMATION info; bool daylight = false; if (GetTimeZoneInformation(&info) == TIME_ZONE_ID_DAYLIGHT) @@ -486,7 +667,7 @@ uint64_t OSWinrt::get_unix_time() const { FILETIME ft; SYSTEMTIME st; - GetSystemTime(&systemtime); + GetSystemTime(&st); SystemTimeToFileTime(&st, &ft); SYSTEMTIME ep; @@ -526,9 +707,79 @@ uint64_t OSWinrt::get_ticks_usec() const { } void OSWinrt::process_events() { + last_id = joystick->process_controllers(last_id); + process_key_events(); +} + +void OSWinrt::process_key_events() +{ + + for (int i = 0; i < key_event_pos; i++) { + + KeyEvent &kev = key_event_buffer[i]; + InputEvent iev; + + iev.type = InputEvent::KEY; + iev.key.mod = kev.mod_state; + iev.key.echo = kev.echo; + iev.key.scancode = kev.scancode; + iev.key.unicode = kev.unicode; + iev.key.pressed = kev.pressed; + + input_event(iev); + + } + key_event_pos = 0; +} + +void OSWinrt::queue_key_event(KeyEvent & p_event) +{ + // This merges Char events with the previous Key event, so + // the unicode can be retrieved without sending duplicate events. + if (p_event.type == KeyEvent::MessageType::CHAR_EVENT_MESSAGE && key_event_pos > 0) { + + KeyEvent &old = key_event_buffer[key_event_pos - 1]; + ERR_FAIL_COND(old.type != KeyEvent::MessageType::KEY_EVENT_MESSAGE); + + key_event_buffer[key_event_pos - 1].unicode = p_event.unicode; + return; + } + + ERR_FAIL_COND(key_event_pos >= KEY_EVENT_BUFFER_SIZE); + + key_event_buffer[key_event_pos++] = p_event; } void OSWinrt::set_cursor_shape(CursorShape p_shape) { + + ERR_FAIL_INDEX(p_shape, CURSOR_MAX); + + if (cursor_shape == p_shape) + return; + + static const CoreCursorType uwp_cursors[CURSOR_MAX] = { + CoreCursorType::Arrow, + CoreCursorType::IBeam, + CoreCursorType::Hand, + CoreCursorType::Cross, + CoreCursorType::Wait, + CoreCursorType::Wait, + CoreCursorType::Arrow, + CoreCursorType::Arrow, + CoreCursorType::UniversalNo, + CoreCursorType::SizeNorthSouth, + CoreCursorType::SizeWestEast, + CoreCursorType::SizeNortheastSouthwest, + CoreCursorType::SizeNorthwestSoutheast, + CoreCursorType::SizeAll, + CoreCursorType::SizeNorthSouth, + CoreCursorType::SizeWestEast, + CoreCursorType::Help + }; + + CoreWindow::GetForCurrentThread()->PointerCursor = ref new CoreCursor(uwp_cursors[p_shape], 0); + + cursor_shape = p_shape; } Error OSWinrt::execute(const String &p_path, const List &p_arguments, bool p_blocking, ProcessID *r_child_id, String *r_pipe, int *r_exitcode) { @@ -582,8 +833,8 @@ String OSWinrt::get_locale() const { #if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP // this should work on phone 8.1, but it doesn't return "en"; #else - Platform::String ^ language = Windows::Globalization::Language::CurrentInputMethodLanguageTag; - return language->Data(); + Platform::String ^language = Windows::Globalization::Language::CurrentInputMethodLanguageTag; + return String(language->Data()).replace("-", "_"); #endif } @@ -602,6 +853,29 @@ void OSWinrt::swap_buffers() { gl_context->swap_buffers(); } +bool OSWinrt::has_touchscreen_ui_hint() const { + + TouchCapabilities^ tc = ref new TouchCapabilities(); + return tc->TouchPresent != 0 || UIViewSettings::GetForCurrentView()->UserInteractionMode == UserInteractionMode::Touch; +} + +bool OSWinrt::has_virtual_keyboard() const { + + return UIViewSettings::GetForCurrentView()->UserInteractionMode == UserInteractionMode::Touch; +} + +void OSWinrt::show_virtual_keyboard(const String & p_existing_text, const Rect2 & p_screen_rect) { + + InputPane^ pane = InputPane::GetForCurrentView(); + pane->TryShow(); +} + +void OSWinrt::hide_virtual_keyboard() { + + InputPane^ pane = InputPane::GetForCurrentView(); + pane->TryHide(); +} + void OSWinrt::run() { if (!main_loop) @@ -617,6 +891,7 @@ void OSWinrt::run() { while (!force_quit) { CoreWindow::GetForCurrentThread()->Dispatcher->ProcessEvents(CoreProcessEventsOption::ProcessAllIfPresent); + if (managed_object->alert_close_handle) continue; process_events(); // get rid of pending events if (Main::iteration() == true) break; @@ -634,7 +909,7 @@ String OSWinrt::get_data_dir() const { Windows::Storage::StorageFolder ^ data_folder = Windows::Storage::ApplicationData::Current->LocalFolder; - return data_folder->Path->Data(); + return String(data_folder->Path->Data()).replace("\\", "/"); } OSWinrt::OSWinrt() { @@ -658,6 +933,13 @@ OSWinrt::OSWinrt() { gl_context = NULL; + display_request = ref new Windows::System::Display::DisplayRequest(); + + managed_object = ref new ManagedType; + managed_object->os = this; + + mouse_mode_changed = CreateEvent(NULL, TRUE, FALSE, L"os_mouse_mode_changed"); + AudioDriverManagerSW::add_driver(&audio_driver); } diff --git a/platform/winrt/os_winrt.h b/platform/winrt/os_winrt.h index 346b8ec33b2..902adc7c3ab 100644 --- a/platform/winrt/os_winrt.h +++ b/platform/winrt/os_winrt.h @@ -42,9 +42,14 @@ #include "servers/physics_2d/physics_2d_server_sw.h" #include "servers/spatial_sound/spatial_sound_server_sw.h" #include "servers/spatial_sound_2d/spatial_sound_2d_server_sw.h" +#include "servers/physics_2d/physics_2d_server_sw.h" +#include "audio_driver_winrt.h" #include "gl_context_egl.h" +#include "core/math/math_2d.h" +#include "core/ustring.h" + #include #include @@ -53,11 +58,35 @@ #include #include +#include "joystick_winrt.h" + /** @author Juan Linietsky */ class OSWinrt : public OS { +public: + + struct KeyEvent { + + enum MessageType + { + KEY_EVENT_MESSAGE, + CHAR_EVENT_MESSAGE + }; + + InputModifierState mod_state; + MessageType type; + bool pressed; + unsigned int scancode; + unsigned int unicode; + bool echo; + CorePhysicalKeyStatus status; + + }; + +private: + enum { JOYSTICKS_MAX = 8, JOY_AXIS_COUNT = 6, @@ -67,14 +96,6 @@ class OSWinrt : public OS { FILE *stdo; - struct KeyEvent { - - InputModifierState mod_state; - UINT uMsg; - WPARAM wParam; - LPARAM lParam; - }; - KeyEvent key_event_buffer[KEY_EVENT_BUFFER_SIZE]; int key_event_pos; @@ -95,37 +116,11 @@ class OSWinrt : public OS { ContextEGL *gl_context; - struct Joystick { - - int id; - bool attached; - - DWORD last_axis[JOY_AXIS_COUNT]; - DWORD last_buttons; - DWORD last_pov; - String name; - - Joystick() { - id = -1; - attached = false; - for (int i = 0; i < JOY_AXIS_COUNT; i++) { - - last_axis[i] = 0; - }; - last_buttons = 0; - last_pov = 0; - }; - }; - - List joystick_change_queue; - int joystick_count; - Joystick joysticks[JOYSTICKS_MAX]; - VideoMode video_mode; MainLoop *main_loop; - AudioDriverDummy audio_driver; + AudioDriverWinRT audio_driver; AudioServerSW *audio_server; SampleManagerMallocSW *sample_manager; SpatialSoundServerSW *spatial_sound_server; @@ -144,10 +139,34 @@ class OSWinrt : public OS { InputDefault *input; + JoystickWinrt^ joystick; + + Windows::System::Display::DisplayRequest^ display_request; + void _post_dpad(DWORD p_dpad, int p_device, bool p_pressed); - void _drag_event(int idx, UINT uMsg, WPARAM wParam, LPARAM lParam); - void _touch_event(int idx, UINT uMsg, WPARAM wParam, LPARAM lParam); + void _drag_event(int idx,UINT uMsg, WPARAM wParam, LPARAM lParam); + void _touch_event(int idx, UINT uMsg, WPARAM wParam, LPARAM lParam); + + ref class ManagedType { + public: + property bool alert_close_handle; + property Platform::String^ clipboard; + void alert_close(Windows::UI::Popups::IUICommand^ command); + void on_clipboard_changed(Platform::Object^ sender, Platform::Object^ ev); + void update_clipboard(); + void on_accelerometer_reading_changed(Windows::Devices::Sensors::Accelerometer^ sender, Windows::Devices::Sensors::AccelerometerReadingChangedEventArgs^ args); + void on_magnetometer_reading_changed(Windows::Devices::Sensors::Magnetometer^ sender, Windows::Devices::Sensors::MagnetometerReadingChangedEventArgs^ args); + void on_gyroscope_reading_changed(Windows::Devices::Sensors::Gyrometer^ sender, Windows::Devices::Sensors::GyrometerReadingChangedEventArgs^ args); + + internal: + ManagedType() { alert_close_handle = false; } + property OSWinrt* os; + }; + ManagedType^ managed_object; + Windows::Devices::Sensors::Accelerometer^ accelerometer; + Windows::Devices::Sensors::Magnetometer^ magnetometer; + Windows::Devices::Sensors::Gyrometer^ gyrometer; // functions used by main to initialize/deintialize the OS protected: @@ -170,15 +189,18 @@ protected: void process_events(); - void probe_joysticks(); - void process_joysticks(); void process_key_events(); public: void print_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, ErrorType p_type); - virtual void vprint(const char *p_format, va_list p_list, bool p_stderr = false); - virtual void alert(const String &p_alert, const String &p_title = "ALERT!"); + // Event to send to the app wrapper + HANDLE mouse_mode_changed; + + void print_error(const char* p_function,const char* p_file,int p_line,const char *p_code,const char*p_rationale,ErrorType p_type); + + virtual void vprint(const char *p_format, va_list p_list, bool p_stderr=false); + virtual void alert(const String& p_alert,const String& p_title="ALERT!"); String get_stdin_string(bool p_block); void set_mouse_mode(MouseMode p_mode); @@ -188,9 +210,14 @@ public: virtual int get_mouse_button_state() const; virtual void set_window_title(const String &p_title); - virtual void set_video_mode(const VideoMode &p_video_mode, int p_screen = 0); - virtual VideoMode get_video_mode(int p_screen = 0) const; - virtual void get_fullscreen_mode_list(List *p_list, int p_screen = 0) const; + virtual void set_video_mode(const VideoMode& p_video_mode,int p_screen=0); + virtual VideoMode get_video_mode(int p_screen=0) const; + virtual void get_fullscreen_mode_list(List *p_list,int p_screen=0) const; + virtual Size2 get_window_size() const; + virtual void set_window_size(const Size2 p_size); + virtual void set_window_fullscreen(bool p_enabled); + virtual bool is_window_fullscreen() const; + virtual void set_keep_screen_on(bool p_enabled); virtual MainLoop *get_main_loop() const; @@ -233,7 +260,11 @@ public: virtual void make_rendering_thread(); virtual void swap_buffers(); - virtual bool has_touchscreen_ui_hint() const { return true; }; + virtual bool has_touchscreen_ui_hint() const; + + virtual bool has_virtual_keyboard() const; + virtual void show_virtual_keyboard(const String& p_existing_text, const Rect2& p_screen_rect = Rect2()); + virtual void hide_virtual_keyboard(); virtual Error shell_open(String p_uri); @@ -243,6 +274,8 @@ public: void input_event(InputEvent &p_event); + void queue_key_event(KeyEvent &p_event); + OSWinrt(); ~OSWinrt(); }; diff --git a/platform/winrt/thread_winrt.cpp b/platform/winrt/thread_winrt.cpp index cf127734c03..860efdb0ed8 100644 --- a/platform/winrt/thread_winrt.cpp +++ b/platform/winrt/thread_winrt.cpp @@ -57,8 +57,10 @@ Thread::ID ThreadWinrt::get_ID() const { return std::hash()(thread.get_id()); }; -void ThreadWinrt::make_default(){ - +void ThreadWinrt::make_default() { + create_func = create_func_winrt; + get_thread_ID_func = get_thread_ID_func_winrt; + wait_to_finish_func = wait_to_finish_func_winrt; }; ThreadWinrt::ThreadWinrt(){ From e01fdd8a86616d098a9ca5a0a8f3fb5cdf42582d Mon Sep 17 00:00:00 2001 From: George Marques Date: Sat, 3 Sep 2016 19:29:46 -0300 Subject: [PATCH 2/8] Remove embedded ANGLE headers There's now a dependency on external ANGLE code, those are not needed anymore. --- platform/winrt/include/EGL/egl.h | 298 --- platform/winrt/include/EGL/eglext.h | 766 ------- platform/winrt/include/EGL/eglplatform.h | 131 -- platform/winrt/include/GLES2/gl2.h | 620 ------ platform/winrt/include/GLES2/gl2ext.h | 2013 ------------------- platform/winrt/include/GLES2/gl2platform.h | 30 - platform/winrt/include/GLES3/gl3.h | 1061 ---------- platform/winrt/include/GLES3/gl3ext.h | 24 - platform/winrt/include/GLES3/gl3platform.h | 30 - platform/winrt/include/GLSLANG/ShaderLang.h | 411 ---- platform/winrt/include/GLSLANG/ShaderVars.h | 185 -- platform/winrt/include/KHR/khrplatform.h | 282 --- platform/winrt/include/LICENSE.ANGLE.txt | 32 - platform/winrt/include/angle_gl.h | 23 - platform/winrt/include/angle_windowsstore.h | 37 - 15 files changed, 5943 deletions(-) delete mode 100644 platform/winrt/include/EGL/egl.h delete mode 100644 platform/winrt/include/EGL/eglext.h delete mode 100644 platform/winrt/include/EGL/eglplatform.h delete mode 100644 platform/winrt/include/GLES2/gl2.h delete mode 100644 platform/winrt/include/GLES2/gl2ext.h delete mode 100644 platform/winrt/include/GLES2/gl2platform.h delete mode 100644 platform/winrt/include/GLES3/gl3.h delete mode 100644 platform/winrt/include/GLES3/gl3ext.h delete mode 100644 platform/winrt/include/GLES3/gl3platform.h delete mode 100644 platform/winrt/include/GLSLANG/ShaderLang.h delete mode 100644 platform/winrt/include/GLSLANG/ShaderVars.h delete mode 100644 platform/winrt/include/KHR/khrplatform.h delete mode 100644 platform/winrt/include/LICENSE.ANGLE.txt delete mode 100644 platform/winrt/include/angle_gl.h delete mode 100644 platform/winrt/include/angle_windowsstore.h diff --git a/platform/winrt/include/EGL/egl.h b/platform/winrt/include/EGL/egl.h deleted file mode 100644 index 12590a0e203..00000000000 --- a/platform/winrt/include/EGL/egl.h +++ /dev/null @@ -1,298 +0,0 @@ -#ifndef __egl_h_ -#define __egl_h_ 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Copyright (c) 2013-2014 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. -*/ -/* -** This header is generated from the Khronos OpenGL / OpenGL ES XML -** API Registry. The current version of the Registry, generator scripts -** used to make the header, and the header can be found at -** http://www.opengl.org/registry/ -** -** Khronos $Revision: 27018 $ on $Date: 2014-06-10 08:06:12 -0700 (Tue, 10 Jun 2014) $ -*/ - -#include - -/* Generated on date 20140610 */ - -/* Generated C header for: - * API: egl - * Versions considered: .* - * Versions emitted: .* - * Default extensions included: None - * Additional extensions included: _nomatch_^ - * Extensions removed: _nomatch_^ - */ - -#ifndef EGL_VERSION_1_0 -#define EGL_VERSION_1_0 1 -typedef unsigned int EGLBoolean; -typedef void *EGLDisplay; -#include -#include -typedef void *EGLConfig; -typedef void *EGLSurface; -typedef void *EGLContext; -typedef void (*__eglMustCastToProperFunctionPointerType)(void); -#define EGL_ALPHA_SIZE 0x3021 -#define EGL_BAD_ACCESS 0x3002 -#define EGL_BAD_ALLOC 0x3003 -#define EGL_BAD_ATTRIBUTE 0x3004 -#define EGL_BAD_CONFIG 0x3005 -#define EGL_BAD_CONTEXT 0x3006 -#define EGL_BAD_CURRENT_SURFACE 0x3007 -#define EGL_BAD_DISPLAY 0x3008 -#define EGL_BAD_MATCH 0x3009 -#define EGL_BAD_NATIVE_PIXMAP 0x300A -#define EGL_BAD_NATIVE_WINDOW 0x300B -#define EGL_BAD_PARAMETER 0x300C -#define EGL_BAD_SURFACE 0x300D -#define EGL_BLUE_SIZE 0x3022 -#define EGL_BUFFER_SIZE 0x3020 -#define EGL_CONFIG_CAVEAT 0x3027 -#define EGL_CONFIG_ID 0x3028 -#define EGL_CORE_NATIVE_ENGINE 0x305B -#define EGL_DEPTH_SIZE 0x3025 -#define EGL_DONT_CARE ((EGLint)-1) -#define EGL_DRAW 0x3059 -#define EGL_EXTENSIONS 0x3055 -#define EGL_FALSE 0 -#define EGL_GREEN_SIZE 0x3023 -#define EGL_HEIGHT 0x3056 -#define EGL_LARGEST_PBUFFER 0x3058 -#define EGL_LEVEL 0x3029 -#define EGL_MAX_PBUFFER_HEIGHT 0x302A -#define EGL_MAX_PBUFFER_PIXELS 0x302B -#define EGL_MAX_PBUFFER_WIDTH 0x302C -#define EGL_NATIVE_RENDERABLE 0x302D -#define EGL_NATIVE_VISUAL_ID 0x302E -#define EGL_NATIVE_VISUAL_TYPE 0x302F -#define EGL_NONE 0x3038 -#define EGL_NON_CONFORMANT_CONFIG 0x3051 -#define EGL_NOT_INITIALIZED 0x3001 -#define EGL_NO_CONTEXT ((EGLContext)0) -#define EGL_NO_DISPLAY ((EGLDisplay)0) -#define EGL_NO_SURFACE ((EGLSurface)0) -#define EGL_PBUFFER_BIT 0x0001 -#define EGL_PIXMAP_BIT 0x0002 -#define EGL_READ 0x305A -#define EGL_RED_SIZE 0x3024 -#define EGL_SAMPLES 0x3031 -#define EGL_SAMPLE_BUFFERS 0x3032 -#define EGL_SLOW_CONFIG 0x3050 -#define EGL_STENCIL_SIZE 0x3026 -#define EGL_SUCCESS 0x3000 -#define EGL_SURFACE_TYPE 0x3033 -#define EGL_TRANSPARENT_BLUE_VALUE 0x3035 -#define EGL_TRANSPARENT_GREEN_VALUE 0x3036 -#define EGL_TRANSPARENT_RED_VALUE 0x3037 -#define EGL_TRANSPARENT_RGB 0x3052 -#define EGL_TRANSPARENT_TYPE 0x3034 -#define EGL_TRUE 1 -#define EGL_VENDOR 0x3053 -#define EGL_VERSION 0x3054 -#define EGL_WIDTH 0x3057 -#define EGL_WINDOW_BIT 0x0004 -EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig (EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config); -EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers (EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target); -EGLAPI EGLContext EGLAPIENTRY eglCreateContext (EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list); -EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list); -EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface (EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list); -EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface (EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroyContext (EGLDisplay dpy, EGLContext ctx); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroySurface (EGLDisplay dpy, EGLSurface surface); -EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigAttrib (EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value); -EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigs (EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config); -EGLAPI EGLDisplay EGLAPIENTRY eglGetCurrentDisplay (void); -EGLAPI EGLSurface EGLAPIENTRY eglGetCurrentSurface (EGLint readdraw); -EGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay (EGLNativeDisplayType display_id); -EGLAPI EGLint EGLAPIENTRY eglGetError (void); -EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY eglGetProcAddress (const char *procname); -EGLAPI EGLBoolean EGLAPIENTRY eglInitialize (EGLDisplay dpy, EGLint *major, EGLint *minor); -EGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent (EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryContext (EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value); -EGLAPI const char *EGLAPIENTRY eglQueryString (EGLDisplay dpy, EGLint name); -EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value); -EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers (EGLDisplay dpy, EGLSurface surface); -EGLAPI EGLBoolean EGLAPIENTRY eglTerminate (EGLDisplay dpy); -EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL (void); -EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative (EGLint engine); -#endif /* EGL_VERSION_1_0 */ - -#ifndef EGL_VERSION_1_1 -#define EGL_VERSION_1_1 1 -#define EGL_BACK_BUFFER 0x3084 -#define EGL_BIND_TO_TEXTURE_RGB 0x3039 -#define EGL_BIND_TO_TEXTURE_RGBA 0x303A -#define EGL_CONTEXT_LOST 0x300E -#define EGL_MIN_SWAP_INTERVAL 0x303B -#define EGL_MAX_SWAP_INTERVAL 0x303C -#define EGL_MIPMAP_TEXTURE 0x3082 -#define EGL_MIPMAP_LEVEL 0x3083 -#define EGL_NO_TEXTURE 0x305C -#define EGL_TEXTURE_2D 0x305F -#define EGL_TEXTURE_FORMAT 0x3080 -#define EGL_TEXTURE_RGB 0x305D -#define EGL_TEXTURE_RGBA 0x305E -#define EGL_TEXTURE_TARGET 0x3081 -EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer); -EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer); -EGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value); -EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval (EGLDisplay dpy, EGLint interval); -#endif /* EGL_VERSION_1_1 */ - -#ifndef EGL_VERSION_1_2 -#define EGL_VERSION_1_2 1 -typedef unsigned int EGLenum; -typedef void *EGLClientBuffer; -#define EGL_ALPHA_FORMAT 0x3088 -#define EGL_ALPHA_FORMAT_NONPRE 0x308B -#define EGL_ALPHA_FORMAT_PRE 0x308C -#define EGL_ALPHA_MASK_SIZE 0x303E -#define EGL_BUFFER_PRESERVED 0x3094 -#define EGL_BUFFER_DESTROYED 0x3095 -#define EGL_CLIENT_APIS 0x308D -#define EGL_COLORSPACE 0x3087 -#define EGL_COLORSPACE_sRGB 0x3089 -#define EGL_COLORSPACE_LINEAR 0x308A -#define EGL_COLOR_BUFFER_TYPE 0x303F -#define EGL_CONTEXT_CLIENT_TYPE 0x3097 -#define EGL_DISPLAY_SCALING 10000 -#define EGL_HORIZONTAL_RESOLUTION 0x3090 -#define EGL_LUMINANCE_BUFFER 0x308F -#define EGL_LUMINANCE_SIZE 0x303D -#define EGL_OPENGL_ES_BIT 0x0001 -#define EGL_OPENVG_BIT 0x0002 -#define EGL_OPENGL_ES_API 0x30A0 -#define EGL_OPENVG_API 0x30A1 -#define EGL_OPENVG_IMAGE 0x3096 -#define EGL_PIXEL_ASPECT_RATIO 0x3092 -#define EGL_RENDERABLE_TYPE 0x3040 -#define EGL_RENDER_BUFFER 0x3086 -#define EGL_RGB_BUFFER 0x308E -#define EGL_SINGLE_BUFFER 0x3085 -#define EGL_SWAP_BEHAVIOR 0x3093 -#define EGL_UNKNOWN ((EGLint)-1) -#define EGL_VERTICAL_RESOLUTION 0x3091 -EGLAPI EGLBoolean EGLAPIENTRY eglBindAPI (EGLenum api); -EGLAPI EGLenum EGLAPIENTRY eglQueryAPI (void); -EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer (EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread (void); -EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient (void); -#endif /* EGL_VERSION_1_2 */ - -#ifndef EGL_VERSION_1_3 -#define EGL_VERSION_1_3 1 -#define EGL_CONFORMANT 0x3042 -#define EGL_CONTEXT_CLIENT_VERSION 0x3098 -#define EGL_MATCH_NATIVE_PIXMAP 0x3041 -#define EGL_OPENGL_ES2_BIT 0x0004 -#define EGL_VG_ALPHA_FORMAT 0x3088 -#define EGL_VG_ALPHA_FORMAT_NONPRE 0x308B -#define EGL_VG_ALPHA_FORMAT_PRE 0x308C -#define EGL_VG_ALPHA_FORMAT_PRE_BIT 0x0040 -#define EGL_VG_COLORSPACE 0x3087 -#define EGL_VG_COLORSPACE_sRGB 0x3089 -#define EGL_VG_COLORSPACE_LINEAR 0x308A -#define EGL_VG_COLORSPACE_LINEAR_BIT 0x0020 -#endif /* EGL_VERSION_1_3 */ - -#ifndef EGL_VERSION_1_4 -#define EGL_VERSION_1_4 1 -#define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType)0) -#define EGL_MULTISAMPLE_RESOLVE_BOX_BIT 0x0200 -#define EGL_MULTISAMPLE_RESOLVE 0x3099 -#define EGL_MULTISAMPLE_RESOLVE_DEFAULT 0x309A -#define EGL_MULTISAMPLE_RESOLVE_BOX 0x309B -#define EGL_OPENGL_API 0x30A2 -#define EGL_OPENGL_BIT 0x0008 -#define EGL_SWAP_BEHAVIOR_PRESERVED_BIT 0x0400 -EGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext (void); -#endif /* EGL_VERSION_1_4 */ - -#ifndef EGL_VERSION_1_5 -#define EGL_VERSION_1_5 1 -typedef void *EGLSync; -typedef intptr_t EGLAttrib; -typedef khronos_utime_nanoseconds_t EGLTime; -#define EGL_CONTEXT_MAJOR_VERSION 0x3098 -#define EGL_CONTEXT_MINOR_VERSION 0x30FB -#define EGL_CONTEXT_OPENGL_PROFILE_MASK 0x30FD -#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY 0x31BD -#define EGL_NO_RESET_NOTIFICATION 0x31BE -#define EGL_LOSE_CONTEXT_ON_RESET 0x31BF -#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT 0x00000001 -#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT 0x00000002 -#define EGL_CONTEXT_OPENGL_DEBUG 0x31B0 -#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE 0x31B1 -#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS 0x31B2 -#define EGL_OPENGL_ES3_BIT 0x00000040 -#define EGL_CL_EVENT_HANDLE 0x309C -#define EGL_SYNC_CL_EVENT 0x30FE -#define EGL_SYNC_CL_EVENT_COMPLETE 0x30FF -#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE 0x30F0 -#define EGL_SYNC_TYPE 0x30F7 -#define EGL_SYNC_STATUS 0x30F1 -#define EGL_SYNC_CONDITION 0x30F8 -#define EGL_SIGNALED 0x30F2 -#define EGL_UNSIGNALED 0x30F3 -#define EGL_SYNC_FLUSH_COMMANDS_BIT 0x0001 -#define EGL_FOREVER 0xFFFFFFFFFFFFFFFFull -#define EGL_TIMEOUT_EXPIRED 0x30F5 -#define EGL_CONDITION_SATISFIED 0x30F6 -#define EGL_NO_SYNC ((EGLSync)0) -#define EGL_SYNC_FENCE 0x30F9 -#define EGL_GL_COLORSPACE 0x309D -#define EGL_GL_COLORSPACE_SRGB 0x3089 -#define EGL_GL_COLORSPACE_LINEAR 0x308A -#define EGL_GL_RENDERBUFFER 0x30B9 -#define EGL_GL_TEXTURE_2D 0x30B1 -#define EGL_GL_TEXTURE_LEVEL 0x30BC -#define EGL_GL_TEXTURE_3D 0x30B2 -#define EGL_GL_TEXTURE_ZOFFSET 0x30BD -#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x30B3 -#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x30B4 -#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x30B5 -#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x30B6 -#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x30B7 -#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x30B8 -EGLAPI EGLSync EGLAPIENTRY eglCreateSync (EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroySync (EGLDisplay dpy, EGLSync sync); -EGLAPI EGLint EGLAPIENTRY eglClientWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout); -EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttrib (EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib *value); -EGLAPI EGLDisplay EGLAPIENTRY eglGetPlatformDisplay (EGLenum platform, void *native_display, const EGLAttrib *attrib_list); -EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurface (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLAttrib *attrib_list); -EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurface (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLAttrib *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags); -#endif /* EGL_VERSION_1_5 */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/platform/winrt/include/EGL/eglext.h b/platform/winrt/include/EGL/eglext.h deleted file mode 100644 index 05b2555f313..00000000000 --- a/platform/winrt/include/EGL/eglext.h +++ /dev/null @@ -1,766 +0,0 @@ -#ifndef __eglext_h_ -#define __eglext_h_ 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Copyright (c) 2013-2014 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. -*/ -/* -** This header is generated from the Khronos OpenGL / OpenGL ES XML -** API Registry. The current version of the Registry, generator scripts -** used to make the header, and the header can be found at -** http://www.opengl.org/registry/ -** -** Khronos $Revision: 27018 $ on $Date: 2014-06-10 08:06:12 -0700 (Tue, 10 Jun 2014) $ -*/ - -#include - -#define EGL_EGLEXT_VERSION 20140610 - -/* Generated C header for: - * API: egl - * Versions considered: .* - * Versions emitted: _nomatch_^ - * Default extensions included: egl - * Additional extensions included: _nomatch_^ - * Extensions removed: _nomatch_^ - */ - -#ifndef EGL_KHR_cl_event -#define EGL_KHR_cl_event 1 -#define EGL_CL_EVENT_HANDLE_KHR 0x309C -#define EGL_SYNC_CL_EVENT_KHR 0x30FE -#define EGL_SYNC_CL_EVENT_COMPLETE_KHR 0x30FF -#endif /* EGL_KHR_cl_event */ - -#ifndef EGL_KHR_cl_event2 -#define EGL_KHR_cl_event2 1 -typedef void *EGLSyncKHR; -typedef intptr_t EGLAttribKHR; -typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNC64KHRPROC) (EGLDisplay dpy, EGLenum type, const EGLAttribKHR *attrib_list); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSync64KHR (EGLDisplay dpy, EGLenum type, const EGLAttribKHR *attrib_list); -#endif -#endif /* EGL_KHR_cl_event2 */ - -#ifndef EGL_KHR_client_get_all_proc_addresses -#define EGL_KHR_client_get_all_proc_addresses 1 -#endif /* EGL_KHR_client_get_all_proc_addresses */ - -#ifndef EGL_KHR_config_attribs -#define EGL_KHR_config_attribs 1 -#define EGL_CONFORMANT_KHR 0x3042 -#define EGL_VG_COLORSPACE_LINEAR_BIT_KHR 0x0020 -#define EGL_VG_ALPHA_FORMAT_PRE_BIT_KHR 0x0040 -#endif /* EGL_KHR_config_attribs */ - -#ifndef EGL_KHR_create_context -#define EGL_KHR_create_context 1 -#define EGL_CONTEXT_MAJOR_VERSION_KHR 0x3098 -#define EGL_CONTEXT_MINOR_VERSION_KHR 0x30FB -#define EGL_CONTEXT_FLAGS_KHR 0x30FC -#define EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR 0x30FD -#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR 0x31BD -#define EGL_NO_RESET_NOTIFICATION_KHR 0x31BE -#define EGL_LOSE_CONTEXT_ON_RESET_KHR 0x31BF -#define EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR 0x00000001 -#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR 0x00000002 -#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR 0x00000004 -#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR 0x00000001 -#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR 0x00000002 -#define EGL_OPENGL_ES3_BIT_KHR 0x00000040 -#endif /* EGL_KHR_create_context */ - -#ifndef EGL_KHR_fence_sync -#define EGL_KHR_fence_sync 1 -#ifdef KHRONOS_SUPPORT_INT64 -#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR 0x30F0 -#define EGL_SYNC_CONDITION_KHR 0x30F8 -#define EGL_SYNC_FENCE_KHR 0x30F9 -#endif /* KHRONOS_SUPPORT_INT64 */ -#endif /* EGL_KHR_fence_sync */ - -#ifndef EGL_KHR_get_all_proc_addresses -#define EGL_KHR_get_all_proc_addresses 1 -#endif /* EGL_KHR_get_all_proc_addresses */ - -#ifndef EGL_KHR_gl_colorspace -#define EGL_KHR_gl_colorspace 1 -#define EGL_GL_COLORSPACE_KHR 0x309D -#define EGL_GL_COLORSPACE_SRGB_KHR 0x3089 -#define EGL_GL_COLORSPACE_LINEAR_KHR 0x308A -#endif /* EGL_KHR_gl_colorspace */ - -#ifndef EGL_KHR_gl_renderbuffer_image -#define EGL_KHR_gl_renderbuffer_image 1 -#define EGL_GL_RENDERBUFFER_KHR 0x30B9 -#endif /* EGL_KHR_gl_renderbuffer_image */ - -#ifndef EGL_KHR_gl_texture_2D_image -#define EGL_KHR_gl_texture_2D_image 1 -#define EGL_GL_TEXTURE_2D_KHR 0x30B1 -#define EGL_GL_TEXTURE_LEVEL_KHR 0x30BC -#endif /* EGL_KHR_gl_texture_2D_image */ - -#ifndef EGL_KHR_gl_texture_3D_image -#define EGL_KHR_gl_texture_3D_image 1 -#define EGL_GL_TEXTURE_3D_KHR 0x30B2 -#define EGL_GL_TEXTURE_ZOFFSET_KHR 0x30BD -#endif /* EGL_KHR_gl_texture_3D_image */ - -#ifndef EGL_KHR_gl_texture_cubemap_image -#define EGL_KHR_gl_texture_cubemap_image 1 -#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR 0x30B3 -#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR 0x30B4 -#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR 0x30B5 -#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR 0x30B6 -#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR 0x30B7 -#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR 0x30B8 -#endif /* EGL_KHR_gl_texture_cubemap_image */ - -#ifndef EGL_KHR_image -#define EGL_KHR_image 1 -typedef void *EGLImageKHR; -#define EGL_NATIVE_PIXMAP_KHR 0x30B0 -#define EGL_NO_IMAGE_KHR ((EGLImageKHR)0) -typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImageKHR image); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR (EGLDisplay dpy, EGLImageKHR image); -#endif -#endif /* EGL_KHR_image */ - -#ifndef EGL_KHR_image_base -#define EGL_KHR_image_base 1 -#define EGL_IMAGE_PRESERVED_KHR 0x30D2 -#endif /* EGL_KHR_image_base */ - -#ifndef EGL_KHR_image_pixmap -#define EGL_KHR_image_pixmap 1 -#endif /* EGL_KHR_image_pixmap */ - -#ifndef EGL_KHR_lock_surface -#define EGL_KHR_lock_surface 1 -#define EGL_READ_SURFACE_BIT_KHR 0x0001 -#define EGL_WRITE_SURFACE_BIT_KHR 0x0002 -#define EGL_LOCK_SURFACE_BIT_KHR 0x0080 -#define EGL_OPTIMAL_FORMAT_BIT_KHR 0x0100 -#define EGL_MATCH_FORMAT_KHR 0x3043 -#define EGL_FORMAT_RGB_565_EXACT_KHR 0x30C0 -#define EGL_FORMAT_RGB_565_KHR 0x30C1 -#define EGL_FORMAT_RGBA_8888_EXACT_KHR 0x30C2 -#define EGL_FORMAT_RGBA_8888_KHR 0x30C3 -#define EGL_MAP_PRESERVE_PIXELS_KHR 0x30C4 -#define EGL_LOCK_USAGE_HINT_KHR 0x30C5 -#define EGL_BITMAP_POINTER_KHR 0x30C6 -#define EGL_BITMAP_PITCH_KHR 0x30C7 -#define EGL_BITMAP_ORIGIN_KHR 0x30C8 -#define EGL_BITMAP_PIXEL_RED_OFFSET_KHR 0x30C9 -#define EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR 0x30CA -#define EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR 0x30CB -#define EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR 0x30CC -#define EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR 0x30CD -#define EGL_LOWER_LEFT_KHR 0x30CE -#define EGL_UPPER_LEFT_KHR 0x30CF -typedef EGLBoolean (EGLAPIENTRYP PFNEGLLOCKSURFACEKHRPROC) (EGLDisplay dpy, EGLSurface surface, const EGLint *attrib_list); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNLOCKSURFACEKHRPROC) (EGLDisplay dpy, EGLSurface surface); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglLockSurfaceKHR (EGLDisplay dpy, EGLSurface surface, const EGLint *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglUnlockSurfaceKHR (EGLDisplay dpy, EGLSurface surface); -#endif -#endif /* EGL_KHR_lock_surface */ - -#ifndef EGL_KHR_lock_surface2 -#define EGL_KHR_lock_surface2 1 -#define EGL_BITMAP_PIXEL_SIZE_KHR 0x3110 -#endif /* EGL_KHR_lock_surface2 */ - -#ifndef EGL_KHR_lock_surface3 -#define EGL_KHR_lock_surface3 1 -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACE64KHRPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLAttribKHR *value); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface64KHR (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLAttribKHR *value); -#endif -#endif /* EGL_KHR_lock_surface3 */ - -#ifndef EGL_KHR_platform_android -#define EGL_KHR_platform_android 1 -#define EGL_PLATFORM_ANDROID_KHR 0x3141 -#endif /* EGL_KHR_platform_android */ - -#ifndef EGL_KHR_platform_gbm -#define EGL_KHR_platform_gbm 1 -#define EGL_PLATFORM_GBM_KHR 0x31D7 -#endif /* EGL_KHR_platform_gbm */ - -#ifndef EGL_KHR_platform_wayland -#define EGL_KHR_platform_wayland 1 -#define EGL_PLATFORM_WAYLAND_KHR 0x31D8 -#endif /* EGL_KHR_platform_wayland */ - -#ifndef EGL_KHR_platform_x11 -#define EGL_KHR_platform_x11 1 -#define EGL_PLATFORM_X11_KHR 0x31D5 -#define EGL_PLATFORM_X11_SCREEN_KHR 0x31D6 -#endif /* EGL_KHR_platform_x11 */ - -#ifndef EGL_KHR_reusable_sync -#define EGL_KHR_reusable_sync 1 -typedef khronos_utime_nanoseconds_t EGLTimeKHR; -#ifdef KHRONOS_SUPPORT_INT64 -#define EGL_SYNC_STATUS_KHR 0x30F1 -#define EGL_SIGNALED_KHR 0x30F2 -#define EGL_UNSIGNALED_KHR 0x30F3 -#define EGL_TIMEOUT_EXPIRED_KHR 0x30F5 -#define EGL_CONDITION_SATISFIED_KHR 0x30F6 -#define EGL_SYNC_TYPE_KHR 0x30F7 -#define EGL_SYNC_REUSABLE_KHR 0x30FA -#define EGL_SYNC_FLUSH_COMMANDS_BIT_KHR 0x0001 -#define EGL_FOREVER_KHR 0xFFFFFFFFFFFFFFFFull -#define EGL_NO_SYNC_KHR ((EGLSyncKHR)0) -typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNCKHRPROC) (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync); -typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncKHR (EGLDisplay dpy, EGLSyncKHR sync); -EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout); -EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode); -EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value); -#endif -#endif /* KHRONOS_SUPPORT_INT64 */ -#endif /* EGL_KHR_reusable_sync */ - -#ifndef EGL_KHR_stream -#define EGL_KHR_stream 1 -typedef void *EGLStreamKHR; -typedef khronos_uint64_t EGLuint64KHR; -#ifdef KHRONOS_SUPPORT_INT64 -#define EGL_NO_STREAM_KHR ((EGLStreamKHR)0) -#define EGL_CONSUMER_LATENCY_USEC_KHR 0x3210 -#define EGL_PRODUCER_FRAME_KHR 0x3212 -#define EGL_CONSUMER_FRAME_KHR 0x3213 -#define EGL_STREAM_STATE_KHR 0x3214 -#define EGL_STREAM_STATE_CREATED_KHR 0x3215 -#define EGL_STREAM_STATE_CONNECTING_KHR 0x3216 -#define EGL_STREAM_STATE_EMPTY_KHR 0x3217 -#define EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR 0x3218 -#define EGL_STREAM_STATE_OLD_FRAME_AVAILABLE_KHR 0x3219 -#define EGL_STREAM_STATE_DISCONNECTED_KHR 0x321A -#define EGL_BAD_STREAM_KHR 0x321B -#define EGL_BAD_STATE_KHR 0x321C -typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMKHRPROC) (EGLDisplay dpy, const EGLint *attrib_list); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSTREAMKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMATTRIBKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMU64KHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamKHR (EGLDisplay dpy, const EGLint *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroyStreamKHR (EGLDisplay dpy, EGLStreamKHR stream); -EGLAPI EGLBoolean EGLAPIENTRY eglStreamAttribKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamu64KHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value); -#endif -#endif /* KHRONOS_SUPPORT_INT64 */ -#endif /* EGL_KHR_stream */ - -#ifndef EGL_KHR_stream_consumer_gltexture -#define EGL_KHR_stream_consumer_gltexture 1 -#ifdef EGL_KHR_stream -#define EGL_CONSUMER_ACQUIRE_TIMEOUT_USEC_KHR 0x321E -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERACQUIREKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERRELEASEKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerGLTextureExternalKHR (EGLDisplay dpy, EGLStreamKHR stream); -EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireKHR (EGLDisplay dpy, EGLStreamKHR stream); -EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerReleaseKHR (EGLDisplay dpy, EGLStreamKHR stream); -#endif -#endif /* EGL_KHR_stream */ -#endif /* EGL_KHR_stream_consumer_gltexture */ - -#ifndef EGL_KHR_stream_cross_process_fd -#define EGL_KHR_stream_cross_process_fd 1 -typedef int EGLNativeFileDescriptorKHR; -#ifdef EGL_KHR_stream -#define EGL_NO_FILE_DESCRIPTOR_KHR ((EGLNativeFileDescriptorKHR)(-1)) -typedef EGLNativeFileDescriptorKHR (EGLAPIENTRYP PFNEGLGETSTREAMFILEDESCRIPTORKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream); -typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMFROMFILEDESCRIPTORKHRPROC) (EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLNativeFileDescriptorKHR EGLAPIENTRY eglGetStreamFileDescriptorKHR (EGLDisplay dpy, EGLStreamKHR stream); -EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamFromFileDescriptorKHR (EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor); -#endif -#endif /* EGL_KHR_stream */ -#endif /* EGL_KHR_stream_cross_process_fd */ - -#ifndef EGL_KHR_stream_fifo -#define EGL_KHR_stream_fifo 1 -#ifdef EGL_KHR_stream -#define EGL_STREAM_FIFO_LENGTH_KHR 0x31FC -#define EGL_STREAM_TIME_NOW_KHR 0x31FD -#define EGL_STREAM_TIME_CONSUMER_KHR 0x31FE -#define EGL_STREAM_TIME_PRODUCER_KHR 0x31FF -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMTIMEKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamTimeKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value); -#endif -#endif /* EGL_KHR_stream */ -#endif /* EGL_KHR_stream_fifo */ - -#ifndef EGL_KHR_stream_producer_aldatalocator -#define EGL_KHR_stream_producer_aldatalocator 1 -#ifdef EGL_KHR_stream -#endif /* EGL_KHR_stream */ -#endif /* EGL_KHR_stream_producer_aldatalocator */ - -#ifndef EGL_KHR_stream_producer_eglsurface -#define EGL_KHR_stream_producer_eglsurface 1 -#ifdef EGL_KHR_stream -#define EGL_STREAM_BIT_KHR 0x0800 -typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC) (EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLSurface EGLAPIENTRY eglCreateStreamProducerSurfaceKHR (EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list); -#endif -#endif /* EGL_KHR_stream */ -#endif /* EGL_KHR_stream_producer_eglsurface */ - -#ifndef EGL_KHR_surfaceless_context -#define EGL_KHR_surfaceless_context 1 -#endif /* EGL_KHR_surfaceless_context */ - -#ifndef EGL_KHR_vg_parent_image -#define EGL_KHR_vg_parent_image 1 -#define EGL_VG_PARENT_IMAGE_KHR 0x30BA -#endif /* EGL_KHR_vg_parent_image */ - -#ifndef EGL_KHR_wait_sync -#define EGL_KHR_wait_sync 1 -typedef EGLint (EGLAPIENTRYP PFNEGLWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLint EGLAPIENTRY eglWaitSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags); -#endif -#endif /* EGL_KHR_wait_sync */ - -#ifndef EGL_ANDROID_blob_cache -#define EGL_ANDROID_blob_cache 1 -typedef khronos_ssize_t EGLsizeiANDROID; -typedef void (*EGLSetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, const void *value, EGLsizeiANDROID valueSize); -typedef EGLsizeiANDROID (*EGLGetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, void *value, EGLsizeiANDROID valueSize); -typedef void (EGLAPIENTRYP PFNEGLSETBLOBCACHEFUNCSANDROIDPROC) (EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI void EGLAPIENTRY eglSetBlobCacheFuncsANDROID (EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get); -#endif -#endif /* EGL_ANDROID_blob_cache */ - -#ifndef EGL_ANDROID_framebuffer_target -#define EGL_ANDROID_framebuffer_target 1 -#define EGL_FRAMEBUFFER_TARGET_ANDROID 0x3147 -#endif /* EGL_ANDROID_framebuffer_target */ - -#ifndef EGL_ANDROID_image_native_buffer -#define EGL_ANDROID_image_native_buffer 1 -#define EGL_NATIVE_BUFFER_ANDROID 0x3140 -#endif /* EGL_ANDROID_image_native_buffer */ - -#ifndef EGL_ANDROID_native_fence_sync -#define EGL_ANDROID_native_fence_sync 1 -#define EGL_SYNC_NATIVE_FENCE_ANDROID 0x3144 -#define EGL_SYNC_NATIVE_FENCE_FD_ANDROID 0x3145 -#define EGL_SYNC_NATIVE_FENCE_SIGNALED_ANDROID 0x3146 -#define EGL_NO_NATIVE_FENCE_FD_ANDROID -1 -typedef EGLint (EGLAPIENTRYP PFNEGLDUPNATIVEFENCEFDANDROIDPROC) (EGLDisplay dpy, EGLSyncKHR sync); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLint EGLAPIENTRY eglDupNativeFenceFDANDROID (EGLDisplay dpy, EGLSyncKHR sync); -#endif -#endif /* EGL_ANDROID_native_fence_sync */ - -#ifndef EGL_ANDROID_recordable -#define EGL_ANDROID_recordable 1 -#define EGL_RECORDABLE_ANDROID 0x3142 -#endif /* EGL_ANDROID_recordable */ - -#ifndef EGL_ANGLE_d3d_share_handle_client_buffer -#define EGL_ANGLE_d3d_share_handle_client_buffer 1 -#define EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE 0x3200 -#endif /* EGL_ANGLE_d3d_share_handle_client_buffer */ - -#ifndef EGL_ANGLE_window_fixed_size -#define EGL_ANGLE_window_fixed_size 1 -#define EGL_FIXED_SIZE_ANGLE 0x3201 -#endif /* EGL_ANGLE_window_fixed_size */ - -#ifndef EGL_ANGLE_query_surface_pointer -#define EGL_ANGLE_query_surface_pointer 1 -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACEPOINTERANGLEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurfacePointerANGLE (EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value); -#endif -#endif /* EGL_ANGLE_query_surface_pointer */ - -#ifndef EGL_ANGLE_software_display -#define EGL_ANGLE_software_display 1 -#define EGL_SOFTWARE_DISPLAY_ANGLE ((EGLNativeDisplayType)-1) -#endif /* EGL_ANGLE_software_display */ - -#ifndef EGL_ANGLE_direct3d_display -#define EGL_ANGLE_direct3d_display 1 -#define EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE ((EGLNativeDisplayType)-2) -#define EGL_D3D11_ONLY_DISPLAY_ANGLE ((EGLNativeDisplayType)-3) -#endif /* EGL_ANGLE_direct3d_display */ - -#ifndef EGL_ANGLE_surface_d3d_texture_2d_share_handle -#define EGL_ANGLE_surface_d3d_texture_2d_share_handle 1 -#endif /* EGL_ANGLE_surface_d3d_texture_2d_share_handle */ - -#ifndef EGL_ANGLE_surface_d3d_render_to_back_buffer -#define EGL_ANGLE_surface_d3d_render_to_back_buffer 1 -#define EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER 0x320B -#define EGL_ANGLE_SURFACE_RENDER_TO_BACK_BUFFER 0x320C -#endif /* EGL_ANGLE_surface_d3d_render_to_back_buffer */ - -#ifndef EGL_ANGLE_platform_angle -#define EGL_ANGLE_platform_angle 1 -#define EGL_PLATFORM_ANGLE_ANGLE 0x3201 -#define EGL_PLATFORM_ANGLE_TYPE_ANGLE 0x3202 -#define EGL_PLATFORM_ANGLE_MAX_VERSION_MAJOR_ANGLE 0x3203 -#define EGL_PLATFORM_ANGLE_MAX_VERSION_MINOR_ANGLE 0x3204 -#define EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE 0x3205 -#endif /* EGL_ANGLE_platform_angle */ - -#ifndef EGL_ANGLE_platform_angle_d3d -#define EGL_ANGLE_platform_angle_d3d 1 -#define EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE 0x3206 -#define EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE 0x3207 -#define EGL_PLATFORM_ANGLE_USE_WARP_ANGLE 0x3208 -#endif /* EGL_ANGLE_platform_angle_d3d */ - -#ifndef EGL_ANGLE_platform_angle_opengl -#define EGL_ANGLE_platform_angle_opengl 1 -#define EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE 0x3209 -#define EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE 0x320A -#endif /* EGL_ANGLE_platform_angle_opengl */ - -#ifndef EGL_ARM_pixmap_multisample_discard -#define EGL_ARM_pixmap_multisample_discard 1 -#define EGL_DISCARD_SAMPLES_ARM 0x3286 -#endif /* EGL_ARM_pixmap_multisample_discard */ - -#ifndef EGL_EXT_buffer_age -#define EGL_EXT_buffer_age 1 -#define EGL_BUFFER_AGE_EXT 0x313D -#endif /* EGL_EXT_buffer_age */ - -#ifndef EGL_EXT_client_extensions -#define EGL_EXT_client_extensions 1 -#endif /* EGL_EXT_client_extensions */ - -#ifndef EGL_EXT_create_context_robustness -#define EGL_EXT_create_context_robustness 1 -#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT 0x30BF -#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT 0x3138 -#define EGL_NO_RESET_NOTIFICATION_EXT 0x31BE -#define EGL_LOSE_CONTEXT_ON_RESET_EXT 0x31BF -#endif /* EGL_EXT_create_context_robustness */ - -#ifndef EGL_EXT_device_base -#define EGL_EXT_device_base 1 -typedef void *EGLDeviceEXT; -#define EGL_NO_DEVICE_EXT ((EGLDeviceEXT)(0)) -#define EGL_BAD_DEVICE_EXT 0x322B -#define EGL_DEVICE_EXT 0x322C -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDEVICEATTRIBEXTPROC) (EGLDeviceEXT device, EGLint attribute, EGLAttrib *value); -typedef const char *(EGLAPIENTRYP PFNEGLQUERYDEVICESTRINGEXTPROC) (EGLDeviceEXT device, EGLint name); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDEVICESEXTPROC) (EGLint max_devices, EGLDeviceEXT *devices, EGLint *num_devices); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDISPLAYATTRIBEXTPROC) (EGLDisplay dpy, EGLint attribute, EGLAttrib *value); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglQueryDeviceAttribEXT (EGLDeviceEXT device, EGLint attribute, EGLAttrib *value); -EGLAPI const char *EGLAPIENTRY eglQueryDeviceStringEXT (EGLDeviceEXT device, EGLint name); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryDevicesEXT (EGLint max_devices, EGLDeviceEXT *devices, EGLint *num_devices); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryDisplayAttribEXT (EGLDisplay dpy, EGLint attribute, EGLAttrib *value); -#endif -#endif /* EGL_EXT_device_base */ - -#ifndef EGL_EXT_image_dma_buf_import -#define EGL_EXT_image_dma_buf_import 1 -#define EGL_LINUX_DMA_BUF_EXT 0x3270 -#define EGL_LINUX_DRM_FOURCC_EXT 0x3271 -#define EGL_DMA_BUF_PLANE0_FD_EXT 0x3272 -#define EGL_DMA_BUF_PLANE0_OFFSET_EXT 0x3273 -#define EGL_DMA_BUF_PLANE0_PITCH_EXT 0x3274 -#define EGL_DMA_BUF_PLANE1_FD_EXT 0x3275 -#define EGL_DMA_BUF_PLANE1_OFFSET_EXT 0x3276 -#define EGL_DMA_BUF_PLANE1_PITCH_EXT 0x3277 -#define EGL_DMA_BUF_PLANE2_FD_EXT 0x3278 -#define EGL_DMA_BUF_PLANE2_OFFSET_EXT 0x3279 -#define EGL_DMA_BUF_PLANE2_PITCH_EXT 0x327A -#define EGL_YUV_COLOR_SPACE_HINT_EXT 0x327B -#define EGL_SAMPLE_RANGE_HINT_EXT 0x327C -#define EGL_YUV_CHROMA_HORIZONTAL_SITING_HINT_EXT 0x327D -#define EGL_YUV_CHROMA_VERTICAL_SITING_HINT_EXT 0x327E -#define EGL_ITU_REC601_EXT 0x327F -#define EGL_ITU_REC709_EXT 0x3280 -#define EGL_ITU_REC2020_EXT 0x3281 -#define EGL_YUV_FULL_RANGE_EXT 0x3282 -#define EGL_YUV_NARROW_RANGE_EXT 0x3283 -#define EGL_YUV_CHROMA_SITING_0_EXT 0x3284 -#define EGL_YUV_CHROMA_SITING_0_5_EXT 0x3285 -#endif /* EGL_EXT_image_dma_buf_import */ - -#ifndef EGL_EXT_multiview_window -#define EGL_EXT_multiview_window 1 -#define EGL_MULTIVIEW_VIEW_COUNT_EXT 0x3134 -#endif /* EGL_EXT_multiview_window */ - -#ifndef EGL_EXT_platform_base -#define EGL_EXT_platform_base 1 -typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYEXTPROC) (EGLenum platform, void *native_display, const EGLint *attrib_list); -typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC) (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLint *attrib_list); -typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMPIXMAPSURFACEEXTPROC) (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLint *attrib_list); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLDisplay EGLAPIENTRY eglGetPlatformDisplayEXT (EGLenum platform, void *native_display, const EGLint *attrib_list); -EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurfaceEXT (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLint *attrib_list); -EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurfaceEXT (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLint *attrib_list); -#endif -#endif /* EGL_EXT_platform_base */ - -#ifndef EGL_EXT_platform_device -#define EGL_EXT_platform_device 1 -#define EGL_PLATFORM_DEVICE_EXT 0x313F -#endif /* EGL_EXT_platform_device */ - -#ifndef EGL_EXT_platform_wayland -#define EGL_EXT_platform_wayland 1 -#define EGL_PLATFORM_WAYLAND_EXT 0x31D8 -#endif /* EGL_EXT_platform_wayland */ - -#ifndef EGL_EXT_platform_x11 -#define EGL_EXT_platform_x11 1 -#define EGL_PLATFORM_X11_EXT 0x31D5 -#define EGL_PLATFORM_X11_SCREEN_EXT 0x31D6 -#endif /* EGL_EXT_platform_x11 */ - -#ifndef EGL_EXT_protected_surface -#define EGL_EXT_protected_surface 1 -#define EGL_PROTECTED_CONTENT_EXT 0x32C0 -#endif /* EGL_EXT_protected_surface */ - -#ifndef EGL_EXT_swap_buffers_with_damage -#define EGL_EXT_swap_buffers_with_damage 1 -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC) (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersWithDamageEXT (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects); -#endif -#endif /* EGL_EXT_swap_buffers_with_damage */ - -#ifndef EGL_HI_clientpixmap -#define EGL_HI_clientpixmap 1 -struct EGLClientPixmapHI { - void *pData; - EGLint iWidth; - EGLint iHeight; - EGLint iStride; -}; -#define EGL_CLIENT_PIXMAP_POINTER_HI 0x8F74 -typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPIXMAPSURFACEHIPROC) (EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI *pixmap); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurfaceHI (EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI *pixmap); -#endif -#endif /* EGL_HI_clientpixmap */ - -#ifndef EGL_HI_colorformats -#define EGL_HI_colorformats 1 -#define EGL_COLOR_FORMAT_HI 0x8F70 -#define EGL_COLOR_RGB_HI 0x8F71 -#define EGL_COLOR_RGBA_HI 0x8F72 -#define EGL_COLOR_ARGB_HI 0x8F73 -#endif /* EGL_HI_colorformats */ - -#ifndef EGL_IMG_context_priority -#define EGL_IMG_context_priority 1 -#define EGL_CONTEXT_PRIORITY_LEVEL_IMG 0x3100 -#define EGL_CONTEXT_PRIORITY_HIGH_IMG 0x3101 -#define EGL_CONTEXT_PRIORITY_MEDIUM_IMG 0x3102 -#define EGL_CONTEXT_PRIORITY_LOW_IMG 0x3103 -#endif /* EGL_IMG_context_priority */ - -#ifndef EGL_MESA_drm_image -#define EGL_MESA_drm_image 1 -#define EGL_DRM_BUFFER_FORMAT_MESA 0x31D0 -#define EGL_DRM_BUFFER_USE_MESA 0x31D1 -#define EGL_DRM_BUFFER_FORMAT_ARGB32_MESA 0x31D2 -#define EGL_DRM_BUFFER_MESA 0x31D3 -#define EGL_DRM_BUFFER_STRIDE_MESA 0x31D4 -#define EGL_DRM_BUFFER_USE_SCANOUT_MESA 0x00000001 -#define EGL_DRM_BUFFER_USE_SHARE_MESA 0x00000002 -typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEDRMIMAGEMESAPROC) (EGLDisplay dpy, const EGLint *attrib_list); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDRMIMAGEMESAPROC) (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLImageKHR EGLAPIENTRY eglCreateDRMImageMESA (EGLDisplay dpy, const EGLint *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglExportDRMImageMESA (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride); -#endif -#endif /* EGL_MESA_drm_image */ - -#ifndef EGL_MESA_platform_gbm -#define EGL_MESA_platform_gbm 1 -#define EGL_PLATFORM_GBM_MESA 0x31D7 -#endif /* EGL_MESA_platform_gbm */ - -#ifndef EGL_NOK_swap_region -#define EGL_NOK_swap_region 1 -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGIONNOKPROC) (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersRegionNOK (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects); -#endif -#endif /* EGL_NOK_swap_region */ - -#ifndef EGL_NOK_swap_region2 -#define EGL_NOK_swap_region2 1 -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGION2NOKPROC) (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersRegion2NOK (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects); -#endif -#endif /* EGL_NOK_swap_region2 */ - -#ifndef EGL_NOK_texture_from_pixmap -#define EGL_NOK_texture_from_pixmap 1 -#define EGL_Y_INVERTED_NOK 0x307F -#endif /* EGL_NOK_texture_from_pixmap */ - -#ifndef EGL_NV_3dvision_surface -#define EGL_NV_3dvision_surface 1 -#define EGL_AUTO_STEREO_NV 0x3136 -#endif /* EGL_NV_3dvision_surface */ - -#ifndef EGL_NV_coverage_sample -#define EGL_NV_coverage_sample 1 -#define EGL_COVERAGE_BUFFERS_NV 0x30E0 -#define EGL_COVERAGE_SAMPLES_NV 0x30E1 -#endif /* EGL_NV_coverage_sample */ - -#ifndef EGL_NV_coverage_sample_resolve -#define EGL_NV_coverage_sample_resolve 1 -#define EGL_COVERAGE_SAMPLE_RESOLVE_NV 0x3131 -#define EGL_COVERAGE_SAMPLE_RESOLVE_DEFAULT_NV 0x3132 -#define EGL_COVERAGE_SAMPLE_RESOLVE_NONE_NV 0x3133 -#endif /* EGL_NV_coverage_sample_resolve */ - -#ifndef EGL_NV_depth_nonlinear -#define EGL_NV_depth_nonlinear 1 -#define EGL_DEPTH_ENCODING_NV 0x30E2 -#define EGL_DEPTH_ENCODING_NONE_NV 0 -#define EGL_DEPTH_ENCODING_NONLINEAR_NV 0x30E3 -#endif /* EGL_NV_depth_nonlinear */ - -#ifndef EGL_NV_native_query -#define EGL_NV_native_query 1 -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEDISPLAYNVPROC) (EGLDisplay dpy, EGLNativeDisplayType *display_id); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEWINDOWNVPROC) (EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType *window); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEPIXMAPNVPROC) (EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType *pixmap); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativeDisplayNV (EGLDisplay dpy, EGLNativeDisplayType *display_id); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativeWindowNV (EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType *window); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativePixmapNV (EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType *pixmap); -#endif -#endif /* EGL_NV_native_query */ - -#ifndef EGL_NV_post_convert_rounding -#define EGL_NV_post_convert_rounding 1 -#endif /* EGL_NV_post_convert_rounding */ - -#ifndef EGL_NV_post_sub_buffer -#define EGL_NV_post_sub_buffer 1 -#define EGL_POST_SUB_BUFFER_SUPPORTED_NV 0x30BE -typedef EGLBoolean (EGLAPIENTRYP PFNEGLPOSTSUBBUFFERNVPROC) (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglPostSubBufferNV (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height); -#endif -#endif /* EGL_NV_post_sub_buffer */ - -#ifndef EGL_NV_stream_sync -#define EGL_NV_stream_sync 1 -#define EGL_SYNC_NEW_FRAME_NV 0x321F -typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESTREAMSYNCNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum type, const EGLint *attrib_list); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateStreamSyncNV (EGLDisplay dpy, EGLStreamKHR stream, EGLenum type, const EGLint *attrib_list); -#endif -#endif /* EGL_NV_stream_sync */ - -#ifndef EGL_NV_sync -#define EGL_NV_sync 1 -typedef void *EGLSyncNV; -typedef khronos_utime_nanoseconds_t EGLTimeNV; -#ifdef KHRONOS_SUPPORT_INT64 -#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_NV 0x30E6 -#define EGL_SYNC_STATUS_NV 0x30E7 -#define EGL_SIGNALED_NV 0x30E8 -#define EGL_UNSIGNALED_NV 0x30E9 -#define EGL_SYNC_FLUSH_COMMANDS_BIT_NV 0x0001 -#define EGL_FOREVER_NV 0xFFFFFFFFFFFFFFFFull -#define EGL_ALREADY_SIGNALED_NV 0x30EA -#define EGL_TIMEOUT_EXPIRED_NV 0x30EB -#define EGL_CONDITION_SATISFIED_NV 0x30EC -#define EGL_SYNC_TYPE_NV 0x30ED -#define EGL_SYNC_CONDITION_NV 0x30EE -#define EGL_SYNC_FENCE_NV 0x30EF -#define EGL_NO_SYNC_NV ((EGLSyncNV)0) -typedef EGLSyncNV (EGLAPIENTRYP PFNEGLCREATEFENCESYNCNVPROC) (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCNVPROC) (EGLSyncNV sync); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLFENCENVPROC) (EGLSyncNV sync); -typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCNVPROC) (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCNVPROC) (EGLSyncNV sync, EGLenum mode); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBNVPROC) (EGLSyncNV sync, EGLint attribute, EGLint *value); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLSyncNV EGLAPIENTRY eglCreateFenceSyncNV (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncNV (EGLSyncNV sync); -EGLAPI EGLBoolean EGLAPIENTRY eglFenceNV (EGLSyncNV sync); -EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncNV (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout); -EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncNV (EGLSyncNV sync, EGLenum mode); -EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribNV (EGLSyncNV sync, EGLint attribute, EGLint *value); -#endif -#endif /* KHRONOS_SUPPORT_INT64 */ -#endif /* EGL_NV_sync */ - -#ifndef EGL_NV_system_time -#define EGL_NV_system_time 1 -typedef khronos_utime_nanoseconds_t EGLuint64NV; -#ifdef KHRONOS_SUPPORT_INT64 -typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMEFREQUENCYNVPROC) (void); -typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMENVPROC) (void); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeFrequencyNV (void); -EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeNV (void); -#endif -#endif /* KHRONOS_SUPPORT_INT64 */ -#endif /* EGL_NV_system_time */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/platform/winrt/include/EGL/eglplatform.h b/platform/winrt/include/EGL/eglplatform.h deleted file mode 100644 index 71dadc79d5c..00000000000 --- a/platform/winrt/include/EGL/eglplatform.h +++ /dev/null @@ -1,131 +0,0 @@ -#ifndef __eglplatform_h_ -#define __eglplatform_h_ - -/* -** Copyright (c) 2007-2013 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. -*/ - -/* Platform-specific types and definitions for egl.h - * $Revision: 23432 $ on $Date: 2013-10-09 00:57:24 -0700 (Wed, 09 Oct 2013) $ - * - * Adopters may modify khrplatform.h and this file to suit their platform. - * You are encouraged to submit all modifications to the Khronos group so that - * they can be included in future versions of this file. Please submit changes - * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) - * by filing a bug against product "EGL" component "Registry". - */ - -#include - -/* Macros used in EGL function prototype declarations. - * - * EGL functions should be prototyped as: - * - * EGLAPI return-type EGLAPIENTRY eglFunction(arguments); - * typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments); - * - * KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h - */ - -#ifndef EGLAPI -#define EGLAPI KHRONOS_APICALL -#endif - -#ifndef EGLAPIENTRY -#define EGLAPIENTRY KHRONOS_APIENTRY -#endif -#define EGLAPIENTRYP EGLAPIENTRY* - -/* The types NativeDisplayType, NativeWindowType, and NativePixmapType - * are aliases of window-system-dependent types, such as X Display * or - * Windows Device Context. They must be defined in platform-specific - * code below. The EGL-prefixed versions of Native*Type are the same - * types, renamed in EGL 1.3 so all types in the API start with "EGL". - * - * Khronos STRONGLY RECOMMENDS that you use the default definitions - * provided below, since these changes affect both binary and source - * portability of applications using EGL running on different EGL - * implementations. - */ - -#if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */ -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN 1 -#endif -#include - -typedef HDC EGLNativeDisplayType; -typedef HBITMAP EGLNativePixmapType; - -#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_PC_APP || WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) /* Windows Store */ -#include -typedef IInspectable* EGLNativeWindowType; -#else -typedef HWND EGLNativeWindowType; -#endif - -#elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */ - -typedef int EGLNativeDisplayType; -typedef void *EGLNativeWindowType; -typedef void *EGLNativePixmapType; - -#elif defined(__ANDROID__) || defined(ANDROID) - -#include - -struct egl_native_pixmap_t; - -typedef struct ANativeWindow* EGLNativeWindowType; -typedef struct egl_native_pixmap_t* EGLNativePixmapType; -typedef void* EGLNativeDisplayType; - -#elif defined(__unix__) - -/* X11 (tentative) */ -#include -#include - -typedef Display *EGLNativeDisplayType; -typedef Pixmap EGLNativePixmapType; -typedef Window EGLNativeWindowType; - -#else -#error "Platform not recognized" -#endif - -/* EGL 1.2 types, renamed for consistency in EGL 1.3 */ -typedef EGLNativeDisplayType NativeDisplayType; -typedef EGLNativePixmapType NativePixmapType; -typedef EGLNativeWindowType NativeWindowType; - - -/* Define EGLint. This must be a signed integral type large enough to contain - * all legal attribute names and values passed into and out of EGL, whether - * their type is boolean, bitmask, enumerant (symbolic constant), integer, - * handle, or other. While in general a 32-bit integer will suffice, if - * handles are 64 bit types, then EGLint should be defined as a signed 64-bit - * integer type. - */ -typedef khronos_int32_t EGLint; - -#endif /* __eglplatform_h */ diff --git a/platform/winrt/include/GLES2/gl2.h b/platform/winrt/include/GLES2/gl2.h deleted file mode 100644 index c2d8357268f..00000000000 --- a/platform/winrt/include/GLES2/gl2.h +++ /dev/null @@ -1,620 +0,0 @@ -#ifndef __gl2_h_ -#define __gl2_h_ - -/* $Revision: 20555 $ on $Date:: 2013-02-12 14:32:47 -0800 #$ */ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * This document is licensed under the SGI Free Software B License Version - * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . - */ - -/*------------------------------------------------------------------------- - * Data type definitions - *-----------------------------------------------------------------------*/ - -typedef void GLvoid; -typedef char GLchar; -typedef unsigned int GLenum; -typedef unsigned char GLboolean; -typedef unsigned int GLbitfield; -typedef khronos_int8_t GLbyte; -typedef short GLshort; -typedef int GLint; -typedef int GLsizei; -typedef khronos_uint8_t GLubyte; -typedef unsigned short GLushort; -typedef unsigned int GLuint; -typedef khronos_float_t GLfloat; -typedef khronos_float_t GLclampf; -typedef khronos_int32_t GLfixed; - -/* GL types for handling large vertex buffer objects */ -typedef khronos_intptr_t GLintptr; -typedef khronos_ssize_t GLsizeiptr; - -/* OpenGL ES core versions */ -#define GL_ES_VERSION_2_0 1 - -/* ClearBufferMask */ -#define GL_DEPTH_BUFFER_BIT 0x00000100 -#define GL_STENCIL_BUFFER_BIT 0x00000400 -#define GL_COLOR_BUFFER_BIT 0x00004000 - -/* Boolean */ -#define GL_FALSE 0 -#define GL_TRUE 1 - -/* BeginMode */ -#define GL_POINTS 0x0000 -#define GL_LINES 0x0001 -#define GL_LINE_LOOP 0x0002 -#define GL_LINE_STRIP 0x0003 -#define GL_TRIANGLES 0x0004 -#define GL_TRIANGLE_STRIP 0x0005 -#define GL_TRIANGLE_FAN 0x0006 - -/* AlphaFunction (not supported in ES20) */ -/* GL_NEVER */ -/* GL_LESS */ -/* GL_EQUAL */ -/* GL_LEQUAL */ -/* GL_GREATER */ -/* GL_NOTEQUAL */ -/* GL_GEQUAL */ -/* GL_ALWAYS */ - -/* BlendingFactorDest */ -#define GL_ZERO 0 -#define GL_ONE 1 -#define GL_SRC_COLOR 0x0300 -#define GL_ONE_MINUS_SRC_COLOR 0x0301 -#define GL_SRC_ALPHA 0x0302 -#define GL_ONE_MINUS_SRC_ALPHA 0x0303 -#define GL_DST_ALPHA 0x0304 -#define GL_ONE_MINUS_DST_ALPHA 0x0305 - -/* BlendingFactorSrc */ -/* GL_ZERO */ -/* GL_ONE */ -#define GL_DST_COLOR 0x0306 -#define GL_ONE_MINUS_DST_COLOR 0x0307 -#define GL_SRC_ALPHA_SATURATE 0x0308 -/* GL_SRC_ALPHA */ -/* GL_ONE_MINUS_SRC_ALPHA */ -/* GL_DST_ALPHA */ -/* GL_ONE_MINUS_DST_ALPHA */ - -/* BlendEquationSeparate */ -#define GL_FUNC_ADD 0x8006 -#define GL_BLEND_EQUATION 0x8009 -#define GL_BLEND_EQUATION_RGB 0x8009 /* same as BLEND_EQUATION */ -#define GL_BLEND_EQUATION_ALPHA 0x883D - -/* BlendSubtract */ -#define GL_FUNC_SUBTRACT 0x800A -#define GL_FUNC_REVERSE_SUBTRACT 0x800B - -/* Separate Blend Functions */ -#define GL_BLEND_DST_RGB 0x80C8 -#define GL_BLEND_SRC_RGB 0x80C9 -#define GL_BLEND_DST_ALPHA 0x80CA -#define GL_BLEND_SRC_ALPHA 0x80CB -#define GL_CONSTANT_COLOR 0x8001 -#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 -#define GL_CONSTANT_ALPHA 0x8003 -#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 -#define GL_BLEND_COLOR 0x8005 - -/* Buffer Objects */ -#define GL_ARRAY_BUFFER 0x8892 -#define GL_ELEMENT_ARRAY_BUFFER 0x8893 -#define GL_ARRAY_BUFFER_BINDING 0x8894 -#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 - -#define GL_STREAM_DRAW 0x88E0 -#define GL_STATIC_DRAW 0x88E4 -#define GL_DYNAMIC_DRAW 0x88E8 - -#define GL_BUFFER_SIZE 0x8764 -#define GL_BUFFER_USAGE 0x8765 - -#define GL_CURRENT_VERTEX_ATTRIB 0x8626 - -/* CullFaceMode */ -#define GL_FRONT 0x0404 -#define GL_BACK 0x0405 -#define GL_FRONT_AND_BACK 0x0408 - -/* DepthFunction */ -/* GL_NEVER */ -/* GL_LESS */ -/* GL_EQUAL */ -/* GL_LEQUAL */ -/* GL_GREATER */ -/* GL_NOTEQUAL */ -/* GL_GEQUAL */ -/* GL_ALWAYS */ - -/* EnableCap */ -#define GL_TEXTURE_2D 0x0DE1 -#define GL_CULL_FACE 0x0B44 -#define GL_BLEND 0x0BE2 -#define GL_DITHER 0x0BD0 -#define GL_STENCIL_TEST 0x0B90 -#define GL_DEPTH_TEST 0x0B71 -#define GL_SCISSOR_TEST 0x0C11 -#define GL_POLYGON_OFFSET_FILL 0x8037 -#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E -#define GL_SAMPLE_COVERAGE 0x80A0 - -/* ErrorCode */ -#define GL_NO_ERROR 0 -#define GL_INVALID_ENUM 0x0500 -#define GL_INVALID_VALUE 0x0501 -#define GL_INVALID_OPERATION 0x0502 -#define GL_OUT_OF_MEMORY 0x0505 - -/* FrontFaceDirection */ -#define GL_CW 0x0900 -#define GL_CCW 0x0901 - -/* GetPName */ -#define GL_LINE_WIDTH 0x0B21 -#define GL_ALIASED_POINT_SIZE_RANGE 0x846D -#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E -#define GL_CULL_FACE_MODE 0x0B45 -#define GL_FRONT_FACE 0x0B46 -#define GL_DEPTH_RANGE 0x0B70 -#define GL_DEPTH_WRITEMASK 0x0B72 -#define GL_DEPTH_CLEAR_VALUE 0x0B73 -#define GL_DEPTH_FUNC 0x0B74 -#define GL_STENCIL_CLEAR_VALUE 0x0B91 -#define GL_STENCIL_FUNC 0x0B92 -#define GL_STENCIL_FAIL 0x0B94 -#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 -#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 -#define GL_STENCIL_REF 0x0B97 -#define GL_STENCIL_VALUE_MASK 0x0B93 -#define GL_STENCIL_WRITEMASK 0x0B98 -#define GL_STENCIL_BACK_FUNC 0x8800 -#define GL_STENCIL_BACK_FAIL 0x8801 -#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 -#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 -#define GL_STENCIL_BACK_REF 0x8CA3 -#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 -#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 -#define GL_VIEWPORT 0x0BA2 -#define GL_SCISSOR_BOX 0x0C10 -/* GL_SCISSOR_TEST */ -#define GL_COLOR_CLEAR_VALUE 0x0C22 -#define GL_COLOR_WRITEMASK 0x0C23 -#define GL_UNPACK_ALIGNMENT 0x0CF5 -#define GL_PACK_ALIGNMENT 0x0D05 -#define GL_MAX_TEXTURE_SIZE 0x0D33 -#define GL_MAX_VIEWPORT_DIMS 0x0D3A -#define GL_SUBPIXEL_BITS 0x0D50 -#define GL_RED_BITS 0x0D52 -#define GL_GREEN_BITS 0x0D53 -#define GL_BLUE_BITS 0x0D54 -#define GL_ALPHA_BITS 0x0D55 -#define GL_DEPTH_BITS 0x0D56 -#define GL_STENCIL_BITS 0x0D57 -#define GL_POLYGON_OFFSET_UNITS 0x2A00 -/* GL_POLYGON_OFFSET_FILL */ -#define GL_POLYGON_OFFSET_FACTOR 0x8038 -#define GL_TEXTURE_BINDING_2D 0x8069 -#define GL_SAMPLE_BUFFERS 0x80A8 -#define GL_SAMPLES 0x80A9 -#define GL_SAMPLE_COVERAGE_VALUE 0x80AA -#define GL_SAMPLE_COVERAGE_INVERT 0x80AB - -/* GetTextureParameter */ -/* GL_TEXTURE_MAG_FILTER */ -/* GL_TEXTURE_MIN_FILTER */ -/* GL_TEXTURE_WRAP_S */ -/* GL_TEXTURE_WRAP_T */ - -#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 -#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 - -/* HintMode */ -#define GL_DONT_CARE 0x1100 -#define GL_FASTEST 0x1101 -#define GL_NICEST 0x1102 - -/* HintTarget */ -#define GL_GENERATE_MIPMAP_HINT 0x8192 - -/* DataType */ -#define GL_BYTE 0x1400 -#define GL_UNSIGNED_BYTE 0x1401 -#define GL_SHORT 0x1402 -#define GL_UNSIGNED_SHORT 0x1403 -#define GL_INT 0x1404 -#define GL_UNSIGNED_INT 0x1405 -#define GL_FLOAT 0x1406 -#define GL_FIXED 0x140C - -/* PixelFormat */ -#define GL_DEPTH_COMPONENT 0x1902 -#define GL_ALPHA 0x1906 -#define GL_RGB 0x1907 -#define GL_RGBA 0x1908 -#define GL_LUMINANCE 0x1909 -#define GL_LUMINANCE_ALPHA 0x190A - -/* PixelType */ -/* GL_UNSIGNED_BYTE */ -#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 -#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 -#define GL_UNSIGNED_SHORT_5_6_5 0x8363 - -/* Shaders */ -#define GL_FRAGMENT_SHADER 0x8B30 -#define GL_VERTEX_SHADER 0x8B31 -#define GL_MAX_VERTEX_ATTRIBS 0x8869 -#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB -#define GL_MAX_VARYING_VECTORS 0x8DFC -#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D -#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C -#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 -#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD -#define GL_SHADER_TYPE 0x8B4F -#define GL_DELETE_STATUS 0x8B80 -#define GL_LINK_STATUS 0x8B82 -#define GL_VALIDATE_STATUS 0x8B83 -#define GL_ATTACHED_SHADERS 0x8B85 -#define GL_ACTIVE_UNIFORMS 0x8B86 -#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 -#define GL_ACTIVE_ATTRIBUTES 0x8B89 -#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A -#define GL_SHADING_LANGUAGE_VERSION 0x8B8C -#define GL_CURRENT_PROGRAM 0x8B8D - -/* StencilFunction */ -#define GL_NEVER 0x0200 -#define GL_LESS 0x0201 -#define GL_EQUAL 0x0202 -#define GL_LEQUAL 0x0203 -#define GL_GREATER 0x0204 -#define GL_NOTEQUAL 0x0205 -#define GL_GEQUAL 0x0206 -#define GL_ALWAYS 0x0207 - -/* StencilOp */ -/* GL_ZERO */ -#define GL_KEEP 0x1E00 -#define GL_REPLACE 0x1E01 -#define GL_INCR 0x1E02 -#define GL_DECR 0x1E03 -#define GL_INVERT 0x150A -#define GL_INCR_WRAP 0x8507 -#define GL_DECR_WRAP 0x8508 - -/* StringName */ -#define GL_VENDOR 0x1F00 -#define GL_RENDERER 0x1F01 -#define GL_VERSION 0x1F02 -#define GL_EXTENSIONS 0x1F03 - -/* TextureMagFilter */ -#define GL_NEAREST 0x2600 -#define GL_LINEAR 0x2601 - -/* TextureMinFilter */ -/* GL_NEAREST */ -/* GL_LINEAR */ -#define GL_NEAREST_MIPMAP_NEAREST 0x2700 -#define GL_LINEAR_MIPMAP_NEAREST 0x2701 -#define GL_NEAREST_MIPMAP_LINEAR 0x2702 -#define GL_LINEAR_MIPMAP_LINEAR 0x2703 - -/* TextureParameterName */ -#define GL_TEXTURE_MAG_FILTER 0x2800 -#define GL_TEXTURE_MIN_FILTER 0x2801 -#define GL_TEXTURE_WRAP_S 0x2802 -#define GL_TEXTURE_WRAP_T 0x2803 - -/* TextureTarget */ -/* GL_TEXTURE_2D */ -#define GL_TEXTURE 0x1702 - -#define GL_TEXTURE_CUBE_MAP 0x8513 -#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A -#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C - -/* TextureUnit */ -#define GL_TEXTURE0 0x84C0 -#define GL_TEXTURE1 0x84C1 -#define GL_TEXTURE2 0x84C2 -#define GL_TEXTURE3 0x84C3 -#define GL_TEXTURE4 0x84C4 -#define GL_TEXTURE5 0x84C5 -#define GL_TEXTURE6 0x84C6 -#define GL_TEXTURE7 0x84C7 -#define GL_TEXTURE8 0x84C8 -#define GL_TEXTURE9 0x84C9 -#define GL_TEXTURE10 0x84CA -#define GL_TEXTURE11 0x84CB -#define GL_TEXTURE12 0x84CC -#define GL_TEXTURE13 0x84CD -#define GL_TEXTURE14 0x84CE -#define GL_TEXTURE15 0x84CF -#define GL_TEXTURE16 0x84D0 -#define GL_TEXTURE17 0x84D1 -#define GL_TEXTURE18 0x84D2 -#define GL_TEXTURE19 0x84D3 -#define GL_TEXTURE20 0x84D4 -#define GL_TEXTURE21 0x84D5 -#define GL_TEXTURE22 0x84D6 -#define GL_TEXTURE23 0x84D7 -#define GL_TEXTURE24 0x84D8 -#define GL_TEXTURE25 0x84D9 -#define GL_TEXTURE26 0x84DA -#define GL_TEXTURE27 0x84DB -#define GL_TEXTURE28 0x84DC -#define GL_TEXTURE29 0x84DD -#define GL_TEXTURE30 0x84DE -#define GL_TEXTURE31 0x84DF -#define GL_ACTIVE_TEXTURE 0x84E0 - -/* TextureWrapMode */ -#define GL_REPEAT 0x2901 -#define GL_CLAMP_TO_EDGE 0x812F -#define GL_MIRRORED_REPEAT 0x8370 - -/* Uniform Types */ -#define GL_FLOAT_VEC2 0x8B50 -#define GL_FLOAT_VEC3 0x8B51 -#define GL_FLOAT_VEC4 0x8B52 -#define GL_INT_VEC2 0x8B53 -#define GL_INT_VEC3 0x8B54 -#define GL_INT_VEC4 0x8B55 -#define GL_BOOL 0x8B56 -#define GL_BOOL_VEC2 0x8B57 -#define GL_BOOL_VEC3 0x8B58 -#define GL_BOOL_VEC4 0x8B59 -#define GL_FLOAT_MAT2 0x8B5A -#define GL_FLOAT_MAT3 0x8B5B -#define GL_FLOAT_MAT4 0x8B5C -#define GL_SAMPLER_2D 0x8B5E -#define GL_SAMPLER_CUBE 0x8B60 - -/* Vertex Arrays */ -#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 -#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 -#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 -#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 -#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A -#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 -#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F - -/* Read Format */ -#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A -#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B - -/* Shader Source */ -#define GL_COMPILE_STATUS 0x8B81 -#define GL_INFO_LOG_LENGTH 0x8B84 -#define GL_SHADER_SOURCE_LENGTH 0x8B88 -#define GL_SHADER_COMPILER 0x8DFA - -/* Shader Binary */ -#define GL_SHADER_BINARY_FORMATS 0x8DF8 -#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 - -/* Shader Precision-Specified Types */ -#define GL_LOW_FLOAT 0x8DF0 -#define GL_MEDIUM_FLOAT 0x8DF1 -#define GL_HIGH_FLOAT 0x8DF2 -#define GL_LOW_INT 0x8DF3 -#define GL_MEDIUM_INT 0x8DF4 -#define GL_HIGH_INT 0x8DF5 - -/* Framebuffer Object. */ -#define GL_FRAMEBUFFER 0x8D40 -#define GL_RENDERBUFFER 0x8D41 - -#define GL_RGBA4 0x8056 -#define GL_RGB5_A1 0x8057 -#define GL_RGB565 0x8D62 -#define GL_DEPTH_COMPONENT16 0x81A5 -#define GL_STENCIL_INDEX8 0x8D48 - -#define GL_RENDERBUFFER_WIDTH 0x8D42 -#define GL_RENDERBUFFER_HEIGHT 0x8D43 -#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 -#define GL_RENDERBUFFER_RED_SIZE 0x8D50 -#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 -#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 -#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 -#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 -#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 - -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 - -#define GL_COLOR_ATTACHMENT0 0x8CE0 -#define GL_DEPTH_ATTACHMENT 0x8D00 -#define GL_STENCIL_ATTACHMENT 0x8D20 - -#define GL_NONE 0 - -#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 -#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 -#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 -#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9 -#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD - -#define GL_FRAMEBUFFER_BINDING 0x8CA6 -#define GL_RENDERBUFFER_BINDING 0x8CA7 -#define GL_MAX_RENDERBUFFER_SIZE 0x84E8 - -#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 - -/*------------------------------------------------------------------------- - * GL core functions. - *-----------------------------------------------------------------------*/ - -GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture); -GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader); -GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar* name); -GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer); -GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer); -GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer); -GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture); -GL_APICALL void GL_APIENTRY glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); -GL_APICALL void GL_APIENTRY glBlendEquation ( GLenum mode ); -GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); -GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); -GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage); -GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data); -GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target); -GL_APICALL void GL_APIENTRY glClear (GLbitfield mask); -GL_APICALL void GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); -GL_APICALL void GL_APIENTRY glClearDepthf (GLclampf depth); -GL_APICALL void GL_APIENTRY glClearStencil (GLint s); -GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader); -GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data); -GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data); -GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GL_APICALL GLuint GL_APIENTRY glCreateProgram (void); -GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type); -GL_APICALL void GL_APIENTRY glCullFace (GLenum mode); -GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint* buffers); -GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint* framebuffers); -GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program); -GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers); -GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader); -GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint* textures); -GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func); -GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag); -GL_APICALL void GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar); -GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader); -GL_APICALL void GL_APIENTRY glDisable (GLenum cap); -GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index); -GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count); -GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices); -GL_APICALL void GL_APIENTRY glEnable (GLenum cap); -GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index); -GL_APICALL void GL_APIENTRY glFinish (void); -GL_APICALL void GL_APIENTRY glFlush (void); -GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode); -GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint* buffers); -GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target); -GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint* framebuffers); -GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint* renderbuffers); -GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint* textures); -GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name); -GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name); -GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders); -GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar* name); -GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean* params); -GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params); -GL_APICALL GLenum GL_APIENTRY glGetError (void); -GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat* params); -GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params); -GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint* params); -GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint* params); -GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog); -GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params); -GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint* params); -GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog); -GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision); -GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source); -GL_APICALL const GLubyte* GL_APIENTRY glGetString (GLenum name); -GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params); -GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint* params); -GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat* params); -GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint* params); -GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar* name); -GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params); -GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params); -GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid** pointer); -GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode); -GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer); -GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap); -GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer); -GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program); -GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer); -GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader); -GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture); -GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width); -GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program); -GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param); -GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units); -GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels); -GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void); -GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert); -GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length); -GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length); -GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); -GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); -GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask); -GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask); -GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); -GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass); -GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels); -GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param); -GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params); -GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param); -GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint* params); -GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels); -GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat x); -GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat* v); -GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint x); -GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint* v); -GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat x, GLfloat y); -GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat* v); -GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint x, GLint y); -GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint* v); -GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z); -GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat* v); -GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint x, GLint y, GLint z); -GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint* v); -GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat* v); -GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint x, GLint y, GLint z, GLint w); -GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint* v); -GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); -GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); -GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); -GL_APICALL void GL_APIENTRY glUseProgram (GLuint program); -GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program); -GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint indx, GLfloat x); -GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint indx, const GLfloat* values); -GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint indx, GLfloat x, GLfloat y); -GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint indx, const GLfloat* values); -GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z); -GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint indx, const GLfloat* values); -GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint indx, const GLfloat* values); -GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr); -GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); - -#ifdef __cplusplus -} -#endif - -#endif /* __gl2_h_ */ diff --git a/platform/winrt/include/GLES2/gl2ext.h b/platform/winrt/include/GLES2/gl2ext.h deleted file mode 100644 index d5a9dd195b3..00000000000 --- a/platform/winrt/include/GLES2/gl2ext.h +++ /dev/null @@ -1,2013 +0,0 @@ -#ifndef __gl2ext_h_ -#define __gl2ext_h_ - -/* $Revision: 20795 $ on $Date:: 2013-03-07 01:01:58 -0800 #$ */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * This document is licensed under the SGI Free Software B License Version - * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . - */ - -#ifndef GL_APIENTRYP -# define GL_APIENTRYP GL_APIENTRY* -#endif - -/*------------------------------------------------------------------------* - * OES extension tokens - *------------------------------------------------------------------------*/ - -/* GL_OES_compressed_ETC1_RGB8_texture */ -#ifndef GL_OES_compressed_ETC1_RGB8_texture -#define GL_ETC1_RGB8_OES 0x8D64 -#endif - -/* GL_OES_compressed_paletted_texture */ -#ifndef GL_OES_compressed_paletted_texture -#define GL_PALETTE4_RGB8_OES 0x8B90 -#define GL_PALETTE4_RGBA8_OES 0x8B91 -#define GL_PALETTE4_R5_G6_B5_OES 0x8B92 -#define GL_PALETTE4_RGBA4_OES 0x8B93 -#define GL_PALETTE4_RGB5_A1_OES 0x8B94 -#define GL_PALETTE8_RGB8_OES 0x8B95 -#define GL_PALETTE8_RGBA8_OES 0x8B96 -#define GL_PALETTE8_R5_G6_B5_OES 0x8B97 -#define GL_PALETTE8_RGBA4_OES 0x8B98 -#define GL_PALETTE8_RGB5_A1_OES 0x8B99 -#endif - -/* GL_OES_depth24 */ -#ifndef GL_OES_depth24 -#define GL_DEPTH_COMPONENT24_OES 0x81A6 -#endif - -/* GL_OES_depth32 */ -#ifndef GL_OES_depth32 -#define GL_DEPTH_COMPONENT32_OES 0x81A7 -#endif - -/* GL_OES_depth_texture */ -/* No new tokens introduced by this extension. */ - -/* GL_OES_EGL_image */ -#ifndef GL_OES_EGL_image -typedef void* GLeglImageOES; -#endif - -/* GL_OES_EGL_image_external */ -#ifndef GL_OES_EGL_image_external -/* GLeglImageOES defined in GL_OES_EGL_image already. */ -#define GL_TEXTURE_EXTERNAL_OES 0x8D65 -#define GL_SAMPLER_EXTERNAL_OES 0x8D66 -#define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67 -#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68 -#endif - -/* GL_OES_element_index_uint */ -#ifndef GL_OES_element_index_uint -#define GL_UNSIGNED_INT 0x1405 -#endif - -/* GL_OES_get_program_binary */ -#ifndef GL_OES_get_program_binary -#define GL_PROGRAM_BINARY_LENGTH_OES 0x8741 -#define GL_NUM_PROGRAM_BINARY_FORMATS_OES 0x87FE -#define GL_PROGRAM_BINARY_FORMATS_OES 0x87FF -#endif - -/* GL_OES_mapbuffer */ -#ifndef GL_OES_mapbuffer -#define GL_WRITE_ONLY_OES 0x88B9 -#define GL_BUFFER_ACCESS_OES 0x88BB -#define GL_BUFFER_MAPPED_OES 0x88BC -#define GL_BUFFER_MAP_POINTER_OES 0x88BD -#endif - -/* GL_OES_packed_depth_stencil */ -#ifndef GL_OES_packed_depth_stencil -#define GL_DEPTH_STENCIL_OES 0x84F9 -#define GL_UNSIGNED_INT_24_8_OES 0x84FA -#define GL_DEPTH24_STENCIL8_OES 0x88F0 -#endif - -/* GL_OES_required_internalformat */ -#ifndef GL_OES_required_internalformat -#define GL_ALPHA8_OES 0x803C -#define GL_DEPTH_COMPONENT16_OES 0x81A5 -/* reuse GL_DEPTH_COMPONENT24_OES */ -/* reuse GL_DEPTH24_STENCIL8_OES */ -/* reuse GL_DEPTH_COMPONENT32_OES */ -#define GL_LUMINANCE4_ALPHA4_OES 0x8043 -#define GL_LUMINANCE8_ALPHA8_OES 0x8045 -#define GL_LUMINANCE8_OES 0x8040 -#define GL_RGBA4_OES 0x8056 -#define GL_RGB5_A1_OES 0x8057 -#define GL_RGB565_OES 0x8D62 -/* reuse GL_RGB8_OES */ -/* reuse GL_RGBA8_OES */ -/* reuse GL_RGB10_EXT */ -/* reuse GL_RGB10_A2_EXT */ -#endif - -/* GL_OES_rgb8_rgba8 */ -#ifndef GL_OES_rgb8_rgba8 -#define GL_RGB8_OES 0x8051 -#define GL_RGBA8_OES 0x8058 -#endif - -/* GL_OES_standard_derivatives */ -#ifndef GL_OES_standard_derivatives -#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES 0x8B8B -#endif - -/* GL_OES_stencil1 */ -#ifndef GL_OES_stencil1 -#define GL_STENCIL_INDEX1_OES 0x8D46 -#endif - -/* GL_OES_stencil4 */ -#ifndef GL_OES_stencil4 -#define GL_STENCIL_INDEX4_OES 0x8D47 -#endif - -#ifndef GL_OES_surfaceless_context -#define GL_FRAMEBUFFER_UNDEFINED_OES 0x8219 -#endif - -/* GL_OES_texture_3D */ -#ifndef GL_OES_texture_3D -#define GL_TEXTURE_WRAP_R_OES 0x8072 -#define GL_TEXTURE_3D_OES 0x806F -#define GL_TEXTURE_BINDING_3D_OES 0x806A -#define GL_MAX_3D_TEXTURE_SIZE_OES 0x8073 -#define GL_SAMPLER_3D_OES 0x8B5F -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES 0x8CD4 -#endif - -/* GL_OES_texture_float */ -/* No new tokens introduced by this extension. */ - -/* GL_OES_texture_float_linear */ -/* No new tokens introduced by this extension. */ - -/* GL_OES_texture_half_float */ -#ifndef GL_OES_texture_half_float -#define GL_HALF_FLOAT_OES 0x8D61 -#endif - -/* GL_OES_texture_half_float_linear */ -/* No new tokens introduced by this extension. */ - -/* GL_OES_texture_npot */ -/* No new tokens introduced by this extension. */ - -/* GL_OES_vertex_array_object */ -#ifndef GL_OES_vertex_array_object -#define GL_VERTEX_ARRAY_BINDING_OES 0x85B5 -#endif - -/* GL_OES_vertex_half_float */ -/* GL_HALF_FLOAT_OES defined in GL_OES_texture_half_float already. */ - -/* GL_OES_vertex_type_10_10_10_2 */ -#ifndef GL_OES_vertex_type_10_10_10_2 -#define GL_UNSIGNED_INT_10_10_10_2_OES 0x8DF6 -#define GL_INT_10_10_10_2_OES 0x8DF7 -#endif - -/*------------------------------------------------------------------------* - * KHR extension tokens - *------------------------------------------------------------------------*/ - -#ifndef GL_KHR_debug -typedef void (GL_APIENTRYP GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam); -#define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242 -#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243 -#define GL_DEBUG_CALLBACK_FUNCTION 0x8244 -#define GL_DEBUG_CALLBACK_USER_PARAM 0x8245 -#define GL_DEBUG_SOURCE_API 0x8246 -#define GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247 -#define GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248 -#define GL_DEBUG_SOURCE_THIRD_PARTY 0x8249 -#define GL_DEBUG_SOURCE_APPLICATION 0x824A -#define GL_DEBUG_SOURCE_OTHER 0x824B -#define GL_DEBUG_TYPE_ERROR 0x824C -#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D -#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR 0x824E -#define GL_DEBUG_TYPE_PORTABILITY 0x824F -#define GL_DEBUG_TYPE_PERFORMANCE 0x8250 -#define GL_DEBUG_TYPE_OTHER 0x8251 -#define GL_DEBUG_TYPE_MARKER 0x8268 -#define GL_DEBUG_TYPE_PUSH_GROUP 0x8269 -#define GL_DEBUG_TYPE_POP_GROUP 0x826A -#define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B -#define GL_MAX_DEBUG_GROUP_STACK_DEPTH 0x826C -#define GL_DEBUG_GROUP_STACK_DEPTH 0x826D -#define GL_BUFFER 0x82E0 -#define GL_SHADER 0x82E1 -#define GL_PROGRAM 0x82E2 -#define GL_QUERY 0x82E3 -/* PROGRAM_PIPELINE only in GL */ -#define GL_SAMPLER 0x82E6 -/* DISPLAY_LIST only in GL */ -#define GL_MAX_LABEL_LENGTH 0x82E8 -#define GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143 -#define GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144 -#define GL_DEBUG_LOGGED_MESSAGES 0x9145 -#define GL_DEBUG_SEVERITY_HIGH 0x9146 -#define GL_DEBUG_SEVERITY_MEDIUM 0x9147 -#define GL_DEBUG_SEVERITY_LOW 0x9148 -#define GL_DEBUG_OUTPUT 0x92E0 -#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002 -#define GL_STACK_OVERFLOW 0x0503 -#define GL_STACK_UNDERFLOW 0x0504 -#endif - -#ifndef GL_KHR_texture_compression_astc_ldr -#define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0 -#define GL_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1 -#define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2 -#define GL_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3 -#define GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4 -#define GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5 -#define GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6 -#define GL_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7 -#define GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8 -#define GL_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9 -#define GL_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA -#define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB -#define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC -#define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD -#endif - -/*------------------------------------------------------------------------* - * AMD extension tokens - *------------------------------------------------------------------------*/ - -/* GL_AMD_compressed_3DC_texture */ -#ifndef GL_AMD_compressed_3DC_texture -#define GL_3DC_X_AMD 0x87F9 -#define GL_3DC_XY_AMD 0x87FA -#endif - -/* GL_AMD_compressed_ATC_texture */ -#ifndef GL_AMD_compressed_ATC_texture -#define GL_ATC_RGB_AMD 0x8C92 -#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93 -#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE -#endif - -/* GL_AMD_performance_monitor */ -#ifndef GL_AMD_performance_monitor -#define GL_COUNTER_TYPE_AMD 0x8BC0 -#define GL_COUNTER_RANGE_AMD 0x8BC1 -#define GL_UNSIGNED_INT64_AMD 0x8BC2 -#define GL_PERCENTAGE_AMD 0x8BC3 -#define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4 -#define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5 -#define GL_PERFMON_RESULT_AMD 0x8BC6 -#endif - -/* GL_AMD_program_binary_Z400 */ -#ifndef GL_AMD_program_binary_Z400 -#define GL_Z400_BINARY_AMD 0x8740 -#endif - -/*------------------------------------------------------------------------* - * ANGLE extension tokens - *------------------------------------------------------------------------*/ - -/* GL_ANGLE_depth_texture */ -#ifndef GL_ANGLE_depth_texture -#define GL_DEPTH_COMPONENT 0x1902 -#define GL_DEPTH_STENCIL_OES 0x84F9 -#define GL_UNSIGNED_SHORT 0x1403 -#define GL_UNSIGNED_INT 0x1405 -#define GL_UNSIGNED_INT_24_8_OES 0x84FA -#define GL_DEPTH_COMPONENT16 0x81A5 -#define GL_DEPTH_COMPONENT32_OES 0x81A7 -#define GL_DEPTH24_STENCIL8_OES 0x88F0 -#endif - -/* GL_ANGLE_framebuffer_blit */ -#ifndef GL_ANGLE_framebuffer_blit -#define GL_READ_FRAMEBUFFER_ANGLE 0x8CA8 -#define GL_DRAW_FRAMEBUFFER_ANGLE 0x8CA9 -#define GL_DRAW_FRAMEBUFFER_BINDING_ANGLE 0x8CA6 -#define GL_READ_FRAMEBUFFER_BINDING_ANGLE 0x8CAA -#endif - -/* GL_ANGLE_framebuffer_multisample */ -#ifndef GL_ANGLE_framebuffer_multisample -#define GL_RENDERBUFFER_SAMPLES_ANGLE 0x8CAB -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE 0x8D56 -#define GL_MAX_SAMPLES_ANGLE 0x8D57 -#endif - -/* GL_ANGLE_instanced_arrays */ -#ifndef GL_ANGLE_instanced_arrays -#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE 0x88FE -#endif - -/* GL_ANGLE_pack_reverse_row_order */ -#ifndef GL_ANGLE_pack_reverse_row_order -#define GL_PACK_REVERSE_ROW_ORDER_ANGLE 0x93A4 -#endif - -/* GL_ANGLE_program_binary */ -#ifndef GL_ANGLE_program_binary -#define GL_PROGRAM_BINARY_ANGLE 0x93A6 -#endif - -/* GL_ANGLE_texture_compression_dxt3 */ -#ifndef GL_ANGLE_texture_compression_dxt3 -#define GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE 0x83F2 -#endif - -/* GL_ANGLE_texture_compression_dxt5 */ -#ifndef GL_ANGLE_texture_compression_dxt5 -#define GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE 0x83F3 -#endif - -/* GL_ANGLE_texture_usage */ -#ifndef GL_ANGLE_texture_usage -#define GL_TEXTURE_USAGE_ANGLE 0x93A2 -#define GL_FRAMEBUFFER_ATTACHMENT_ANGLE 0x93A3 -#endif - -/* GL_ANGLE_translated_shader_source */ -#ifndef GL_ANGLE_translated_shader_source -#define GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE 0x93A0 -#endif - -/*------------------------------------------------------------------------* - * APPLE extension tokens - *------------------------------------------------------------------------*/ - -/* GL_APPLE_copy_texture_levels */ -/* No new tokens introduced by this extension. */ - -/* GL_APPLE_framebuffer_multisample */ -#ifndef GL_APPLE_framebuffer_multisample -#define GL_RENDERBUFFER_SAMPLES_APPLE 0x8CAB -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE 0x8D56 -#define GL_MAX_SAMPLES_APPLE 0x8D57 -#define GL_READ_FRAMEBUFFER_APPLE 0x8CA8 -#define GL_DRAW_FRAMEBUFFER_APPLE 0x8CA9 -#define GL_DRAW_FRAMEBUFFER_BINDING_APPLE 0x8CA6 -#define GL_READ_FRAMEBUFFER_BINDING_APPLE 0x8CAA -#endif - -/* GL_APPLE_rgb_422 */ -#ifndef GL_APPLE_rgb_422 -#define GL_RGB_422_APPLE 0x8A1F -#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA -#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB -#endif - -/* GL_APPLE_sync */ -#ifndef GL_APPLE_sync - -#ifndef __gl3_h_ -/* These types are defined with reference to - * in the Apple extension spec, but here we use the Khronos - * portable types in khrplatform.h, and assume those types - * are always defined. - * If any other extensions using these types are defined, - * the typedefs must move out of this block and be shared. - */ -typedef khronos_int64_t GLint64; -typedef khronos_uint64_t GLuint64; -typedef struct __GLsync *GLsync; -#endif - -#define GL_SYNC_OBJECT_APPLE 0x8A53 -#define GL_MAX_SERVER_WAIT_TIMEOUT_APPLE 0x9111 -#define GL_OBJECT_TYPE_APPLE 0x9112 -#define GL_SYNC_CONDITION_APPLE 0x9113 -#define GL_SYNC_STATUS_APPLE 0x9114 -#define GL_SYNC_FLAGS_APPLE 0x9115 -#define GL_SYNC_FENCE_APPLE 0x9116 -#define GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE 0x9117 -#define GL_UNSIGNALED_APPLE 0x9118 -#define GL_SIGNALED_APPLE 0x9119 -#define GL_ALREADY_SIGNALED_APPLE 0x911A -#define GL_TIMEOUT_EXPIRED_APPLE 0x911B -#define GL_CONDITION_SATISFIED_APPLE 0x911C -#define GL_WAIT_FAILED_APPLE 0x911D -#define GL_SYNC_FLUSH_COMMANDS_BIT_APPLE 0x00000001 -#define GL_TIMEOUT_IGNORED_APPLE 0xFFFFFFFFFFFFFFFFull -#endif - -/* GL_APPLE_texture_format_BGRA8888 */ -#ifndef GL_APPLE_texture_format_BGRA8888 -#define GL_BGRA_EXT 0x80E1 -#endif - -/* GL_APPLE_texture_max_level */ -#ifndef GL_APPLE_texture_max_level -#define GL_TEXTURE_MAX_LEVEL_APPLE 0x813D -#endif - -/*------------------------------------------------------------------------* - * ARM extension tokens - *------------------------------------------------------------------------*/ - -/* GL_ARM_mali_program_binary */ -#ifndef GL_ARM_mali_program_binary -#define GL_MALI_PROGRAM_BINARY_ARM 0x8F61 -#endif - -/* GL_ARM_mali_shader_binary */ -#ifndef GL_ARM_mali_shader_binary -#define GL_MALI_SHADER_BINARY_ARM 0x8F60 -#endif - -/* GL_ARM_rgba8 */ -/* No new tokens introduced by this extension. */ - -/*------------------------------------------------------------------------* - * EXT extension tokens - *------------------------------------------------------------------------*/ - -/* GL_EXT_blend_minmax */ -#ifndef GL_EXT_blend_minmax -#define GL_MIN_EXT 0x8007 -#define GL_MAX_EXT 0x8008 -#endif - -/* GL_EXT_color_buffer_half_float */ -#ifndef GL_EXT_color_buffer_half_float -#define GL_RGBA16F_EXT 0x881A -#define GL_RGB16F_EXT 0x881B -#define GL_RG16F_EXT 0x822F -#define GL_R16F_EXT 0x822D -#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT 0x8211 -#define GL_UNSIGNED_NORMALIZED_EXT 0x8C17 -#endif - -/* GL_EXT_debug_label */ -#ifndef GL_EXT_debug_label -#define GL_PROGRAM_PIPELINE_OBJECT_EXT 0x8A4F -#define GL_PROGRAM_OBJECT_EXT 0x8B40 -#define GL_SHADER_OBJECT_EXT 0x8B48 -#define GL_BUFFER_OBJECT_EXT 0x9151 -#define GL_QUERY_OBJECT_EXT 0x9153 -#define GL_VERTEX_ARRAY_OBJECT_EXT 0x9154 -#endif - -/* GL_EXT_debug_marker */ -/* No new tokens introduced by this extension. */ - -/* GL_EXT_discard_framebuffer */ -#ifndef GL_EXT_discard_framebuffer -#define GL_COLOR_EXT 0x1800 -#define GL_DEPTH_EXT 0x1801 -#define GL_STENCIL_EXT 0x1802 -#endif - -/* GL_EXT_map_buffer_range */ -#ifndef GL_EXT_map_buffer_range -#define GL_MAP_READ_BIT_EXT 0x0001 -#define GL_MAP_WRITE_BIT_EXT 0x0002 -#define GL_MAP_INVALIDATE_RANGE_BIT_EXT 0x0004 -#define GL_MAP_INVALIDATE_BUFFER_BIT_EXT 0x0008 -#define GL_MAP_FLUSH_EXPLICIT_BIT_EXT 0x0010 -#define GL_MAP_UNSYNCHRONIZED_BIT_EXT 0x0020 -#endif - -/* GL_EXT_multisampled_render_to_texture */ -#ifndef GL_EXT_multisampled_render_to_texture -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT 0x8D6C -/* reuse values from GL_EXT_framebuffer_multisample (desktop extension) */ -#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56 -#define GL_MAX_SAMPLES_EXT 0x8D57 -#endif - -/* GL_EXT_multiview_draw_buffers */ -#ifndef GL_EXT_multiview_draw_buffers -#define GL_COLOR_ATTACHMENT_EXT 0x90F0 -#define GL_MULTIVIEW_EXT 0x90F1 -#define GL_DRAW_BUFFER_EXT 0x0C01 -#define GL_READ_BUFFER_EXT 0x0C02 -#define GL_MAX_MULTIVIEW_BUFFERS_EXT 0x90F2 -#endif - -/* GL_EXT_multi_draw_arrays */ -/* No new tokens introduced by this extension. */ - -/* GL_EXT_occlusion_query_boolean */ -#ifndef GL_EXT_occlusion_query_boolean -#define GL_ANY_SAMPLES_PASSED_EXT 0x8C2F -#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT 0x8D6A -#define GL_CURRENT_QUERY_EXT 0x8865 -#define GL_QUERY_RESULT_EXT 0x8866 -#define GL_QUERY_RESULT_AVAILABLE_EXT 0x8867 -#endif - -/* GL_EXT_read_format_bgra */ -#ifndef GL_EXT_read_format_bgra -#define GL_BGRA_EXT 0x80E1 -#define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT 0x8365 -#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366 -#endif - -/* GL_EXT_robustness */ -#ifndef GL_EXT_robustness -/* reuse GL_NO_ERROR */ -#define GL_GUILTY_CONTEXT_RESET_EXT 0x8253 -#define GL_INNOCENT_CONTEXT_RESET_EXT 0x8254 -#define GL_UNKNOWN_CONTEXT_RESET_EXT 0x8255 -#define GL_CONTEXT_ROBUST_ACCESS_EXT 0x90F3 -#define GL_RESET_NOTIFICATION_STRATEGY_EXT 0x8256 -#define GL_LOSE_CONTEXT_ON_RESET_EXT 0x8252 -#define GL_NO_RESET_NOTIFICATION_EXT 0x8261 -#endif - -/* GL_EXT_separate_shader_objects */ -#ifndef GL_EXT_separate_shader_objects -#define GL_VERTEX_SHADER_BIT_EXT 0x00000001 -#define GL_FRAGMENT_SHADER_BIT_EXT 0x00000002 -#define GL_ALL_SHADER_BITS_EXT 0xFFFFFFFF -#define GL_PROGRAM_SEPARABLE_EXT 0x8258 -#define GL_ACTIVE_PROGRAM_EXT 0x8259 -#define GL_PROGRAM_PIPELINE_BINDING_EXT 0x825A -#endif - -/* GL_EXT_shader_framebuffer_fetch */ -#ifndef GL_EXT_shader_framebuffer_fetch -#define GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT 0x8A52 -#endif - -/* GL_EXT_shader_texture_lod */ -/* No new tokens introduced by this extension. */ - -/* GL_EXT_shadow_samplers */ -#ifndef GL_EXT_shadow_samplers -#define GL_TEXTURE_COMPARE_MODE_EXT 0x884C -#define GL_TEXTURE_COMPARE_FUNC_EXT 0x884D -#define GL_COMPARE_REF_TO_TEXTURE_EXT 0x884E -#define GL_SAMPLER_2D_SHADOW_EXT 0x8B62 -#endif - -/* GL_EXT_sRGB */ -#ifndef GL_EXT_sRGB -#define GL_SRGB_EXT 0x8C40 -#define GL_SRGB_ALPHA_EXT 0x8C42 -#define GL_SRGB8_ALPHA8_EXT 0x8C43 -#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT 0x8210 -#endif - -/* GL_EXT_texture_compression_dxt1 */ -#ifndef GL_EXT_texture_compression_dxt1 -#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 -#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 -#endif - -/* GL_EXT_texture_filter_anisotropic */ -#ifndef GL_EXT_texture_filter_anisotropic -#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE -#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF -#endif - -/* GL_EXT_texture_format_BGRA8888 */ -#ifndef GL_EXT_texture_format_BGRA8888 -#define GL_BGRA_EXT 0x80E1 -#endif - -/* GL_EXT_texture_rg */ -#ifndef GL_EXT_texture_rg -#define GL_RED_EXT 0x1903 -#define GL_RG_EXT 0x8227 -#define GL_R8_EXT 0x8229 -#define GL_RG8_EXT 0x822B -#endif - -/* GL_EXT_texture_storage */ -#ifndef GL_EXT_texture_storage -#define GL_TEXTURE_IMMUTABLE_FORMAT_EXT 0x912F -#define GL_ALPHA8_EXT 0x803C -#define GL_LUMINANCE8_EXT 0x8040 -#define GL_LUMINANCE8_ALPHA8_EXT 0x8045 -#define GL_RGBA32F_EXT 0x8814 -#define GL_RGB32F_EXT 0x8815 -#define GL_ALPHA32F_EXT 0x8816 -#define GL_LUMINANCE32F_EXT 0x8818 -#define GL_LUMINANCE_ALPHA32F_EXT 0x8819 -/* reuse GL_RGBA16F_EXT */ -/* reuse GL_RGB16F_EXT */ -#define GL_ALPHA16F_EXT 0x881C -#define GL_LUMINANCE16F_EXT 0x881E -#define GL_LUMINANCE_ALPHA16F_EXT 0x881F -#define GL_RGB10_A2_EXT 0x8059 -#define GL_RGB10_EXT 0x8052 -#define GL_BGRA8_EXT 0x93A1 -#define GL_R8_EXT 0x8229 -#define GL_RG8_EXT 0x822B -#define GL_R32F_EXT 0x822E -#define GL_RG32F_EXT 0x8230 -#define GL_R16F_EXT 0x822D -#define GL_RG16F_EXT 0x822F -#endif - -/* GL_EXT_texture_type_2_10_10_10_REV */ -#ifndef GL_EXT_texture_type_2_10_10_10_REV -#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368 -#endif - -/* GL_EXT_unpack_subimage */ -#ifndef GL_EXT_unpack_subimage -#define GL_UNPACK_ROW_LENGTH_EXT 0x0CF2 -#define GL_UNPACK_SKIP_ROWS_EXT 0x0CF3 -#define GL_UNPACK_SKIP_PIXELS_EXT 0x0CF4 -#endif - -/*------------------------------------------------------------------------* - * DMP extension tokens - *------------------------------------------------------------------------*/ - -/* GL_DMP_shader_binary */ -#ifndef GL_DMP_shader_binary -#define GL_SHADER_BINARY_DMP 0x9250 -#endif - -/*------------------------------------------------------------------------* - * FJ extension tokens - *------------------------------------------------------------------------*/ - -/* GL_FJ_shader_binary_GCCSO */ -#ifndef GL_FJ_shader_binary_GCCSO -#define GL_GCCSO_SHADER_BINARY_F 0x9260 -#endif - -/*------------------------------------------------------------------------* - * IMG extension tokens - *------------------------------------------------------------------------*/ - -/* GL_IMG_program_binary */ -#ifndef GL_IMG_program_binary -#define GL_SGX_PROGRAM_BINARY_IMG 0x9130 -#endif - -/* GL_IMG_read_format */ -#ifndef GL_IMG_read_format -#define GL_BGRA_IMG 0x80E1 -#define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG 0x8365 -#endif - -/* GL_IMG_shader_binary */ -#ifndef GL_IMG_shader_binary -#define GL_SGX_BINARY_IMG 0x8C0A -#endif - -/* GL_IMG_texture_compression_pvrtc */ -#ifndef GL_IMG_texture_compression_pvrtc -#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00 -#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01 -#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02 -#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03 -#endif - -/* GL_IMG_texture_compression_pvrtc2 */ -#ifndef GL_IMG_texture_compression_pvrtc2 -#define GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG 0x9137 -#define GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG 0x9138 -#endif - -/* GL_IMG_multisampled_render_to_texture */ -#ifndef GL_IMG_multisampled_render_to_texture -#define GL_RENDERBUFFER_SAMPLES_IMG 0x9133 -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG 0x9134 -#define GL_MAX_SAMPLES_IMG 0x9135 -#define GL_TEXTURE_SAMPLES_IMG 0x9136 -#endif - -/*------------------------------------------------------------------------* - * NV extension tokens - *------------------------------------------------------------------------*/ - -/* GL_NV_coverage_sample */ -#ifndef GL_NV_coverage_sample -#define GL_COVERAGE_COMPONENT_NV 0x8ED0 -#define GL_COVERAGE_COMPONENT4_NV 0x8ED1 -#define GL_COVERAGE_ATTACHMENT_NV 0x8ED2 -#define GL_COVERAGE_BUFFERS_NV 0x8ED3 -#define GL_COVERAGE_SAMPLES_NV 0x8ED4 -#define GL_COVERAGE_ALL_FRAGMENTS_NV 0x8ED5 -#define GL_COVERAGE_EDGE_FRAGMENTS_NV 0x8ED6 -#define GL_COVERAGE_AUTOMATIC_NV 0x8ED7 -#define GL_COVERAGE_BUFFER_BIT_NV 0x8000 -#endif - -/* GL_NV_depth_nonlinear */ -#ifndef GL_NV_depth_nonlinear -#define GL_DEPTH_COMPONENT16_NONLINEAR_NV 0x8E2C -#endif - -/* GL_NV_draw_buffers */ -#ifndef GL_NV_draw_buffers -#define GL_MAX_DRAW_BUFFERS_NV 0x8824 -#define GL_DRAW_BUFFER0_NV 0x8825 -#define GL_DRAW_BUFFER1_NV 0x8826 -#define GL_DRAW_BUFFER2_NV 0x8827 -#define GL_DRAW_BUFFER3_NV 0x8828 -#define GL_DRAW_BUFFER4_NV 0x8829 -#define GL_DRAW_BUFFER5_NV 0x882A -#define GL_DRAW_BUFFER6_NV 0x882B -#define GL_DRAW_BUFFER7_NV 0x882C -#define GL_DRAW_BUFFER8_NV 0x882D -#define GL_DRAW_BUFFER9_NV 0x882E -#define GL_DRAW_BUFFER10_NV 0x882F -#define GL_DRAW_BUFFER11_NV 0x8830 -#define GL_DRAW_BUFFER12_NV 0x8831 -#define GL_DRAW_BUFFER13_NV 0x8832 -#define GL_DRAW_BUFFER14_NV 0x8833 -#define GL_DRAW_BUFFER15_NV 0x8834 -#define GL_COLOR_ATTACHMENT0_NV 0x8CE0 -#define GL_COLOR_ATTACHMENT1_NV 0x8CE1 -#define GL_COLOR_ATTACHMENT2_NV 0x8CE2 -#define GL_COLOR_ATTACHMENT3_NV 0x8CE3 -#define GL_COLOR_ATTACHMENT4_NV 0x8CE4 -#define GL_COLOR_ATTACHMENT5_NV 0x8CE5 -#define GL_COLOR_ATTACHMENT6_NV 0x8CE6 -#define GL_COLOR_ATTACHMENT7_NV 0x8CE7 -#define GL_COLOR_ATTACHMENT8_NV 0x8CE8 -#define GL_COLOR_ATTACHMENT9_NV 0x8CE9 -#define GL_COLOR_ATTACHMENT10_NV 0x8CEA -#define GL_COLOR_ATTACHMENT11_NV 0x8CEB -#define GL_COLOR_ATTACHMENT12_NV 0x8CEC -#define GL_COLOR_ATTACHMENT13_NV 0x8CED -#define GL_COLOR_ATTACHMENT14_NV 0x8CEE -#define GL_COLOR_ATTACHMENT15_NV 0x8CEF -#endif - -/* GL_EXT_draw_buffers */ -#ifndef GL_EXT_draw_buffers -#define GL_MAX_DRAW_BUFFERS_EXT 0x8824 -#define GL_DRAW_BUFFER0_EXT 0x8825 -#define GL_DRAW_BUFFER1_EXT 0x8826 -#define GL_DRAW_BUFFER2_EXT 0x8827 -#define GL_DRAW_BUFFER3_EXT 0x8828 -#define GL_DRAW_BUFFER4_EXT 0x8829 -#define GL_DRAW_BUFFER5_EXT 0x882A -#define GL_DRAW_BUFFER6_EXT 0x882B -#define GL_DRAW_BUFFER7_EXT 0x882C -#define GL_DRAW_BUFFER8_EXT 0x882D -#define GL_DRAW_BUFFER9_EXT 0x882E -#define GL_DRAW_BUFFER10_EXT 0x882F -#define GL_DRAW_BUFFER11_EXT 0x8830 -#define GL_DRAW_BUFFER12_EXT 0x8831 -#define GL_DRAW_BUFFER13_EXT 0x8832 -#define GL_DRAW_BUFFER14_EXT 0x8833 -#define GL_DRAW_BUFFER15_EXT 0x8834 -#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0 -#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1 -#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2 -#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3 -#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4 -#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5 -#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6 -#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7 -#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8 -#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9 -#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA -#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB -#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC -#define GL_COLOR_ATTACHMENT13_EXT 0x8CED -#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE -#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF -#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF -#endif - -/* GL_NV_draw_instanced */ -/* No new tokens introduced by this extension. */ - -/* GL_NV_fbo_color_attachments */ -#ifndef GL_NV_fbo_color_attachments -#define GL_MAX_COLOR_ATTACHMENTS_NV 0x8CDF -/* GL_COLOR_ATTACHMENT{0-15}_NV defined in GL_NV_draw_buffers already. */ -#endif - -/* GL_NV_fence */ -#ifndef GL_NV_fence -#define GL_ALL_COMPLETED_NV 0x84F2 -#define GL_FENCE_STATUS_NV 0x84F3 -#define GL_FENCE_CONDITION_NV 0x84F4 -#endif - -/* GL_NV_framebuffer_blit */ -#ifndef GL_NV_framebuffer_blit -#define GL_READ_FRAMEBUFFER_NV 0x8CA8 -#define GL_DRAW_FRAMEBUFFER_NV 0x8CA9 -#define GL_DRAW_FRAMEBUFFER_BINDING_NV 0x8CA6 -#define GL_READ_FRAMEBUFFER_BINDING_NV 0x8CAA -#endif - -/* GL_NV_framebuffer_multisample */ -#ifndef GL_NV_framebuffer_multisample -#define GL_RENDERBUFFER_SAMPLES_NV 0x8CAB -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_NV 0x8D56 -#define GL_MAX_SAMPLES_NV 0x8D57 -#endif - -/* GL_NV_generate_mipmap_sRGB */ -/* No new tokens introduced by this extension. */ - -/* GL_NV_instanced_arrays */ -#ifndef GL_NV_instanced_arrays -#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_NV 0x88FE -#endif - -/* GL_NV_read_buffer */ -#ifndef GL_NV_read_buffer -#define GL_READ_BUFFER_NV 0x0C02 -#endif - -/* GL_NV_read_buffer_front */ -/* No new tokens introduced by this extension. */ - -/* GL_NV_read_depth */ -/* No new tokens introduced by this extension. */ - -/* GL_NV_read_depth_stencil */ -/* No new tokens introduced by this extension. */ - -/* GL_NV_read_stencil */ -/* No new tokens introduced by this extension. */ - -/* GL_NV_shadow_samplers_array */ -#ifndef GL_NV_shadow_samplers_array -#define GL_SAMPLER_2D_ARRAY_SHADOW_NV 0x8DC4 -#endif - -/* GL_NV_shadow_samplers_cube */ -#ifndef GL_NV_shadow_samplers_cube -#define GL_SAMPLER_CUBE_SHADOW_NV 0x8DC5 -#endif - -/* GL_NV_sRGB_formats */ -#ifndef GL_NV_sRGB_formats -#define GL_SLUMINANCE_NV 0x8C46 -#define GL_SLUMINANCE_ALPHA_NV 0x8C44 -#define GL_SRGB8_NV 0x8C41 -#define GL_SLUMINANCE8_NV 0x8C47 -#define GL_SLUMINANCE8_ALPHA8_NV 0x8C45 -#define GL_COMPRESSED_SRGB_S3TC_DXT1_NV 0x8C4C -#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV 0x8C4D -#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV 0x8C4E -#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV 0x8C4F -#define GL_ETC1_SRGB8_NV 0x88EE -#endif - -/* GL_NV_texture_border_clamp */ -#ifndef GL_NV_texture_border_clamp -#define GL_TEXTURE_BORDER_COLOR_NV 0x1004 -#define GL_CLAMP_TO_BORDER_NV 0x812D -#endif - -/* GL_NV_texture_compression_s3tc_update */ -/* No new tokens introduced by this extension. */ - -/* GL_NV_texture_npot_2D_mipmap */ -/* No new tokens introduced by this extension. */ - -/*------------------------------------------------------------------------* - * QCOM extension tokens - *------------------------------------------------------------------------*/ - -/* GL_QCOM_alpha_test */ -#ifndef GL_QCOM_alpha_test -#define GL_ALPHA_TEST_QCOM 0x0BC0 -#define GL_ALPHA_TEST_FUNC_QCOM 0x0BC1 -#define GL_ALPHA_TEST_REF_QCOM 0x0BC2 -#endif - -/* GL_QCOM_binning_control */ -#ifndef GL_QCOM_binning_control -#define GL_BINNING_CONTROL_HINT_QCOM 0x8FB0 -#define GL_CPU_OPTIMIZED_QCOM 0x8FB1 -#define GL_GPU_OPTIMIZED_QCOM 0x8FB2 -#define GL_RENDER_DIRECT_TO_FRAMEBUFFER_QCOM 0x8FB3 -#endif - -/* GL_QCOM_driver_control */ -/* No new tokens introduced by this extension. */ - -/* GL_QCOM_extended_get */ -#ifndef GL_QCOM_extended_get -#define GL_TEXTURE_WIDTH_QCOM 0x8BD2 -#define GL_TEXTURE_HEIGHT_QCOM 0x8BD3 -#define GL_TEXTURE_DEPTH_QCOM 0x8BD4 -#define GL_TEXTURE_INTERNAL_FORMAT_QCOM 0x8BD5 -#define GL_TEXTURE_FORMAT_QCOM 0x8BD6 -#define GL_TEXTURE_TYPE_QCOM 0x8BD7 -#define GL_TEXTURE_IMAGE_VALID_QCOM 0x8BD8 -#define GL_TEXTURE_NUM_LEVELS_QCOM 0x8BD9 -#define GL_TEXTURE_TARGET_QCOM 0x8BDA -#define GL_TEXTURE_OBJECT_VALID_QCOM 0x8BDB -#define GL_STATE_RESTORE 0x8BDC -#endif - -/* GL_QCOM_extended_get2 */ -/* No new tokens introduced by this extension. */ - -/* GL_QCOM_perfmon_global_mode */ -#ifndef GL_QCOM_perfmon_global_mode -#define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0 -#endif - -/* GL_QCOM_writeonly_rendering */ -#ifndef GL_QCOM_writeonly_rendering -#define GL_WRITEONLY_RENDERING_QCOM 0x8823 -#endif - -/* GL_QCOM_tiled_rendering */ -#ifndef GL_QCOM_tiled_rendering -#define GL_COLOR_BUFFER_BIT0_QCOM 0x00000001 -#define GL_COLOR_BUFFER_BIT1_QCOM 0x00000002 -#define GL_COLOR_BUFFER_BIT2_QCOM 0x00000004 -#define GL_COLOR_BUFFER_BIT3_QCOM 0x00000008 -#define GL_COLOR_BUFFER_BIT4_QCOM 0x00000010 -#define GL_COLOR_BUFFER_BIT5_QCOM 0x00000020 -#define GL_COLOR_BUFFER_BIT6_QCOM 0x00000040 -#define GL_COLOR_BUFFER_BIT7_QCOM 0x00000080 -#define GL_DEPTH_BUFFER_BIT0_QCOM 0x00000100 -#define GL_DEPTH_BUFFER_BIT1_QCOM 0x00000200 -#define GL_DEPTH_BUFFER_BIT2_QCOM 0x00000400 -#define GL_DEPTH_BUFFER_BIT3_QCOM 0x00000800 -#define GL_DEPTH_BUFFER_BIT4_QCOM 0x00001000 -#define GL_DEPTH_BUFFER_BIT5_QCOM 0x00002000 -#define GL_DEPTH_BUFFER_BIT6_QCOM 0x00004000 -#define GL_DEPTH_BUFFER_BIT7_QCOM 0x00008000 -#define GL_STENCIL_BUFFER_BIT0_QCOM 0x00010000 -#define GL_STENCIL_BUFFER_BIT1_QCOM 0x00020000 -#define GL_STENCIL_BUFFER_BIT2_QCOM 0x00040000 -#define GL_STENCIL_BUFFER_BIT3_QCOM 0x00080000 -#define GL_STENCIL_BUFFER_BIT4_QCOM 0x00100000 -#define GL_STENCIL_BUFFER_BIT5_QCOM 0x00200000 -#define GL_STENCIL_BUFFER_BIT6_QCOM 0x00400000 -#define GL_STENCIL_BUFFER_BIT7_QCOM 0x00800000 -#define GL_MULTISAMPLE_BUFFER_BIT0_QCOM 0x01000000 -#define GL_MULTISAMPLE_BUFFER_BIT1_QCOM 0x02000000 -#define GL_MULTISAMPLE_BUFFER_BIT2_QCOM 0x04000000 -#define GL_MULTISAMPLE_BUFFER_BIT3_QCOM 0x08000000 -#define GL_MULTISAMPLE_BUFFER_BIT4_QCOM 0x10000000 -#define GL_MULTISAMPLE_BUFFER_BIT5_QCOM 0x20000000 -#define GL_MULTISAMPLE_BUFFER_BIT6_QCOM 0x40000000 -#define GL_MULTISAMPLE_BUFFER_BIT7_QCOM 0x80000000 -#endif - -/*------------------------------------------------------------------------* - * VIV extension tokens - *------------------------------------------------------------------------*/ - -/* GL_VIV_shader_binary */ -#ifndef GL_VIV_shader_binary -#define GL_SHADER_BINARY_VIV 0x8FC4 -#endif - -/*------------------------------------------------------------------------* - * End of extension tokens, start of corresponding extension functions - *------------------------------------------------------------------------*/ - -/*------------------------------------------------------------------------* - * OES extension functions - *------------------------------------------------------------------------*/ - -/* GL_OES_compressed_ETC1_RGB8_texture */ -#ifndef GL_OES_compressed_ETC1_RGB8_texture -#define GL_OES_compressed_ETC1_RGB8_texture 1 -#endif - -/* GL_OES_compressed_paletted_texture */ -#ifndef GL_OES_compressed_paletted_texture -#define GL_OES_compressed_paletted_texture 1 -#endif - -/* GL_OES_depth24 */ -#ifndef GL_OES_depth24 -#define GL_OES_depth24 1 -#endif - -/* GL_OES_depth32 */ -#ifndef GL_OES_depth32 -#define GL_OES_depth32 1 -#endif - -/* GL_OES_depth_texture */ -#ifndef GL_OES_depth_texture -#define GL_OES_depth_texture 1 -#endif - -/* GL_OES_EGL_image */ -#ifndef GL_OES_EGL_image -#define GL_OES_EGL_image 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image); -GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image); -#endif -typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image); -typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image); -#endif - -/* GL_OES_EGL_image_external */ -#ifndef GL_OES_EGL_image_external -#define GL_OES_EGL_image_external 1 -/* glEGLImageTargetTexture2DOES defined in GL_OES_EGL_image already. */ -#endif - -/* GL_OES_element_index_uint */ -#ifndef GL_OES_element_index_uint -#define GL_OES_element_index_uint 1 -#endif - -/* GL_OES_fbo_render_mipmap */ -#ifndef GL_OES_fbo_render_mipmap -#define GL_OES_fbo_render_mipmap 1 -#endif - -/* GL_OES_fragment_precision_high */ -#ifndef GL_OES_fragment_precision_high -#define GL_OES_fragment_precision_high 1 -#endif - -/* GL_OES_get_program_binary */ -#ifndef GL_OES_get_program_binary -#define GL_OES_get_program_binary 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary); -GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length); -#endif -typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary); -typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length); -#endif - -/* GL_OES_mapbuffer */ -#ifndef GL_OES_mapbuffer -#define GL_OES_mapbuffer 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access); -GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target); -GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, GLvoid** params); -#endif -typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access); -typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target); -typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, GLvoid** params); -#endif - -/* GL_OES_packed_depth_stencil */ -#ifndef GL_OES_packed_depth_stencil -#define GL_OES_packed_depth_stencil 1 -#endif - -/* GL_OES_required_internalformat */ -#ifndef GL_OES_required_internalformat -#define GL_OES_required_internalformat 1 -#endif - -/* GL_OES_rgb8_rgba8 */ -#ifndef GL_OES_rgb8_rgba8 -#define GL_OES_rgb8_rgba8 1 -#endif - -/* GL_OES_standard_derivatives */ -#ifndef GL_OES_standard_derivatives -#define GL_OES_standard_derivatives 1 -#endif - -/* GL_OES_stencil1 */ -#ifndef GL_OES_stencil1 -#define GL_OES_stencil1 1 -#endif - -/* GL_OES_stencil4 */ -#ifndef GL_OES_stencil4 -#define GL_OES_stencil4 1 -#endif - -#ifndef GL_OES_surfaceless_context -#define GL_OES_surfaceless_context 1 -#endif - -/* GL_OES_texture_3D */ -#ifndef GL_OES_texture_3D -#define GL_OES_texture_3D 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels); -GL_APICALL void GL_APIENTRY glTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels); -GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data); -GL_APICALL void GL_APIENTRY glCompressedTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data); -GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -#endif -typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels); -typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels); -typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data); -typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOES) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -#endif - -/* GL_OES_texture_float */ -#ifndef GL_OES_texture_float -#define GL_OES_texture_float 1 -#endif - -/* GL_OES_texture_float_linear */ -#ifndef GL_OES_texture_float_linear -#define GL_OES_texture_float_linear 1 -#endif - -/* GL_OES_texture_half_float */ -#ifndef GL_OES_texture_half_float -#define GL_OES_texture_half_float 1 -#endif - -/* GL_OES_texture_half_float_linear */ -#ifndef GL_OES_texture_half_float_linear -#define GL_OES_texture_half_float_linear 1 -#endif - -/* GL_OES_texture_npot */ -#ifndef GL_OES_texture_npot -#define GL_OES_texture_npot 1 -#endif - -/* GL_OES_vertex_array_object */ -#ifndef GL_OES_vertex_array_object -#define GL_OES_vertex_array_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glBindVertexArrayOES (GLuint array); -GL_APICALL void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays); -GL_APICALL void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays); -GL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array); -#endif -typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array); -typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays); -typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays); -typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array); -#endif - -/* GL_OES_vertex_half_float */ -#ifndef GL_OES_vertex_half_float -#define GL_OES_vertex_half_float 1 -#endif - -/* GL_OES_vertex_type_10_10_10_2 */ -#ifndef GL_OES_vertex_type_10_10_10_2 -#define GL_OES_vertex_type_10_10_10_2 1 -#endif - -/*------------------------------------------------------------------------* - * KHR extension functions - *------------------------------------------------------------------------*/ - -#ifndef GL_KHR_debug -#define GL_KHR_debug 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glDebugMessageControl (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); -GL_APICALL void GL_APIENTRY glDebugMessageInsert (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); -GL_APICALL void GL_APIENTRY glDebugMessageCallback (GLDEBUGPROC callback, const void *userParam); -GL_APICALL GLuint GL_APIENTRY glGetDebugMessageLog (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); -GL_APICALL void GL_APIENTRY glPushDebugGroup (GLenum source, GLuint id, GLsizei length, const GLchar *message); -GL_APICALL void GL_APIENTRY glPopDebugGroup (void); -GL_APICALL void GL_APIENTRY glObjectLabel (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); -GL_APICALL void GL_APIENTRY glGetObjectLabel (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); -GL_APICALL void GL_APIENTRY glObjectPtrLabel (const void *ptr, GLsizei length, const GLchar *label); -GL_APICALL void GL_APIENTRY glGetObjectPtrLabel (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); -GL_APICALL void GL_APIENTRY glGetPointerv (GLenum pname, void **params); -#endif -typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECONTROLPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); -typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGEINSERTPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); -typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECALLBACKPROC) (GLDEBUGPROC callback, const void *userParam); -typedef GLuint (GL_APIENTRYP PFNGLGETDEBUGMESSAGELOGPROC) (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); -typedef void (GL_APIENTRYP PFNGLPUSHDEBUGGROUPPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message); -typedef void (GL_APIENTRYP PFNGLPOPDEBUGGROUPPROC) (void); -typedef void (GL_APIENTRYP PFNGLOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); -typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); -typedef void (GL_APIENTRYP PFNGLOBJECTPTRLABELPROC) (const void *ptr, GLsizei length, const GLchar *label); -typedef void (GL_APIENTRYP PFNGLGETOBJECTPTRLABELPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); -typedef void (GL_APIENTRYP PFNGLGETPOINTERVPROC) (GLenum pname, void **params); -#endif - -#ifndef GL_KHR_texture_compression_astc_ldr -#define GL_KHR_texture_compression_astc_ldr 1 -#endif - - -/*------------------------------------------------------------------------* - * AMD extension functions - *------------------------------------------------------------------------*/ - -/* GL_AMD_compressed_3DC_texture */ -#ifndef GL_AMD_compressed_3DC_texture -#define GL_AMD_compressed_3DC_texture 1 -#endif - -/* GL_AMD_compressed_ATC_texture */ -#ifndef GL_AMD_compressed_ATC_texture -#define GL_AMD_compressed_ATC_texture 1 -#endif - -/* AMD_performance_monitor */ -#ifndef GL_AMD_performance_monitor -#define GL_AMD_performance_monitor 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups); -GL_APICALL void GL_APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); -GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); -GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); -GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, GLvoid *data); -GL_APICALL void GL_APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors); -GL_APICALL void GL_APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors); -GL_APICALL void GL_APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList); -GL_APICALL void GL_APIENTRY glBeginPerfMonitorAMD (GLuint monitor); -GL_APICALL void GL_APIENTRY glEndPerfMonitorAMD (GLuint monitor); -GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); -#endif -typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups); -typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); -typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); -typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); -typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, GLvoid *data); -typedef void (GL_APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); -typedef void (GL_APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); -typedef void (GL_APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList); -typedef void (GL_APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor); -typedef void (GL_APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor); -typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); -#endif - -/* GL_AMD_program_binary_Z400 */ -#ifndef GL_AMD_program_binary_Z400 -#define GL_AMD_program_binary_Z400 1 -#endif - -/*------------------------------------------------------------------------* - * ANGLE extension functions - *------------------------------------------------------------------------*/ - -/* GL_ANGLE_depth_texture */ -#ifndef GL_ANGLE_depth_texture -#define GL_ANGLE_depth_texture 1 -#endif - -/* GL_ANGLE_framebuffer_blit */ -#ifndef GL_ANGLE_framebuffer_blit -#define GL_ANGLE_framebuffer_blit 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glBlitFramebufferANGLE (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -#endif -typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERANGLEPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -#endif - -/* GL_ANGLE_framebuffer_multisample */ -#ifndef GL_ANGLE_framebuffer_multisample -#define GL_ANGLE_framebuffer_multisample 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleANGLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -#endif -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEANGLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -#endif - -#ifndef GL_ANGLE_instanced_arrays -#define GL_ANGLE_instanced_arrays 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glDrawArraysInstancedANGLE (GLenum mode, GLint first, GLsizei count, GLsizei primcount); -GL_APICALL void GL_APIENTRY glDrawElementsInstancedANGLE (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); -GL_APICALL void GL_APIENTRY glVertexAttribDivisorANGLE (GLuint index, GLuint divisor); -#endif -typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDANGLEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); -typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDANGLEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORANGLEPROC) (GLuint index, GLuint divisor); -#endif - -/* GL_ANGLE_pack_reverse_row_order */ -#ifndef GL_ANGLE_pack_reverse_row_order -#define GL_ANGLE_pack_reverse_row_order 1 -#endif - -/* GL_ANGLE_program_binary */ -#ifndef GL_ANGLE_program_binary -#define GL_ANGLE_program_binary 1 -#endif - -/* GL_ANGLE_texture_compression_dxt3 */ -#ifndef GL_ANGLE_texture_compression_dxt3 -#define GL_ANGLE_texture_compression_dxt3 1 -#endif - -/* GL_ANGLE_texture_compression_dxt5 */ -#ifndef GL_ANGLE_texture_compression_dxt5 -#define GL_ANGLE_texture_compression_dxt5 1 -#endif - -/* GL_ANGLE_texture_usage */ -#ifndef GL_ANGLE_texture_usage -#define GL_ANGLE_texture_usage 1 -#endif - -#ifndef GL_ANGLE_translated_shader_source -#define GL_ANGLE_translated_shader_source 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glGetTranslatedShaderSourceANGLE (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source); -#endif -typedef void (GL_APIENTRYP PFNGLGETTRANSLATEDSHADERSOURCEANGLEPROC) (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source); -#endif - -/*------------------------------------------------------------------------* - * APPLE extension functions - *------------------------------------------------------------------------*/ - -/* GL_APPLE_copy_texture_levels */ -#ifndef GL_APPLE_copy_texture_levels -#define GL_APPLE_copy_texture_levels 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glCopyTextureLevelsAPPLE (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount); -#endif -typedef void (GL_APIENTRYP PFNGLCOPYTEXTURELEVELSAPPLEPROC) (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount); -#endif - -/* GL_APPLE_framebuffer_multisample */ -#ifndef GL_APPLE_framebuffer_multisample -#define GL_APPLE_framebuffer_multisample 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum, GLsizei, GLenum, GLsizei, GLsizei); -GL_APICALL void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void); -#endif - -/* GL_APPLE_rgb_422 */ -#ifndef GL_APPLE_rgb_422 -#define GL_APPLE_rgb_422 1 -#endif - -/* GL_APPLE_sync */ -#ifndef GL_APPLE_sync -#define GL_APPLE_sync 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL GLsync GL_APIENTRY glFenceSyncAPPLE (GLenum condition, GLbitfield flags); -GL_APICALL GLboolean GL_APIENTRY glIsSyncAPPLE (GLsync sync); -GL_APICALL void GL_APIENTRY glDeleteSyncAPPLE (GLsync sync); -GL_APICALL GLenum GL_APIENTRY glClientWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout); -GL_APICALL void GL_APIENTRY glWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout); -GL_APICALL void GL_APIENTRY glGetInteger64vAPPLE (GLenum pname, GLint64 *params); -GL_APICALL void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); -#endif -typedef GLsync (GL_APIENTRYP PFNGLFENCESYNCAPPLEPROC) (GLenum condition, GLbitfield flags); -typedef GLboolean (GL_APIENTRYP PFNGLISSYNCAPPLEPROC) (GLsync sync); -typedef void (GL_APIENTRYP PFNGLDELETESYNCAPPLEPROC) (GLsync sync); -typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); -typedef void (GL_APIENTRYP PFNGLWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); -typedef void (GL_APIENTRYP PFNGLGETINTEGER64VAPPLEPROC) (GLenum pname, GLint64 *params); -typedef void (GL_APIENTRYP PFNGLGETSYNCIVAPPLEPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); -#endif - -/* GL_APPLE_texture_format_BGRA8888 */ -#ifndef GL_APPLE_texture_format_BGRA8888 -#define GL_APPLE_texture_format_BGRA8888 1 -#endif - -/* GL_APPLE_texture_max_level */ -#ifndef GL_APPLE_texture_max_level -#define GL_APPLE_texture_max_level 1 -#endif - -/*------------------------------------------------------------------------* - * ARM extension functions - *------------------------------------------------------------------------*/ - -/* GL_ARM_mali_program_binary */ -#ifndef GL_ARM_mali_program_binary -#define GL_ARM_mali_program_binary 1 -#endif - -/* GL_ARM_mali_shader_binary */ -#ifndef GL_ARM_mali_shader_binary -#define GL_ARM_mali_shader_binary 1 -#endif - -/* GL_ARM_rgba8 */ -#ifndef GL_ARM_rgba8 -#define GL_ARM_rgba8 1 -#endif - -/*------------------------------------------------------------------------* - * EXT extension functions - *------------------------------------------------------------------------*/ - -/* GL_EXT_blend_minmax */ -#ifndef GL_EXT_blend_minmax -#define GL_EXT_blend_minmax 1 -#endif - -/* GL_EXT_color_buffer_half_float */ -#ifndef GL_EXT_color_buffer_half_float -#define GL_EXT_color_buffer_half_float 1 -#endif - -/* GL_EXT_debug_label */ -#ifndef GL_EXT_debug_label -#define GL_EXT_debug_label 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label); -GL_APICALL void GL_APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label); -#endif -typedef void (GL_APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label); -typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label); -#endif - -/* GL_EXT_debug_marker */ -#ifndef GL_EXT_debug_marker -#define GL_EXT_debug_marker 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker); -GL_APICALL void GL_APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker); -GL_APICALL void GL_APIENTRY glPopGroupMarkerEXT (void); -#endif -typedef void (GL_APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker); -typedef void (GL_APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker); -typedef void (GL_APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void); -#endif - -/* GL_EXT_discard_framebuffer */ -#ifndef GL_EXT_discard_framebuffer -#define GL_EXT_discard_framebuffer 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments); -#endif -typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments); -#endif - -/* GL_EXT_map_buffer_range */ -#ifndef GL_EXT_map_buffer_range -#define GL_EXT_map_buffer_range 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void* GL_APIENTRY glMapBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); -GL_APICALL void GL_APIENTRY glFlushMappedBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length); -#endif -typedef void* (GL_APIENTRYP PFNGLMAPBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); -typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length); -#endif - -/* GL_EXT_multisampled_render_to_texture */ -#ifndef GL_EXT_multisampled_render_to_texture -#define GL_EXT_multisampled_render_to_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum, GLsizei, GLenum, GLsizei, GLsizei); -GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum, GLenum, GLenum, GLuint, GLint, GLsizei); -#endif -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); -#endif - -/* GL_EXT_multiview_draw_buffers */ -#ifndef GL_EXT_multiview_draw_buffers -#define GL_EXT_multiview_draw_buffers 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glReadBufferIndexedEXT (GLenum src, GLint index); -GL_APICALL void GL_APIENTRY glDrawBuffersIndexedEXT (GLint n, const GLenum *location, const GLint *indices); -GL_APICALL void GL_APIENTRY glGetIntegeri_vEXT (GLenum target, GLuint index, GLint *data); -#endif -typedef void (GL_APIENTRYP PFNGLREADBUFFERINDEXEDEXTPROC) (GLenum src, GLint index); -typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSINDEXEDEXTPROC) (GLint n, const GLenum *location, const GLint *indices); -typedef void (GL_APIENTRYP PFNGLGETINTEGERI_VEXTPROC) (GLenum target, GLuint index, GLint *data); -#endif - -#ifndef GL_EXT_multi_draw_arrays -#define GL_EXT_multi_draw_arrays 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glMultiDrawArraysEXT (GLenum, const GLint *, const GLsizei *, GLsizei); -GL_APICALL void GL_APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount); -typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); -#endif - -/* GL_EXT_occlusion_query_boolean */ -#ifndef GL_EXT_occlusion_query_boolean -#define GL_EXT_occlusion_query_boolean 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glGenQueriesEXT (GLsizei n, GLuint *ids); -GL_APICALL void GL_APIENTRY glDeleteQueriesEXT (GLsizei n, const GLuint *ids); -GL_APICALL GLboolean GL_APIENTRY glIsQueryEXT (GLuint id); -GL_APICALL void GL_APIENTRY glBeginQueryEXT (GLenum target, GLuint id); -GL_APICALL void GL_APIENTRY glEndQueryEXT (GLenum target); -GL_APICALL void GL_APIENTRY glGetQueryivEXT (GLenum target, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetQueryObjectuivEXT (GLuint id, GLenum pname, GLuint *params); -#endif -typedef void (GL_APIENTRYP PFNGLGENQUERIESEXTPROC) (GLsizei n, GLuint *ids); -typedef void (GL_APIENTRYP PFNGLDELETEQUERIESEXTPROC) (GLsizei n, const GLuint *ids); -typedef GLboolean (GL_APIENTRYP PFNGLISQUERYEXTPROC) (GLuint id); -typedef void (GL_APIENTRYP PFNGLBEGINQUERYEXTPROC) (GLenum target, GLuint id); -typedef void (GL_APIENTRYP PFNGLENDQUERYEXTPROC) (GLenum target); -typedef void (GL_APIENTRYP PFNGLGETQUERYIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVEXTPROC) (GLuint id, GLenum pname, GLuint *params); -#endif - -/* GL_EXT_read_format_bgra */ -#ifndef GL_EXT_read_format_bgra -#define GL_EXT_read_format_bgra 1 -#endif - -/* GL_EXT_robustness */ -#ifndef GL_EXT_robustness -#define GL_EXT_robustness 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusEXT (void); -GL_APICALL void GL_APIENTRY glReadnPixelsEXT (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); -GL_APICALL void GL_APIENTRY glGetnUniformfvEXT (GLuint program, GLint location, GLsizei bufSize, float *params); -GL_APICALL void GL_APIENTRY glGetnUniformivEXT (GLuint program, GLint location, GLsizei bufSize, GLint *params); -#endif -typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSEXTPROC) (void); -typedef void (GL_APIENTRYP PFNGLREADNPIXELSEXTPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); -typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, float *params); -typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params); -#endif - -/* GL_EXT_separate_shader_objects */ -#ifndef GL_EXT_separate_shader_objects -#define GL_EXT_separate_shader_objects 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glUseProgramStagesEXT (GLuint pipeline, GLbitfield stages, GLuint program); -GL_APICALL void GL_APIENTRY glActiveShaderProgramEXT (GLuint pipeline, GLuint program); -GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramvEXT (GLenum type, GLsizei count, const GLchar **strings); -GL_APICALL void GL_APIENTRY glBindProgramPipelineEXT (GLuint pipeline); -GL_APICALL void GL_APIENTRY glDeleteProgramPipelinesEXT (GLsizei n, const GLuint *pipelines); -GL_APICALL void GL_APIENTRY glGenProgramPipelinesEXT (GLsizei n, GLuint *pipelines); -GL_APICALL GLboolean GL_APIENTRY glIsProgramPipelineEXT (GLuint pipeline); -GL_APICALL void GL_APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value); -GL_APICALL void GL_APIENTRY glGetProgramPipelineivEXT (GLuint pipeline, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint x); -GL_APICALL void GL_APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint x, GLint y); -GL_APICALL void GL_APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint x, GLint y, GLint z); -GL_APICALL void GL_APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w); -GL_APICALL void GL_APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat x); -GL_APICALL void GL_APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat x, GLfloat y); -GL_APICALL void GL_APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z); -GL_APICALL void GL_APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GL_APICALL void GL_APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glValidateProgramPipelineEXT (GLuint pipeline); -GL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLogEXT (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -#endif -typedef void (GL_APIENTRYP PFNGLUSEPROGRAMSTAGESEXTPROC) (GLuint pipeline, GLbitfield stages, GLuint program); -typedef void (GL_APIENTRYP PFNGLACTIVESHADERPROGRAMEXTPROC) (GLuint pipeline, GLuint program); -typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROGRAMVEXTPROC) (GLenum type, GLsizei count, const GLchar **strings); -typedef void (GL_APIENTRYP PFNGLBINDPROGRAMPIPELINEEXTPROC) (GLuint pipeline); -typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPIPELINESEXTPROC) (GLsizei n, const GLuint *pipelines); -typedef void (GL_APIENTRYP PFNGLGENPROGRAMPIPELINESEXTPROC) (GLsizei n, GLuint *pipelines); -typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPIPELINEEXTPROC) (GLuint pipeline); -typedef void (GL_APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value); -typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEIVEXTPROC) (GLuint pipeline, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint x); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint x, GLint y); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat x); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEEXTPROC) (GLuint pipeline); -typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGEXTPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -#endif - -/* GL_EXT_shader_framebuffer_fetch */ -#ifndef GL_EXT_shader_framebuffer_fetch -#define GL_EXT_shader_framebuffer_fetch 1 -#endif - -/* GL_EXT_shader_texture_lod */ -#ifndef GL_EXT_shader_texture_lod -#define GL_EXT_shader_texture_lod 1 -#endif - -/* GL_EXT_shadow_samplers */ -#ifndef GL_EXT_shadow_samplers -#define GL_EXT_shadow_samplers 1 -#endif - -/* GL_EXT_sRGB */ -#ifndef GL_EXT_sRGB -#define GL_EXT_sRGB 1 -#endif - -/* GL_EXT_texture_compression_dxt1 */ -#ifndef GL_EXT_texture_compression_dxt1 -#define GL_EXT_texture_compression_dxt1 1 -#endif - -/* GL_EXT_texture_filter_anisotropic */ -#ifndef GL_EXT_texture_filter_anisotropic -#define GL_EXT_texture_filter_anisotropic 1 -#endif - -/* GL_EXT_texture_format_BGRA8888 */ -#ifndef GL_EXT_texture_format_BGRA8888 -#define GL_EXT_texture_format_BGRA8888 1 -#endif - -/* GL_EXT_texture_rg */ -#ifndef GL_EXT_texture_rg -#define GL_EXT_texture_rg 1 -#endif - -/* GL_EXT_texture_storage */ -#ifndef GL_EXT_texture_storage -#define GL_EXT_texture_storage 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glTexStorage1DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -GL_APICALL void GL_APIENTRY glTexStorage2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glTexStorage3DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -GL_APICALL void GL_APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -GL_APICALL void GL_APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -#endif -typedef void (GL_APIENTRYP PFNGLTEXSTORAGE1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -#endif - -/* GL_EXT_texture_type_2_10_10_10_REV */ -#ifndef GL_EXT_texture_type_2_10_10_10_REV -#define GL_EXT_texture_type_2_10_10_10_REV 1 -#endif - -/* GL_EXT_unpack_subimage */ -#ifndef GL_EXT_unpack_subimage -#define GL_EXT_unpack_subimage 1 -#endif - -/*------------------------------------------------------------------------* - * DMP extension functions - *------------------------------------------------------------------------*/ - -/* GL_DMP_shader_binary */ -#ifndef GL_DMP_shader_binary -#define GL_DMP_shader_binary 1 -#endif - -/*------------------------------------------------------------------------* - * FJ extension functions - *------------------------------------------------------------------------*/ - -/* GL_FJ_shader_binary_GCCSO */ -#ifndef GL_FJ_shader_binary_GCCSO -#define GL_FJ_shader_binary_GCCSO 1 -#endif - -/*------------------------------------------------------------------------* - * IMG extension functions - *------------------------------------------------------------------------*/ - -/* GL_IMG_program_binary */ -#ifndef GL_IMG_program_binary -#define GL_IMG_program_binary 1 -#endif - -/* GL_IMG_read_format */ -#ifndef GL_IMG_read_format -#define GL_IMG_read_format 1 -#endif - -/* GL_IMG_shader_binary */ -#ifndef GL_IMG_shader_binary -#define GL_IMG_shader_binary 1 -#endif - -/* GL_IMG_texture_compression_pvrtc */ -#ifndef GL_IMG_texture_compression_pvrtc -#define GL_IMG_texture_compression_pvrtc 1 -#endif - -/* GL_IMG_texture_compression_pvrtc2 */ -#ifndef GL_IMG_texture_compression_pvrtc2 -#define GL_IMG_texture_compression_pvrtc2 1 -#endif - -/* GL_IMG_multisampled_render_to_texture */ -#ifndef GL_IMG_multisampled_render_to_texture -#define GL_IMG_multisampled_render_to_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum, GLsizei, GLenum, GLsizei, GLsizei); -GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum, GLenum, GLenum, GLuint, GLint, GLsizei); -#endif -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); -#endif - -/*------------------------------------------------------------------------* - * NV extension functions - *------------------------------------------------------------------------*/ - -/* GL_NV_coverage_sample */ -#ifndef GL_NV_coverage_sample -#define GL_NV_coverage_sample 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glCoverageMaskNV (GLboolean mask); -GL_APICALL void GL_APIENTRY glCoverageOperationNV (GLenum operation); -#endif -typedef void (GL_APIENTRYP PFNGLCOVERAGEMASKNVPROC) (GLboolean mask); -typedef void (GL_APIENTRYP PFNGLCOVERAGEOPERATIONNVPROC) (GLenum operation); -#endif - -/* GL_NV_depth_nonlinear */ -#ifndef GL_NV_depth_nonlinear -#define GL_NV_depth_nonlinear 1 -#endif - -/* GL_NV_draw_buffers */ -#ifndef GL_NV_draw_buffers -#define GL_NV_draw_buffers 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glDrawBuffersNV (GLsizei n, const GLenum *bufs); -#endif -typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSNVPROC) (GLsizei n, const GLenum *bufs); -#endif - -/* GL_EXT_draw_buffers */ -#ifndef GL_EXT_draw_buffers -#define GL_EXT_draw_buffers 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glDrawBuffersEXT (GLsizei n, const GLenum *bufs); -#endif -typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSEXTPROC) (GLsizei n, const GLenum *bufs); -#endif - -/* GL_NV_draw_instanced */ -#ifndef GL_NV_draw_instanced -#define GL_NV_draw_instanced 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glDrawArraysInstancedNV (GLenum mode, GLint first, GLsizei count, GLsizei primcount); -GL_APICALL void GL_APIENTRY glDrawElementsInstancedNV (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); -#endif -typedef void (GL_APIENTRYP PFNDRAWARRAYSINSTANCEDNVPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); -typedef void (GL_APIENTRYP PFNDRAWELEMENTSINSTANCEDNVPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); -#endif - -/* GL_NV_fbo_color_attachments */ -#ifndef GL_NV_fbo_color_attachments -#define GL_NV_fbo_color_attachments 1 -#endif - -/* GL_NV_fence */ -#ifndef GL_NV_fence -#define GL_NV_fence 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glDeleteFencesNV (GLsizei, const GLuint *); -GL_APICALL void GL_APIENTRY glGenFencesNV (GLsizei, GLuint *); -GL_APICALL GLboolean GL_APIENTRY glIsFenceNV (GLuint); -GL_APICALL GLboolean GL_APIENTRY glTestFenceNV (GLuint); -GL_APICALL void GL_APIENTRY glGetFenceivNV (GLuint, GLenum, GLint *); -GL_APICALL void GL_APIENTRY glFinishFenceNV (GLuint); -GL_APICALL void GL_APIENTRY glSetFenceNV (GLuint, GLenum); -#endif -typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences); -typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences); -typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence); -typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence); -typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence); -typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); -#endif - -/* GL_NV_framebuffer_blit */ -#ifndef GL_NV_framebuffer_blit -#define GL_NV_framebuffer_blit 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glBlitFramebufferNV (int srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -#endif -typedef void (GL_APIENTRYP PFNBLITFRAMEBUFFERNVPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -#endif - -/* GL_NV_framebuffer_multisample */ -#ifndef GL_NV_framebuffer_multisample -#define GL_NV_framebuffer_multisample 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleNV ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -#endif -typedef void (GL_APIENTRYP PFNRENDERBUFFERSTORAGEMULTISAMPLENVPROC) ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -#endif - -/* GL_NV_generate_mipmap_sRGB */ -#ifndef GL_NV_generate_mipmap_sRGB -#define GL_NV_generate_mipmap_sRGB 1 -#endif - -/* GL_NV_instanced_arrays */ -#ifndef GL_NV_instanced_arrays -#define GL_NV_instanced_arrays 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glVertexAttribDivisorNV (GLuint index, GLuint divisor); -#endif -typedef void (GL_APIENTRYP PFNVERTEXATTRIBDIVISORNVPROC) (GLuint index, GLuint divisor); -#endif - -/* GL_NV_read_buffer */ -#ifndef GL_NV_read_buffer -#define GL_NV_read_buffer 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glReadBufferNV (GLenum mode); -#endif -typedef void (GL_APIENTRYP PFNGLREADBUFFERNVPROC) (GLenum mode); -#endif - -/* GL_NV_read_buffer_front */ -#ifndef GL_NV_read_buffer_front -#define GL_NV_read_buffer_front 1 -#endif - -/* GL_NV_read_depth */ -#ifndef GL_NV_read_depth -#define GL_NV_read_depth 1 -#endif - -/* GL_NV_read_depth_stencil */ -#ifndef GL_NV_read_depth_stencil -#define GL_NV_read_depth_stencil 1 -#endif - -/* GL_NV_read_stencil */ -#ifndef GL_NV_read_stencil -#define GL_NV_read_stencil 1 -#endif - -/* GL_NV_shadow_samplers_array */ -#ifndef GL_NV_shadow_samplers_array -#define GL_NV_shadow_samplers_array 1 -#endif - -/* GL_NV_shadow_samplers_cube */ -#ifndef GL_NV_shadow_samplers_cube -#define GL_NV_shadow_samplers_cube 1 -#endif - -/* GL_NV_sRGB_formats */ -#ifndef GL_NV_sRGB_formats -#define GL_NV_sRGB_formats 1 -#endif - -/* GL_NV_texture_border_clamp */ -#ifndef GL_NV_texture_border_clamp -#define GL_NV_texture_border_clamp 1 -#endif - -/* GL_NV_texture_compression_s3tc_update */ -#ifndef GL_NV_texture_compression_s3tc_update -#define GL_NV_texture_compression_s3tc_update 1 -#endif - -/* GL_NV_texture_npot_2D_mipmap */ -#ifndef GL_NV_texture_npot_2D_mipmap -#define GL_NV_texture_npot_2D_mipmap 1 -#endif - -/*------------------------------------------------------------------------* - * QCOM extension functions - *------------------------------------------------------------------------*/ - -/* GL_QCOM_alpha_test */ -#ifndef GL_QCOM_alpha_test -#define GL_QCOM_alpha_test 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glAlphaFuncQCOM (GLenum func, GLclampf ref); -#endif -typedef void (GL_APIENTRYP PFNGLALPHAFUNCQCOMPROC) (GLenum func, GLclampf ref); -#endif - -/* GL_QCOM_binning_control */ -#ifndef GL_QCOM_binning_control -#define GL_QCOM_binning_control 1 -#endif - -/* GL_QCOM_driver_control */ -#ifndef GL_QCOM_driver_control -#define GL_QCOM_driver_control 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls); -GL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString); -GL_APICALL void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl); -GL_APICALL void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl); -#endif -typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls); -typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString); -typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl); -typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl); -#endif - -/* GL_QCOM_extended_get */ -#ifndef GL_QCOM_extended_get -#define GL_QCOM_extended_get 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures); -GL_APICALL void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers); -GL_APICALL void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers); -GL_APICALL void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers); -GL_APICALL void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param); -GL_APICALL void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels); -GL_APICALL void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, GLvoid **params); -#endif -typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures); -typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers); -typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers); -typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers); -typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param); -typedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels); -typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, GLvoid **params); -#endif - -/* GL_QCOM_extended_get2 */ -#ifndef GL_QCOM_extended_get2 -#define GL_QCOM_extended_get2 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders); -GL_APICALL void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms); -GL_APICALL GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program); -GL_APICALL void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length); -#endif -typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders); -typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms); -typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program); -typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length); -#endif - -/* GL_QCOM_perfmon_global_mode */ -#ifndef GL_QCOM_perfmon_global_mode -#define GL_QCOM_perfmon_global_mode 1 -#endif - -/* GL_QCOM_writeonly_rendering */ -#ifndef GL_QCOM_writeonly_rendering -#define GL_QCOM_writeonly_rendering 1 -#endif - -/* GL_QCOM_tiled_rendering */ -#ifndef GL_QCOM_tiled_rendering -#define GL_QCOM_tiled_rendering 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask); -GL_APICALL void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask); -#endif -typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask); -typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask); -#endif - -/*------------------------------------------------------------------------* - * VIV extension tokens - *------------------------------------------------------------------------*/ - -/* GL_VIV_shader_binary */ -#ifndef GL_VIV_shader_binary -#define GL_VIV_shader_binary 1 -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* __gl2ext_h_ */ diff --git a/platform/winrt/include/GLES2/gl2platform.h b/platform/winrt/include/GLES2/gl2platform.h deleted file mode 100644 index c9fa3c4d64b..00000000000 --- a/platform/winrt/include/GLES2/gl2platform.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef __gl2platform_h_ -#define __gl2platform_h_ - -/* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */ - -/* - * This document is licensed under the SGI Free Software B License Version - * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . - */ - -/* Platform-specific types and definitions for OpenGL ES 2.X gl2.h - * - * Adopters may modify khrplatform.h and this file to suit their platform. - * You are encouraged to submit all modifications to the Khronos group so that - * they can be included in future versions of this file. Please submit changes - * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) - * by filing a bug against product "OpenGL-ES" component "Registry". - */ - -#include - -#ifndef GL_APICALL -#define GL_APICALL KHRONOS_APICALL -#endif - -#ifndef GL_APIENTRY -#define GL_APIENTRY KHRONOS_APIENTRY -#endif - -#endif /* __gl2platform_h_ */ diff --git a/platform/winrt/include/GLES3/gl3.h b/platform/winrt/include/GLES3/gl3.h deleted file mode 100644 index b7e91e68810..00000000000 --- a/platform/winrt/include/GLES3/gl3.h +++ /dev/null @@ -1,1061 +0,0 @@ -#ifndef __gl3_h_ -#define __gl3_h_ - -/* - * gl3.h last updated on $Date: 2013-02-12 14:37:24 -0800 (Tue, 12 Feb 2013) $ - */ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Copyright (c) 2007-2013 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. -*/ - -/*------------------------------------------------------------------------- - * Data type definitions - *-----------------------------------------------------------------------*/ - -/* OpenGL ES 2.0 */ - -typedef void GLvoid; -typedef char GLchar; -typedef unsigned int GLenum; -typedef unsigned char GLboolean; -typedef unsigned int GLbitfield; -typedef khronos_int8_t GLbyte; -typedef short GLshort; -typedef int GLint; -typedef int GLsizei; -typedef khronos_uint8_t GLubyte; -typedef unsigned short GLushort; -typedef unsigned int GLuint; -typedef khronos_float_t GLfloat; -typedef khronos_float_t GLclampf; -typedef khronos_int32_t GLfixed; -typedef khronos_intptr_t GLintptr; -typedef khronos_ssize_t GLsizeiptr; - -/* OpenGL ES 3.0 */ - -typedef unsigned short GLhalf; -typedef khronos_int64_t GLint64; -typedef khronos_uint64_t GLuint64; -typedef struct __GLsync *GLsync; - -/*------------------------------------------------------------------------- - * Token definitions - *-----------------------------------------------------------------------*/ - -/* OpenGL ES core versions */ -#define GL_ES_VERSION_3_0 1 -#define GL_ES_VERSION_2_0 1 - -/* OpenGL ES 2.0 */ - -/* ClearBufferMask */ -#define GL_DEPTH_BUFFER_BIT 0x00000100 -#define GL_STENCIL_BUFFER_BIT 0x00000400 -#define GL_COLOR_BUFFER_BIT 0x00004000 - -/* Boolean */ -#define GL_FALSE 0 -#define GL_TRUE 1 - -/* BeginMode */ -#define GL_POINTS 0x0000 -#define GL_LINES 0x0001 -#define GL_LINE_LOOP 0x0002 -#define GL_LINE_STRIP 0x0003 -#define GL_TRIANGLES 0x0004 -#define GL_TRIANGLE_STRIP 0x0005 -#define GL_TRIANGLE_FAN 0x0006 - -/* BlendingFactorDest */ -#define GL_ZERO 0 -#define GL_ONE 1 -#define GL_SRC_COLOR 0x0300 -#define GL_ONE_MINUS_SRC_COLOR 0x0301 -#define GL_SRC_ALPHA 0x0302 -#define GL_ONE_MINUS_SRC_ALPHA 0x0303 -#define GL_DST_ALPHA 0x0304 -#define GL_ONE_MINUS_DST_ALPHA 0x0305 - -/* BlendingFactorSrc */ -/* GL_ZERO */ -/* GL_ONE */ -#define GL_DST_COLOR 0x0306 -#define GL_ONE_MINUS_DST_COLOR 0x0307 -#define GL_SRC_ALPHA_SATURATE 0x0308 -/* GL_SRC_ALPHA */ -/* GL_ONE_MINUS_SRC_ALPHA */ -/* GL_DST_ALPHA */ -/* GL_ONE_MINUS_DST_ALPHA */ - -/* BlendEquationSeparate */ -#define GL_FUNC_ADD 0x8006 -#define GL_BLEND_EQUATION 0x8009 -#define GL_BLEND_EQUATION_RGB 0x8009 /* same as BLEND_EQUATION */ -#define GL_BLEND_EQUATION_ALPHA 0x883D - -/* BlendSubtract */ -#define GL_FUNC_SUBTRACT 0x800A -#define GL_FUNC_REVERSE_SUBTRACT 0x800B - -/* Separate Blend Functions */ -#define GL_BLEND_DST_RGB 0x80C8 -#define GL_BLEND_SRC_RGB 0x80C9 -#define GL_BLEND_DST_ALPHA 0x80CA -#define GL_BLEND_SRC_ALPHA 0x80CB -#define GL_CONSTANT_COLOR 0x8001 -#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 -#define GL_CONSTANT_ALPHA 0x8003 -#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 -#define GL_BLEND_COLOR 0x8005 - -/* Buffer Objects */ -#define GL_ARRAY_BUFFER 0x8892 -#define GL_ELEMENT_ARRAY_BUFFER 0x8893 -#define GL_ARRAY_BUFFER_BINDING 0x8894 -#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 - -#define GL_STREAM_DRAW 0x88E0 -#define GL_STATIC_DRAW 0x88E4 -#define GL_DYNAMIC_DRAW 0x88E8 - -#define GL_BUFFER_SIZE 0x8764 -#define GL_BUFFER_USAGE 0x8765 - -#define GL_CURRENT_VERTEX_ATTRIB 0x8626 - -/* CullFaceMode */ -#define GL_FRONT 0x0404 -#define GL_BACK 0x0405 -#define GL_FRONT_AND_BACK 0x0408 - -/* DepthFunction */ -/* GL_NEVER */ -/* GL_LESS */ -/* GL_EQUAL */ -/* GL_LEQUAL */ -/* GL_GREATER */ -/* GL_NOTEQUAL */ -/* GL_GEQUAL */ -/* GL_ALWAYS */ - -/* EnableCap */ -#define GL_TEXTURE_2D 0x0DE1 -#define GL_CULL_FACE 0x0B44 -#define GL_BLEND 0x0BE2 -#define GL_DITHER 0x0BD0 -#define GL_STENCIL_TEST 0x0B90 -#define GL_DEPTH_TEST 0x0B71 -#define GL_SCISSOR_TEST 0x0C11 -#define GL_POLYGON_OFFSET_FILL 0x8037 -#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E -#define GL_SAMPLE_COVERAGE 0x80A0 - -/* ErrorCode */ -#define GL_NO_ERROR 0 -#define GL_INVALID_ENUM 0x0500 -#define GL_INVALID_VALUE 0x0501 -#define GL_INVALID_OPERATION 0x0502 -#define GL_OUT_OF_MEMORY 0x0505 - -/* FrontFaceDirection */ -#define GL_CW 0x0900 -#define GL_CCW 0x0901 - -/* GetPName */ -#define GL_LINE_WIDTH 0x0B21 -#define GL_ALIASED_POINT_SIZE_RANGE 0x846D -#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E -#define GL_CULL_FACE_MODE 0x0B45 -#define GL_FRONT_FACE 0x0B46 -#define GL_DEPTH_RANGE 0x0B70 -#define GL_DEPTH_WRITEMASK 0x0B72 -#define GL_DEPTH_CLEAR_VALUE 0x0B73 -#define GL_DEPTH_FUNC 0x0B74 -#define GL_STENCIL_CLEAR_VALUE 0x0B91 -#define GL_STENCIL_FUNC 0x0B92 -#define GL_STENCIL_FAIL 0x0B94 -#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 -#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 -#define GL_STENCIL_REF 0x0B97 -#define GL_STENCIL_VALUE_MASK 0x0B93 -#define GL_STENCIL_WRITEMASK 0x0B98 -#define GL_STENCIL_BACK_FUNC 0x8800 -#define GL_STENCIL_BACK_FAIL 0x8801 -#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 -#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 -#define GL_STENCIL_BACK_REF 0x8CA3 -#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 -#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 -#define GL_VIEWPORT 0x0BA2 -#define GL_SCISSOR_BOX 0x0C10 -/* GL_SCISSOR_TEST */ -#define GL_COLOR_CLEAR_VALUE 0x0C22 -#define GL_COLOR_WRITEMASK 0x0C23 -#define GL_UNPACK_ALIGNMENT 0x0CF5 -#define GL_PACK_ALIGNMENT 0x0D05 -#define GL_MAX_TEXTURE_SIZE 0x0D33 -#define GL_MAX_VIEWPORT_DIMS 0x0D3A -#define GL_SUBPIXEL_BITS 0x0D50 -#define GL_RED_BITS 0x0D52 -#define GL_GREEN_BITS 0x0D53 -#define GL_BLUE_BITS 0x0D54 -#define GL_ALPHA_BITS 0x0D55 -#define GL_DEPTH_BITS 0x0D56 -#define GL_STENCIL_BITS 0x0D57 -#define GL_POLYGON_OFFSET_UNITS 0x2A00 -/* GL_POLYGON_OFFSET_FILL */ -#define GL_POLYGON_OFFSET_FACTOR 0x8038 -#define GL_TEXTURE_BINDING_2D 0x8069 -#define GL_SAMPLE_BUFFERS 0x80A8 -#define GL_SAMPLES 0x80A9 -#define GL_SAMPLE_COVERAGE_VALUE 0x80AA -#define GL_SAMPLE_COVERAGE_INVERT 0x80AB - -/* GetTextureParameter */ -/* GL_TEXTURE_MAG_FILTER */ -/* GL_TEXTURE_MIN_FILTER */ -/* GL_TEXTURE_WRAP_S */ -/* GL_TEXTURE_WRAP_T */ - -#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 -#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 - -/* HintMode */ -#define GL_DONT_CARE 0x1100 -#define GL_FASTEST 0x1101 -#define GL_NICEST 0x1102 - -/* HintTarget */ -#define GL_GENERATE_MIPMAP_HINT 0x8192 - -/* DataType */ -#define GL_BYTE 0x1400 -#define GL_UNSIGNED_BYTE 0x1401 -#define GL_SHORT 0x1402 -#define GL_UNSIGNED_SHORT 0x1403 -#define GL_INT 0x1404 -#define GL_UNSIGNED_INT 0x1405 -#define GL_FLOAT 0x1406 -#define GL_FIXED 0x140C - -/* PixelFormat */ -#define GL_DEPTH_COMPONENT 0x1902 -#define GL_ALPHA 0x1906 -#define GL_RGB 0x1907 -#define GL_RGBA 0x1908 -#define GL_LUMINANCE 0x1909 -#define GL_LUMINANCE_ALPHA 0x190A - -/* PixelType */ -/* GL_UNSIGNED_BYTE */ -#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 -#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 -#define GL_UNSIGNED_SHORT_5_6_5 0x8363 - -/* Shaders */ -#define GL_FRAGMENT_SHADER 0x8B30 -#define GL_VERTEX_SHADER 0x8B31 -#define GL_MAX_VERTEX_ATTRIBS 0x8869 -#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB -#define GL_MAX_VARYING_VECTORS 0x8DFC -#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D -#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C -#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 -#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD -#define GL_SHADER_TYPE 0x8B4F -#define GL_DELETE_STATUS 0x8B80 -#define GL_LINK_STATUS 0x8B82 -#define GL_VALIDATE_STATUS 0x8B83 -#define GL_ATTACHED_SHADERS 0x8B85 -#define GL_ACTIVE_UNIFORMS 0x8B86 -#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 -#define GL_ACTIVE_ATTRIBUTES 0x8B89 -#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A -#define GL_SHADING_LANGUAGE_VERSION 0x8B8C -#define GL_CURRENT_PROGRAM 0x8B8D - -/* StencilFunction */ -#define GL_NEVER 0x0200 -#define GL_LESS 0x0201 -#define GL_EQUAL 0x0202 -#define GL_LEQUAL 0x0203 -#define GL_GREATER 0x0204 -#define GL_NOTEQUAL 0x0205 -#define GL_GEQUAL 0x0206 -#define GL_ALWAYS 0x0207 - -/* StencilOp */ -/* GL_ZERO */ -#define GL_KEEP 0x1E00 -#define GL_REPLACE 0x1E01 -#define GL_INCR 0x1E02 -#define GL_DECR 0x1E03 -#define GL_INVERT 0x150A -#define GL_INCR_WRAP 0x8507 -#define GL_DECR_WRAP 0x8508 - -/* StringName */ -#define GL_VENDOR 0x1F00 -#define GL_RENDERER 0x1F01 -#define GL_VERSION 0x1F02 -#define GL_EXTENSIONS 0x1F03 - -/* TextureMagFilter */ -#define GL_NEAREST 0x2600 -#define GL_LINEAR 0x2601 - -/* TextureMinFilter */ -/* GL_NEAREST */ -/* GL_LINEAR */ -#define GL_NEAREST_MIPMAP_NEAREST 0x2700 -#define GL_LINEAR_MIPMAP_NEAREST 0x2701 -#define GL_NEAREST_MIPMAP_LINEAR 0x2702 -#define GL_LINEAR_MIPMAP_LINEAR 0x2703 - -/* TextureParameterName */ -#define GL_TEXTURE_MAG_FILTER 0x2800 -#define GL_TEXTURE_MIN_FILTER 0x2801 -#define GL_TEXTURE_WRAP_S 0x2802 -#define GL_TEXTURE_WRAP_T 0x2803 - -/* TextureTarget */ -/* GL_TEXTURE_2D */ -#define GL_TEXTURE 0x1702 - -#define GL_TEXTURE_CUBE_MAP 0x8513 -#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A -#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C - -/* TextureUnit */ -#define GL_TEXTURE0 0x84C0 -#define GL_TEXTURE1 0x84C1 -#define GL_TEXTURE2 0x84C2 -#define GL_TEXTURE3 0x84C3 -#define GL_TEXTURE4 0x84C4 -#define GL_TEXTURE5 0x84C5 -#define GL_TEXTURE6 0x84C6 -#define GL_TEXTURE7 0x84C7 -#define GL_TEXTURE8 0x84C8 -#define GL_TEXTURE9 0x84C9 -#define GL_TEXTURE10 0x84CA -#define GL_TEXTURE11 0x84CB -#define GL_TEXTURE12 0x84CC -#define GL_TEXTURE13 0x84CD -#define GL_TEXTURE14 0x84CE -#define GL_TEXTURE15 0x84CF -#define GL_TEXTURE16 0x84D0 -#define GL_TEXTURE17 0x84D1 -#define GL_TEXTURE18 0x84D2 -#define GL_TEXTURE19 0x84D3 -#define GL_TEXTURE20 0x84D4 -#define GL_TEXTURE21 0x84D5 -#define GL_TEXTURE22 0x84D6 -#define GL_TEXTURE23 0x84D7 -#define GL_TEXTURE24 0x84D8 -#define GL_TEXTURE25 0x84D9 -#define GL_TEXTURE26 0x84DA -#define GL_TEXTURE27 0x84DB -#define GL_TEXTURE28 0x84DC -#define GL_TEXTURE29 0x84DD -#define GL_TEXTURE30 0x84DE -#define GL_TEXTURE31 0x84DF -#define GL_ACTIVE_TEXTURE 0x84E0 - -/* TextureWrapMode */ -#define GL_REPEAT 0x2901 -#define GL_CLAMP_TO_EDGE 0x812F -#define GL_MIRRORED_REPEAT 0x8370 - -/* Uniform Types */ -#define GL_FLOAT_VEC2 0x8B50 -#define GL_FLOAT_VEC3 0x8B51 -#define GL_FLOAT_VEC4 0x8B52 -#define GL_INT_VEC2 0x8B53 -#define GL_INT_VEC3 0x8B54 -#define GL_INT_VEC4 0x8B55 -#define GL_BOOL 0x8B56 -#define GL_BOOL_VEC2 0x8B57 -#define GL_BOOL_VEC3 0x8B58 -#define GL_BOOL_VEC4 0x8B59 -#define GL_FLOAT_MAT2 0x8B5A -#define GL_FLOAT_MAT3 0x8B5B -#define GL_FLOAT_MAT4 0x8B5C -#define GL_SAMPLER_2D 0x8B5E -#define GL_SAMPLER_CUBE 0x8B60 - -/* Vertex Arrays */ -#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 -#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 -#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 -#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 -#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A -#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 -#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F - -/* Read Format */ -#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A -#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B - -/* Shader Source */ -#define GL_COMPILE_STATUS 0x8B81 -#define GL_INFO_LOG_LENGTH 0x8B84 -#define GL_SHADER_SOURCE_LENGTH 0x8B88 -#define GL_SHADER_COMPILER 0x8DFA - -/* Shader Binary */ -#define GL_SHADER_BINARY_FORMATS 0x8DF8 -#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 - -/* Shader Precision-Specified Types */ -#define GL_LOW_FLOAT 0x8DF0 -#define GL_MEDIUM_FLOAT 0x8DF1 -#define GL_HIGH_FLOAT 0x8DF2 -#define GL_LOW_INT 0x8DF3 -#define GL_MEDIUM_INT 0x8DF4 -#define GL_HIGH_INT 0x8DF5 - -/* Framebuffer Object. */ -#define GL_FRAMEBUFFER 0x8D40 -#define GL_RENDERBUFFER 0x8D41 - -#define GL_RGBA4 0x8056 -#define GL_RGB5_A1 0x8057 -#define GL_RGB565 0x8D62 -#define GL_DEPTH_COMPONENT16 0x81A5 -#define GL_STENCIL_INDEX8 0x8D48 - -#define GL_RENDERBUFFER_WIDTH 0x8D42 -#define GL_RENDERBUFFER_HEIGHT 0x8D43 -#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 -#define GL_RENDERBUFFER_RED_SIZE 0x8D50 -#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 -#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 -#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 -#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 -#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 - -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 - -#define GL_COLOR_ATTACHMENT0 0x8CE0 -#define GL_DEPTH_ATTACHMENT 0x8D00 -#define GL_STENCIL_ATTACHMENT 0x8D20 - -#define GL_NONE 0 - -#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 -#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 -#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 -#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9 -#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD - -#define GL_FRAMEBUFFER_BINDING 0x8CA6 -#define GL_RENDERBUFFER_BINDING 0x8CA7 -#define GL_MAX_RENDERBUFFER_SIZE 0x84E8 - -#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 - -/* OpenGL ES 3.0 */ - -#define GL_READ_BUFFER 0x0C02 -#define GL_UNPACK_ROW_LENGTH 0x0CF2 -#define GL_UNPACK_SKIP_ROWS 0x0CF3 -#define GL_UNPACK_SKIP_PIXELS 0x0CF4 -#define GL_PACK_ROW_LENGTH 0x0D02 -#define GL_PACK_SKIP_ROWS 0x0D03 -#define GL_PACK_SKIP_PIXELS 0x0D04 -#define GL_COLOR 0x1800 -#define GL_DEPTH 0x1801 -#define GL_STENCIL 0x1802 -#define GL_RED 0x1903 -#define GL_RGB8 0x8051 -#define GL_RGBA8 0x8058 -#define GL_RGB10_A2 0x8059 -#define GL_TEXTURE_BINDING_3D 0x806A -#define GL_UNPACK_SKIP_IMAGES 0x806D -#define GL_UNPACK_IMAGE_HEIGHT 0x806E -#define GL_TEXTURE_3D 0x806F -#define GL_TEXTURE_WRAP_R 0x8072 -#define GL_MAX_3D_TEXTURE_SIZE 0x8073 -#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 -#define GL_MAX_ELEMENTS_VERTICES 0x80E8 -#define GL_MAX_ELEMENTS_INDICES 0x80E9 -#define GL_TEXTURE_MIN_LOD 0x813A -#define GL_TEXTURE_MAX_LOD 0x813B -#define GL_TEXTURE_BASE_LEVEL 0x813C -#define GL_TEXTURE_MAX_LEVEL 0x813D -#define GL_MIN 0x8007 -#define GL_MAX 0x8008 -#define GL_DEPTH_COMPONENT24 0x81A6 -#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD -#define GL_TEXTURE_COMPARE_MODE 0x884C -#define GL_TEXTURE_COMPARE_FUNC 0x884D -#define GL_CURRENT_QUERY 0x8865 -#define GL_QUERY_RESULT 0x8866 -#define GL_QUERY_RESULT_AVAILABLE 0x8867 -#define GL_BUFFER_MAPPED 0x88BC -#define GL_BUFFER_MAP_POINTER 0x88BD -#define GL_STREAM_READ 0x88E1 -#define GL_STREAM_COPY 0x88E2 -#define GL_STATIC_READ 0x88E5 -#define GL_STATIC_COPY 0x88E6 -#define GL_DYNAMIC_READ 0x88E9 -#define GL_DYNAMIC_COPY 0x88EA -#define GL_MAX_DRAW_BUFFERS 0x8824 -#define GL_DRAW_BUFFER0 0x8825 -#define GL_DRAW_BUFFER1 0x8826 -#define GL_DRAW_BUFFER2 0x8827 -#define GL_DRAW_BUFFER3 0x8828 -#define GL_DRAW_BUFFER4 0x8829 -#define GL_DRAW_BUFFER5 0x882A -#define GL_DRAW_BUFFER6 0x882B -#define GL_DRAW_BUFFER7 0x882C -#define GL_DRAW_BUFFER8 0x882D -#define GL_DRAW_BUFFER9 0x882E -#define GL_DRAW_BUFFER10 0x882F -#define GL_DRAW_BUFFER11 0x8830 -#define GL_DRAW_BUFFER12 0x8831 -#define GL_DRAW_BUFFER13 0x8832 -#define GL_DRAW_BUFFER14 0x8833 -#define GL_DRAW_BUFFER15 0x8834 -#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49 -#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A -#define GL_SAMPLER_3D 0x8B5F -#define GL_SAMPLER_2D_SHADOW 0x8B62 -#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B -#define GL_PIXEL_PACK_BUFFER 0x88EB -#define GL_PIXEL_UNPACK_BUFFER 0x88EC -#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED -#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF -#define GL_FLOAT_MAT2x3 0x8B65 -#define GL_FLOAT_MAT2x4 0x8B66 -#define GL_FLOAT_MAT3x2 0x8B67 -#define GL_FLOAT_MAT3x4 0x8B68 -#define GL_FLOAT_MAT4x2 0x8B69 -#define GL_FLOAT_MAT4x3 0x8B6A -#define GL_SRGB 0x8C40 -#define GL_SRGB8 0x8C41 -#define GL_SRGB8_ALPHA8 0x8C43 -#define GL_COMPARE_REF_TO_TEXTURE 0x884E -#define GL_MAJOR_VERSION 0x821B -#define GL_MINOR_VERSION 0x821C -#define GL_NUM_EXTENSIONS 0x821D -#define GL_RGBA32F 0x8814 -#define GL_RGB32F 0x8815 -#define GL_RGBA16F 0x881A -#define GL_RGB16F 0x881B -#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD -#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF -#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904 -#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905 -#define GL_MAX_VARYING_COMPONENTS 0x8B4B -#define GL_TEXTURE_2D_ARRAY 0x8C1A -#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D -#define GL_R11F_G11F_B10F 0x8C3A -#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B -#define GL_RGB9_E5 0x8C3D -#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E -#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76 -#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80 -#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83 -#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84 -#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85 -#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88 -#define GL_RASTERIZER_DISCARD 0x8C89 -#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B -#define GL_INTERLEAVED_ATTRIBS 0x8C8C -#define GL_SEPARATE_ATTRIBS 0x8C8D -#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E -#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F -#define GL_RGBA32UI 0x8D70 -#define GL_RGB32UI 0x8D71 -#define GL_RGBA16UI 0x8D76 -#define GL_RGB16UI 0x8D77 -#define GL_RGBA8UI 0x8D7C -#define GL_RGB8UI 0x8D7D -#define GL_RGBA32I 0x8D82 -#define GL_RGB32I 0x8D83 -#define GL_RGBA16I 0x8D88 -#define GL_RGB16I 0x8D89 -#define GL_RGBA8I 0x8D8E -#define GL_RGB8I 0x8D8F -#define GL_RED_INTEGER 0x8D94 -#define GL_RGB_INTEGER 0x8D98 -#define GL_RGBA_INTEGER 0x8D99 -#define GL_SAMPLER_2D_ARRAY 0x8DC1 -#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4 -#define GL_SAMPLER_CUBE_SHADOW 0x8DC5 -#define GL_UNSIGNED_INT_VEC2 0x8DC6 -#define GL_UNSIGNED_INT_VEC3 0x8DC7 -#define GL_UNSIGNED_INT_VEC4 0x8DC8 -#define GL_INT_SAMPLER_2D 0x8DCA -#define GL_INT_SAMPLER_3D 0x8DCB -#define GL_INT_SAMPLER_CUBE 0x8DCC -#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF -#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2 -#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3 -#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4 -#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7 -#define GL_BUFFER_ACCESS_FLAGS 0x911F -#define GL_BUFFER_MAP_LENGTH 0x9120 -#define GL_BUFFER_MAP_OFFSET 0x9121 -#define GL_DEPTH_COMPONENT32F 0x8CAC -#define GL_DEPTH32F_STENCIL8 0x8CAD -#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD -#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210 -#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211 -#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212 -#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213 -#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214 -#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215 -#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216 -#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217 -#define GL_FRAMEBUFFER_DEFAULT 0x8218 -#define GL_FRAMEBUFFER_UNDEFINED 0x8219 -#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A -#define GL_DEPTH_STENCIL 0x84F9 -#define GL_UNSIGNED_INT_24_8 0x84FA -#define GL_DEPTH24_STENCIL8 0x88F0 -#define GL_UNSIGNED_NORMALIZED 0x8C17 -#define GL_DRAW_FRAMEBUFFER_BINDING GL_FRAMEBUFFER_BINDING -#define GL_READ_FRAMEBUFFER 0x8CA8 -#define GL_DRAW_FRAMEBUFFER 0x8CA9 -#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA -#define GL_RENDERBUFFER_SAMPLES 0x8CAB -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4 -#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF -#define GL_COLOR_ATTACHMENT1 0x8CE1 -#define GL_COLOR_ATTACHMENT2 0x8CE2 -#define GL_COLOR_ATTACHMENT3 0x8CE3 -#define GL_COLOR_ATTACHMENT4 0x8CE4 -#define GL_COLOR_ATTACHMENT5 0x8CE5 -#define GL_COLOR_ATTACHMENT6 0x8CE6 -#define GL_COLOR_ATTACHMENT7 0x8CE7 -#define GL_COLOR_ATTACHMENT8 0x8CE8 -#define GL_COLOR_ATTACHMENT9 0x8CE9 -#define GL_COLOR_ATTACHMENT10 0x8CEA -#define GL_COLOR_ATTACHMENT11 0x8CEB -#define GL_COLOR_ATTACHMENT12 0x8CEC -#define GL_COLOR_ATTACHMENT13 0x8CED -#define GL_COLOR_ATTACHMENT14 0x8CEE -#define GL_COLOR_ATTACHMENT15 0x8CEF -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56 -#define GL_MAX_SAMPLES 0x8D57 -#define GL_HALF_FLOAT 0x140B -#define GL_MAP_READ_BIT 0x0001 -#define GL_MAP_WRITE_BIT 0x0002 -#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004 -#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008 -#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010 -#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020 -#define GL_RG 0x8227 -#define GL_RG_INTEGER 0x8228 -#define GL_R8 0x8229 -#define GL_RG8 0x822B -#define GL_R16F 0x822D -#define GL_R32F 0x822E -#define GL_RG16F 0x822F -#define GL_RG32F 0x8230 -#define GL_R8I 0x8231 -#define GL_R8UI 0x8232 -#define GL_R16I 0x8233 -#define GL_R16UI 0x8234 -#define GL_R32I 0x8235 -#define GL_R32UI 0x8236 -#define GL_RG8I 0x8237 -#define GL_RG8UI 0x8238 -#define GL_RG16I 0x8239 -#define GL_RG16UI 0x823A -#define GL_RG32I 0x823B -#define GL_RG32UI 0x823C -#define GL_VERTEX_ARRAY_BINDING 0x85B5 -#define GL_R8_SNORM 0x8F94 -#define GL_RG8_SNORM 0x8F95 -#define GL_RGB8_SNORM 0x8F96 -#define GL_RGBA8_SNORM 0x8F97 -#define GL_SIGNED_NORMALIZED 0x8F9C -#define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69 -#define GL_COPY_READ_BUFFER 0x8F36 -#define GL_COPY_WRITE_BUFFER 0x8F37 -#define GL_COPY_READ_BUFFER_BINDING GL_COPY_READ_BUFFER -#define GL_COPY_WRITE_BUFFER_BINDING GL_COPY_WRITE_BUFFER -#define GL_UNIFORM_BUFFER 0x8A11 -#define GL_UNIFORM_BUFFER_BINDING 0x8A28 -#define GL_UNIFORM_BUFFER_START 0x8A29 -#define GL_UNIFORM_BUFFER_SIZE 0x8A2A -#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B -#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D -#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E -#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F -#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30 -#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31 -#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33 -#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34 -#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35 -#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36 -#define GL_UNIFORM_TYPE 0x8A37 -#define GL_UNIFORM_SIZE 0x8A38 -#define GL_UNIFORM_NAME_LENGTH 0x8A39 -#define GL_UNIFORM_BLOCK_INDEX 0x8A3A -#define GL_UNIFORM_OFFSET 0x8A3B -#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C -#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D -#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E -#define GL_UNIFORM_BLOCK_BINDING 0x8A3F -#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40 -#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41 -#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42 -#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46 -#define GL_INVALID_INDEX 0xFFFFFFFFu -#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122 -#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125 -#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111 -#define GL_OBJECT_TYPE 0x9112 -#define GL_SYNC_CONDITION 0x9113 -#define GL_SYNC_STATUS 0x9114 -#define GL_SYNC_FLAGS 0x9115 -#define GL_SYNC_FENCE 0x9116 -#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117 -#define GL_UNSIGNALED 0x9118 -#define GL_SIGNALED 0x9119 -#define GL_ALREADY_SIGNALED 0x911A -#define GL_TIMEOUT_EXPIRED 0x911B -#define GL_CONDITION_SATISFIED 0x911C -#define GL_WAIT_FAILED 0x911D -#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001 -#define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFFull -#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE -#define GL_ANY_SAMPLES_PASSED 0x8C2F -#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A -#define GL_SAMPLER_BINDING 0x8919 -#define GL_RGB10_A2UI 0x906F -#define GL_TEXTURE_SWIZZLE_R 0x8E42 -#define GL_TEXTURE_SWIZZLE_G 0x8E43 -#define GL_TEXTURE_SWIZZLE_B 0x8E44 -#define GL_TEXTURE_SWIZZLE_A 0x8E45 -#define GL_GREEN 0x1904 -#define GL_BLUE 0x1905 -#define GL_INT_2_10_10_10_REV 0x8D9F -#define GL_TRANSFORM_FEEDBACK 0x8E22 -#define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23 -#define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24 -#define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25 -#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257 -#define GL_PROGRAM_BINARY_LENGTH 0x8741 -#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE -#define GL_PROGRAM_BINARY_FORMATS 0x87FF -#define GL_COMPRESSED_R11_EAC 0x9270 -#define GL_COMPRESSED_SIGNED_R11_EAC 0x9271 -#define GL_COMPRESSED_RG11_EAC 0x9272 -#define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273 -#define GL_COMPRESSED_RGB8_ETC2 0x9274 -#define GL_COMPRESSED_SRGB8_ETC2 0x9275 -#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276 -#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277 -#define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278 -#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279 -#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F -#define GL_MAX_ELEMENT_INDEX 0x8D6B -#define GL_NUM_SAMPLE_COUNTS 0x9380 -#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF - -/*------------------------------------------------------------------------- - * Entrypoint definitions - *-----------------------------------------------------------------------*/ - -/* OpenGL ES 2.0 */ - -GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture); -GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader); -GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar* name); -GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer); -GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer); -GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer); -GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture); -GL_APICALL void GL_APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -GL_APICALL void GL_APIENTRY glBlendEquation (GLenum mode); -GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); -GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); -GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage); -GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data); -GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target); -GL_APICALL void GL_APIENTRY glClear (GLbitfield mask); -GL_APICALL void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -GL_APICALL void GL_APIENTRY glClearDepthf (GLfloat depth); -GL_APICALL void GL_APIENTRY glClearStencil (GLint s); -GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader); -GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data); -GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data); -GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GL_APICALL GLuint GL_APIENTRY glCreateProgram (void); -GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type); -GL_APICALL void GL_APIENTRY glCullFace (GLenum mode); -GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint* buffers); -GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint* framebuffers); -GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program); -GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers); -GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader); -GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint* textures); -GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func); -GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag); -GL_APICALL void GL_APIENTRY glDepthRangef (GLfloat n, GLfloat f); -GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader); -GL_APICALL void GL_APIENTRY glDisable (GLenum cap); -GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index); -GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count); -GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices); -GL_APICALL void GL_APIENTRY glEnable (GLenum cap); -GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index); -GL_APICALL void GL_APIENTRY glFinish (void); -GL_APICALL void GL_APIENTRY glFlush (void); -GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode); -GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint* buffers); -GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target); -GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint* framebuffers); -GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint* renderbuffers); -GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint* textures); -GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name); -GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name); -GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders); -GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar* name); -GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean* params); -GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params); -GL_APICALL GLenum GL_APIENTRY glGetError (void); -GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat* params); -GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params); -GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint* params); -GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint* params); -GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog); -GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params); -GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint* params); -GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog); -GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision); -GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source); -GL_APICALL const GLubyte* GL_APIENTRY glGetString (GLenum name); -GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params); -GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint* params); -GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat* params); -GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint* params); -GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar* name); -GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params); -GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params); -GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid** pointer); -GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode); -GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer); -GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap); -GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer); -GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program); -GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer); -GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader); -GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture); -GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width); -GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program); -GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param); -GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units); -GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels); -GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void); -GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert); -GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length); -GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length); -GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); -GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); -GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask); -GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask); -GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); -GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass); -GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels); -GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param); -GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params); -GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param); -GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint* params); -GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels); -GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat x); -GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat* v); -GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint x); -GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint* v); -GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat x, GLfloat y); -GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat* v); -GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint x, GLint y); -GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint* v); -GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z); -GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat* v); -GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint x, GLint y, GLint z); -GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint* v); -GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat* v); -GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint x, GLint y, GLint z, GLint w); -GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint* v); -GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); -GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); -GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); -GL_APICALL void GL_APIENTRY glUseProgram (GLuint program); -GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program); -GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint indx, GLfloat x); -GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint indx, const GLfloat* values); -GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint indx, GLfloat x, GLfloat y); -GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint indx, const GLfloat* values); -GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z); -GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint indx, const GLfloat* values); -GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint indx, const GLfloat* values); -GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr); -GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); - -/* OpenGL ES 3.0 */ - -GL_APICALL void GL_APIENTRY glReadBuffer (GLenum mode); -GL_APICALL void GL_APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid* indices); -GL_APICALL void GL_APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels); -GL_APICALL void GL_APIENTRY glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels); -GL_APICALL void GL_APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data); -GL_APICALL void GL_APIENTRY glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data); -GL_APICALL void GL_APIENTRY glGenQueries (GLsizei n, GLuint* ids); -GL_APICALL void GL_APIENTRY glDeleteQueries (GLsizei n, const GLuint* ids); -GL_APICALL GLboolean GL_APIENTRY glIsQuery (GLuint id); -GL_APICALL void GL_APIENTRY glBeginQuery (GLenum target, GLuint id); -GL_APICALL void GL_APIENTRY glEndQuery (GLenum target); -GL_APICALL void GL_APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint* params); -GL_APICALL void GL_APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint* params); -GL_APICALL GLboolean GL_APIENTRY glUnmapBuffer (GLenum target); -GL_APICALL void GL_APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, GLvoid** params); -GL_APICALL void GL_APIENTRY glDrawBuffers (GLsizei n, const GLenum* bufs); -GL_APICALL void GL_APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); -GL_APICALL void GL_APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); -GL_APICALL void GL_APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); -GL_APICALL void GL_APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); -GL_APICALL void GL_APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); -GL_APICALL void GL_APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); -GL_APICALL void GL_APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -GL_APICALL GLvoid* GL_APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); -GL_APICALL void GL_APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length); -GL_APICALL void GL_APIENTRY glBindVertexArray (GLuint array); -GL_APICALL void GL_APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint* arrays); -GL_APICALL void GL_APIENTRY glGenVertexArrays (GLsizei n, GLuint* arrays); -GL_APICALL GLboolean GL_APIENTRY glIsVertexArray (GLuint array); -GL_APICALL void GL_APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint* data); -GL_APICALL void GL_APIENTRY glBeginTransformFeedback (GLenum primitiveMode); -GL_APICALL void GL_APIENTRY glEndTransformFeedback (void); -GL_APICALL void GL_APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -GL_APICALL void GL_APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer); -GL_APICALL void GL_APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar* const* varyings, GLenum bufferMode); -GL_APICALL void GL_APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name); -GL_APICALL void GL_APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid* pointer); -GL_APICALL void GL_APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint* params); -GL_APICALL void GL_APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint* params); -GL_APICALL void GL_APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w); -GL_APICALL void GL_APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -GL_APICALL void GL_APIENTRY glVertexAttribI4iv (GLuint index, const GLint* v); -GL_APICALL void GL_APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint* v); -GL_APICALL void GL_APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint* params); -GL_APICALL GLint GL_APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name); -GL_APICALL void GL_APIENTRY glUniform1ui (GLint location, GLuint v0); -GL_APICALL void GL_APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1); -GL_APICALL void GL_APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2); -GL_APICALL void GL_APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -GL_APICALL void GL_APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint* value); -GL_APICALL void GL_APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint* value); -GL_APICALL void GL_APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint* value); -GL_APICALL void GL_APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint* value); -GL_APICALL void GL_APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint* value); -GL_APICALL void GL_APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint* value); -GL_APICALL void GL_APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat* value); -GL_APICALL void GL_APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); -GL_APICALL const GLubyte* GL_APIENTRY glGetStringi (GLenum name, GLuint index); -GL_APICALL void GL_APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); -GL_APICALL void GL_APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar* const* uniformNames, GLuint* uniformIndices); -GL_APICALL void GL_APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params); -GL_APICALL GLuint GL_APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar* uniformBlockName); -GL_APICALL void GL_APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params); -GL_APICALL void GL_APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName); -GL_APICALL void GL_APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); -GL_APICALL void GL_APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei instanceCount); -GL_APICALL void GL_APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices, GLsizei instanceCount); -GL_APICALL GLsync GL_APIENTRY glFenceSync (GLenum condition, GLbitfield flags); -GL_APICALL GLboolean GL_APIENTRY glIsSync (GLsync sync); -GL_APICALL void GL_APIENTRY glDeleteSync (GLsync sync); -GL_APICALL GLenum GL_APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); -GL_APICALL void GL_APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); -GL_APICALL void GL_APIENTRY glGetInteger64v (GLenum pname, GLint64* params); -GL_APICALL void GL_APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values); -GL_APICALL void GL_APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64* data); -GL_APICALL void GL_APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64* params); -GL_APICALL void GL_APIENTRY glGenSamplers (GLsizei count, GLuint* samplers); -GL_APICALL void GL_APIENTRY glDeleteSamplers (GLsizei count, const GLuint* samplers); -GL_APICALL GLboolean GL_APIENTRY glIsSampler (GLuint sampler); -GL_APICALL void GL_APIENTRY glBindSampler (GLuint unit, GLuint sampler); -GL_APICALL void GL_APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param); -GL_APICALL void GL_APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint* param); -GL_APICALL void GL_APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param); -GL_APICALL void GL_APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat* param); -GL_APICALL void GL_APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint* params); -GL_APICALL void GL_APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat* params); -GL_APICALL void GL_APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor); -GL_APICALL void GL_APIENTRY glBindTransformFeedback (GLenum target, GLuint id); -GL_APICALL void GL_APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint* ids); -GL_APICALL void GL_APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint* ids); -GL_APICALL GLboolean GL_APIENTRY glIsTransformFeedback (GLuint id); -GL_APICALL void GL_APIENTRY glPauseTransformFeedback (void); -GL_APICALL void GL_APIENTRY glResumeTransformFeedback (void); -GL_APICALL void GL_APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, GLvoid* binary); -GL_APICALL void GL_APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const GLvoid* binary, GLsizei length); -GL_APICALL void GL_APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value); -GL_APICALL void GL_APIENTRY glInvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum* attachments); -GL_APICALL void GL_APIENTRY glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum* attachments, GLint x, GLint y, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -GL_APICALL void GL_APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/platform/winrt/include/GLES3/gl3ext.h b/platform/winrt/include/GLES3/gl3ext.h deleted file mode 100644 index 4d4ea96c4d6..00000000000 --- a/platform/winrt/include/GLES3/gl3ext.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef __gl3ext_h_ -#define __gl3ext_h_ - -/* $Revision: 17809 $ on $Date:: 2012-05-14 08:03:36 -0700 #$ */ - -/* - * This document is licensed under the SGI Free Software B License Version - * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . - */ - -/* OpenGL ES 3 Extensions - * - * After an OES extension's interactions with OpenGl ES 3.0 have been documented, - * its tokens and function definitions should be added to this file in a manner - * that does not conflict with gl2ext.h or gl3.h. - * - * Tokens and function definitions for extensions that have become standard - * features in OpenGL ES 3.0 will not be added to this file. - * - * Applications using OpenGL-ES-2-only extensions should include gl2ext.h - */ - -#endif /* __gl3ext_h_ */ - diff --git a/platform/winrt/include/GLES3/gl3platform.h b/platform/winrt/include/GLES3/gl3platform.h deleted file mode 100644 index 1bd1a850fa6..00000000000 --- a/platform/winrt/include/GLES3/gl3platform.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef __gl3platform_h_ -#define __gl3platform_h_ - -/* $Revision: 18437 $ on $Date:: 2012-07-08 23:31:39 -0700 #$ */ - -/* - * This document is licensed under the SGI Free Software B License Version - * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . - */ - -/* Platform-specific types and definitions for OpenGL ES 3.X gl3.h - * - * Adopters may modify khrplatform.h and this file to suit their platform. - * You are encouraged to submit all modifications to the Khronos group so that - * they can be included in future versions of this file. Please submit changes - * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) - * by filing a bug against product "OpenGL-ES" component "Registry". - */ - -#include - -#ifndef GL_APICALL -#define GL_APICALL KHRONOS_APICALL -#endif - -#ifndef GL_APIENTRY -#define GL_APIENTRY KHRONOS_APIENTRY -#endif - -#endif /* __gl3platform_h_ */ diff --git a/platform/winrt/include/GLSLANG/ShaderLang.h b/platform/winrt/include/GLSLANG/ShaderLang.h deleted file mode 100644 index e4866924825..00000000000 --- a/platform/winrt/include/GLSLANG/ShaderLang.h +++ /dev/null @@ -1,411 +0,0 @@ -// -// Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. -// -#ifndef _COMPILER_INTERFACE_INCLUDED_ -#define _COMPILER_INTERFACE_INCLUDED_ - -#if defined(COMPONENT_BUILD) && !defined(ANGLE_TRANSLATOR_STATIC) -#if defined(_WIN32) || defined(_WIN64) - -#if defined(ANGLE_TRANSLATOR_IMPLEMENTATION) -#define COMPILER_EXPORT __declspec(dllexport) -#else -#define COMPILER_EXPORT __declspec(dllimport) -#endif // defined(ANGLE_TRANSLATOR_IMPLEMENTATION) - -#else // defined(_WIN32) || defined(_WIN64) -#define COMPILER_EXPORT __attribute__((visibility("default"))) -#endif - -#else // defined(COMPONENT_BUILD) && !defined(ANGLE_TRANSLATOR_STATIC) -#define COMPILER_EXPORT -#endif - -#include - -#include "KHR/khrplatform.h" - -#include -#include -#include - -// -// This is the platform independent interface between an OGL driver -// and the shading language compiler. -// - -namespace sh -{ -// GLenum alias -typedef unsigned int GLenum; -} - -// Must be included after GLenum proxy typedef -// Note: make sure to increment ANGLE_SH_VERSION when changing ShaderVars.h -#include "ShaderVars.h" - -// Version number for shader translation API. -// It is incremented every time the API changes. -#define ANGLE_SH_VERSION 132 - -typedef enum { - SH_GLES2_SPEC = 0x8B40, - SH_WEBGL_SPEC = 0x8B41, - - SH_GLES3_SPEC = 0x8B86, - SH_WEBGL2_SPEC = 0x8B87, - - // The CSS Shaders spec is a subset of the WebGL spec. - // - // In both CSS vertex and fragment shaders, ANGLE: - // (1) Reserves the "css_" prefix. - // (2) Renames the main function to css_main. - // (3) Disables the gl_MaxDrawBuffers built-in. - // - // In CSS fragment shaders, ANGLE: - // (1) Disables the gl_FragColor built-in. - // (2) Disables the gl_FragData built-in. - // (3) Enables the css_MixColor built-in. - // (4) Enables the css_ColorMatrix built-in. - // - // After passing a CSS shader through ANGLE, the browser is expected to append - // a new main function to it. - // This new main function will call the css_main function. - // It may also perform additional operations like varying assignment, texture - // access, and gl_FragColor assignment in order to implement the CSS Shaders - // blend modes. - // - SH_CSS_SHADERS_SPEC = 0x8B42 -} ShShaderSpec; - -typedef enum { - SH_ESSL_OUTPUT = 0x8B45, - SH_GLSL_OUTPUT = 0x8B46, - SH_HLSL_OUTPUT = 0x8B47, - SH_HLSL9_OUTPUT = 0x8B47, - SH_HLSL11_OUTPUT = 0x8B48 -} ShShaderOutput; - -// Compile options. -typedef enum { - SH_VALIDATE = 0, - SH_VALIDATE_LOOP_INDEXING = 0x0001, - SH_INTERMEDIATE_TREE = 0x0002, - SH_OBJECT_CODE = 0x0004, - SH_VARIABLES = 0x0008, - SH_LINE_DIRECTIVES = 0x0010, - SH_SOURCE_PATH = 0x0020, - SH_UNROLL_FOR_LOOP_WITH_INTEGER_INDEX = 0x0040, - // If a sampler array index happens to be a loop index, - // 1) if its type is integer, unroll the loop. - // 2) if its type is float, fail the shader compile. - // This is to work around a mac driver bug. - SH_UNROLL_FOR_LOOP_WITH_SAMPLER_ARRAY_INDEX = 0x0080, - - // This is needed only as a workaround for certain OpenGL driver bugs. - SH_EMULATE_BUILT_IN_FUNCTIONS = 0x0100, - - // This is an experimental flag to enforce restrictions that aim to prevent - // timing attacks. - // It generates compilation errors for shaders that could expose sensitive - // texture information via the timing channel. - // To use this flag, you must compile the shader under the WebGL spec - // (using the SH_WEBGL_SPEC flag). - SH_TIMING_RESTRICTIONS = 0x0200, - - // This flag prints the dependency graph that is used to enforce timing - // restrictions on fragment shaders. - // This flag only has an effect if all of the following are true: - // - The shader spec is SH_WEBGL_SPEC. - // - The compile options contain the SH_TIMING_RESTRICTIONS flag. - // - The shader type is GL_FRAGMENT_SHADER. - SH_DEPENDENCY_GRAPH = 0x0400, - - // Enforce the GLSL 1.017 Appendix A section 7 packing restrictions. - // This flag only enforces (and can only enforce) the packing - // restrictions for uniform variables in both vertex and fragment - // shaders. ShCheckVariablesWithinPackingLimits() lets embedders - // enforce the packing restrictions for varying variables during - // program link time. - SH_ENFORCE_PACKING_RESTRICTIONS = 0x0800, - - // This flag ensures all indirect (expression-based) array indexing - // is clamped to the bounds of the array. This ensures, for example, - // that you cannot read off the end of a uniform, whether an array - // vec234, or mat234 type. The ShArrayIndexClampingStrategy enum, - // specified in the ShBuiltInResources when constructing the - // compiler, selects the strategy for the clamping implementation. - SH_CLAMP_INDIRECT_ARRAY_BOUNDS = 0x1000, - - // This flag limits the complexity of an expression. - SH_LIMIT_EXPRESSION_COMPLEXITY = 0x2000, - - // This flag limits the depth of the call stack. - SH_LIMIT_CALL_STACK_DEPTH = 0x4000, - - // This flag initializes gl_Position to vec4(0,0,0,0) at the - // beginning of the vertex shader's main(), and has no effect in the - // fragment shader. It is intended as a workaround for drivers which - // incorrectly fail to link programs if gl_Position is not written. - SH_INIT_GL_POSITION = 0x8000, - - // This flag replaces - // "a && b" with "a ? b : false", - // "a || b" with "a ? true : b". - // This is to work around a MacOSX driver bug that |b| is executed - // independent of |a|'s value. - SH_UNFOLD_SHORT_CIRCUIT = 0x10000, - - // This flag initializes varyings without static use in vertex shader - // at the beginning of main(), and has no effects in the fragment shader. - // It is intended as a workaround for drivers which incorrectly optimize - // out such varyings and cause a link failure. - SH_INIT_VARYINGS_WITHOUT_STATIC_USE = 0x20000, - - // This flag scalarizes vec/ivec/bvec/mat constructor args. - // It is intended as a workaround for Linux/Mac driver bugs. - SH_SCALARIZE_VEC_AND_MAT_CONSTRUCTOR_ARGS = 0x40000, - - // This flag overwrites a struct name with a unique prefix. - // It is intended as a workaround for drivers that do not handle - // struct scopes correctly, including all Mac drivers and Linux AMD. - SH_REGENERATE_STRUCT_NAMES = 0x80000, -} ShCompileOptions; - -// Defines alternate strategies for implementing array index clamping. -typedef enum { - // Use the clamp intrinsic for array index clamping. - SH_CLAMP_WITH_CLAMP_INTRINSIC = 1, - - // Use a user-defined function for array index clamping. - SH_CLAMP_WITH_USER_DEFINED_INT_CLAMP_FUNCTION -} ShArrayIndexClampingStrategy; - -// -// Driver must call this first, once, before doing any other -// compiler operations. -// If the function succeeds, the return value is true, else false. -// -COMPILER_EXPORT bool ShInitialize(); -// -// Driver should call this at shutdown. -// If the function succeeds, the return value is true, else false. -// -COMPILER_EXPORT bool ShFinalize(); - -// The 64 bits hash function. The first parameter is the input string; the -// second parameter is the string length. -typedef khronos_uint64_t (*ShHashFunction64)(const char*, size_t); - -// -// Implementation dependent built-in resources (constants and extensions). -// The names for these resources has been obtained by stripping gl_/GL_. -// -typedef struct -{ - // Constants. - int MaxVertexAttribs; - int MaxVertexUniformVectors; - int MaxVaryingVectors; - int MaxVertexTextureImageUnits; - int MaxCombinedTextureImageUnits; - int MaxTextureImageUnits; - int MaxFragmentUniformVectors; - int MaxDrawBuffers; - - // Extensions. - // Set to 1 to enable the extension, else 0. - int OES_standard_derivatives; - int OES_EGL_image_external; - int ARB_texture_rectangle; - int EXT_draw_buffers; - int EXT_frag_depth; - int EXT_shader_texture_lod; - - // Set to 1 to enable replacing GL_EXT_draw_buffers #extension directives - // with GL_NV_draw_buffers in ESSL output. This flag can be used to emulate - // EXT_draw_buffers by using it in combination with GLES3.0 glDrawBuffers - // function. This applies to Tegra K1 devices. - int NV_draw_buffers; - - // Set to 1 if highp precision is supported in the fragment language. - // Default is 0. - int FragmentPrecisionHigh; - - // GLSL ES 3.0 constants. - int MaxVertexOutputVectors; - int MaxFragmentInputVectors; - int MinProgramTexelOffset; - int MaxProgramTexelOffset; - - // Name Hashing. - // Set a 64 bit hash function to enable user-defined name hashing. - // Default is NULL. - ShHashFunction64 HashFunction; - - // Selects a strategy to use when implementing array index clamping. - // Default is SH_CLAMP_WITH_CLAMP_INTRINSIC. - ShArrayIndexClampingStrategy ArrayIndexClampingStrategy; - - // The maximum complexity an expression can be. - int MaxExpressionComplexity; - - // The maximum depth a call stack can be. - int MaxCallStackDepth; -} ShBuiltInResources; - -// -// Initialize built-in resources with minimum expected values. -// Parameters: -// resources: The object to initialize. Will be comparable with memcmp. -// -COMPILER_EXPORT void ShInitBuiltInResources(ShBuiltInResources *resources); - -// -// ShHandle held by but opaque to the driver. It is allocated, -// managed, and de-allocated by the compiler. Its contents -// are defined by and used by the compiler. -// -// If handle creation fails, 0 will be returned. -// -typedef void *ShHandle; - -// -// Returns the a concatenated list of the items in ShBuiltInResources as a -// null-terminated string. -// This function must be updated whenever ShBuiltInResources is changed. -// Parameters: -// handle: Specifies the handle of the compiler to be used. -COMPILER_EXPORT const std::string &ShGetBuiltInResourcesString(const ShHandle handle); - -// -// Driver calls these to create and destroy compiler objects. -// -// Returns the handle of constructed compiler, null if the requested compiler is -// not supported. -// Parameters: -// type: Specifies the type of shader - GL_FRAGMENT_SHADER or GL_VERTEX_SHADER. -// spec: Specifies the language spec the compiler must conform to - -// SH_GLES2_SPEC or SH_WEBGL_SPEC. -// output: Specifies the output code type - SH_ESSL_OUTPUT, SH_GLSL_OUTPUT, -// SH_HLSL9_OUTPUT or SH_HLSL11_OUTPUT. -// resources: Specifies the built-in resources. -COMPILER_EXPORT ShHandle ShConstructCompiler( - sh::GLenum type, - ShShaderSpec spec, - ShShaderOutput output, - const ShBuiltInResources *resources); -COMPILER_EXPORT void ShDestruct(ShHandle handle); - -// -// Compiles the given shader source. -// If the function succeeds, the return value is true, else false. -// Parameters: -// handle: Specifies the handle of compiler to be used. -// shaderStrings: Specifies an array of pointers to null-terminated strings -// containing the shader source code. -// numStrings: Specifies the number of elements in shaderStrings array. -// compileOptions: A mask containing the following parameters: -// SH_VALIDATE: Validates shader to ensure that it conforms to the spec -// specified during compiler construction. -// SH_VALIDATE_LOOP_INDEXING: Validates loop and indexing in the shader to -// ensure that they do not exceed the minimum -// functionality mandated in GLSL 1.0 spec, -// Appendix A, Section 4 and 5. -// There is no need to specify this parameter when -// compiling for WebGL - it is implied. -// SH_INTERMEDIATE_TREE: Writes intermediate tree to info log. -// Can be queried by calling ShGetInfoLog(). -// SH_OBJECT_CODE: Translates intermediate tree to glsl or hlsl shader. -// Can be queried by calling ShGetObjectCode(). -// SH_VARIABLES: Extracts attributes, uniforms, and varyings. -// Can be queried by calling ShGetVariableInfo(). -// -COMPILER_EXPORT bool ShCompile( - const ShHandle handle, - const char * const shaderStrings[], - size_t numStrings, - int compileOptions); - -// Return the version of the shader language. -COMPILER_EXPORT int ShGetShaderVersion(const ShHandle handle); - -// Return the currently set language output type. -COMPILER_EXPORT ShShaderOutput ShGetShaderOutputType( - const ShHandle handle); - -// Returns null-terminated information log for a compiled shader. -// Parameters: -// handle: Specifies the compiler -COMPILER_EXPORT const std::string &ShGetInfoLog(const ShHandle handle); - -// Returns null-terminated object code for a compiled shader. -// Parameters: -// handle: Specifies the compiler -COMPILER_EXPORT const std::string &ShGetObjectCode(const ShHandle handle); - -// Returns a (original_name, hash) map containing all the user defined -// names in the shader, including variable names, function names, struct -// names, and struct field names. -// Parameters: -// handle: Specifies the compiler -COMPILER_EXPORT const std::map *ShGetNameHashingMap( - const ShHandle handle); - -// Shader variable inspection. -// Returns a pointer to a list of variables of the designated type. -// (See ShaderVars.h for type definitions, included above) -// Returns NULL on failure. -// Parameters: -// handle: Specifies the compiler -COMPILER_EXPORT const std::vector *ShGetUniforms(const ShHandle handle); -COMPILER_EXPORT const std::vector *ShGetVaryings(const ShHandle handle); -COMPILER_EXPORT const std::vector *ShGetAttributes(const ShHandle handle); -COMPILER_EXPORT const std::vector *ShGetOutputVariables(const ShHandle handle); -COMPILER_EXPORT const std::vector *ShGetInterfaceBlocks(const ShHandle handle); - -typedef struct -{ - sh::GLenum type; - int size; -} ShVariableInfo; - -// Returns true if the passed in variables pack in maxVectors following -// the packing rules from the GLSL 1.017 spec, Appendix A, section 7. -// Returns false otherwise. Also look at the SH_ENFORCE_PACKING_RESTRICTIONS -// flag above. -// Parameters: -// maxVectors: the available rows of registers. -// varInfoArray: an array of variable info (types and sizes). -// varInfoArraySize: the size of the variable array. -COMPILER_EXPORT bool ShCheckVariablesWithinPackingLimits( - int maxVectors, - ShVariableInfo *varInfoArray, - size_t varInfoArraySize); - -// Gives the compiler-assigned register for an interface block. -// The method writes the value to the output variable "indexOut". -// Returns true if it found a valid interface block, false otherwise. -// Parameters: -// handle: Specifies the compiler -// interfaceBlockName: Specifies the interface block -// indexOut: output variable that stores the assigned register -COMPILER_EXPORT bool ShGetInterfaceBlockRegister(const ShHandle handle, - const std::string &interfaceBlockName, - unsigned int *indexOut); - -// Gives the compiler-assigned register for uniforms in the default -// interface block. -// The method writes the value to the output variable "indexOut". -// Returns true if it found a valid default uniform, false otherwise. -// Parameters: -// handle: Specifies the compiler -// interfaceBlockName: Specifies the uniform -// indexOut: output variable that stores the assigned register -COMPILER_EXPORT bool ShGetUniformRegister(const ShHandle handle, - const std::string &uniformName, - unsigned int *indexOut); - -#endif // _COMPILER_INTERFACE_INCLUDED_ diff --git a/platform/winrt/include/GLSLANG/ShaderVars.h b/platform/winrt/include/GLSLANG/ShaderVars.h deleted file mode 100644 index da21c3e76e8..00000000000 --- a/platform/winrt/include/GLSLANG/ShaderVars.h +++ /dev/null @@ -1,185 +0,0 @@ -// -// Copyright (c) 2013-2014 The ANGLE Project Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. -// -// ShaderVars.h: -// Types to represent GL variables (varyings, uniforms, etc) -// - -#ifndef _COMPILER_INTERFACE_VARIABLES_ -#define _COMPILER_INTERFACE_VARIABLES_ - -#include -#include -#include - -// Assume ShaderLang.h is included before ShaderVars.h, for sh::GLenum -// Note: make sure to increment ANGLE_SH_VERSION when changing ShaderVars.h - -namespace sh -{ - -// Varying interpolation qualifier, see section 4.3.9 of the ESSL 3.00.4 spec -enum InterpolationType -{ - INTERPOLATION_SMOOTH, - INTERPOLATION_CENTROID, - INTERPOLATION_FLAT -}; - -// Uniform block layout qualifier, see section 4.3.8.3 of the ESSL 3.00.4 spec -enum BlockLayoutType -{ - BLOCKLAYOUT_STANDARD, - BLOCKLAYOUT_PACKED, - BLOCKLAYOUT_SHARED -}; - -// Base class for all variables defined in shaders, including Varyings, Uniforms, etc -// Note: we must override the copy constructor and assignment operator so we can -// work around excessive GCC binary bloating: -// See https://code.google.com/p/angleproject/issues/detail?id=697 -struct COMPILER_EXPORT ShaderVariable -{ - ShaderVariable(); - ShaderVariable(GLenum typeIn, unsigned int arraySizeIn); - ~ShaderVariable(); - ShaderVariable(const ShaderVariable &other); - ShaderVariable &operator=(const ShaderVariable &other); - - bool isArray() const { return arraySize > 0; } - unsigned int elementCount() const { return std::max(1u, arraySize); } - bool isStruct() const { return !fields.empty(); } - - // All of the shader's variables are described using nested data - // structures. This is needed in order to disambiguate similar looking - // types, such as two structs containing the same fields, but in - // different orders. "findInfoByMappedName" provides an easy query for - // users to dive into the data structure and fetch the unique variable - // instance corresponding to a dereferencing chain of the top-level - // variable. - // Given a mapped name like 'a[0].b.c[0]', return the ShaderVariable - // that defines 'c' in |leafVar|, and the original name 'A[0].B.C[0]' - // in |originalName|, based on the assumption that |this| defines 'a'. - // If no match is found, return false. - bool findInfoByMappedName(const std::string &mappedFullName, - const ShaderVariable **leafVar, - std::string* originalFullName) const; - - GLenum type; - GLenum precision; - std::string name; - std::string mappedName; - unsigned int arraySize; - bool staticUse; - std::vector fields; - std::string structName; - - protected: - bool isSameVariableAtLinkTime(const ShaderVariable &other, - bool matchPrecision) const; - - bool operator==(const ShaderVariable &other) const; - bool operator!=(const ShaderVariable &other) const - { - return !operator==(other); - } -}; - -struct COMPILER_EXPORT Uniform : public ShaderVariable -{ - Uniform(); - ~Uniform(); - Uniform(const Uniform &other); - Uniform &operator=(const Uniform &other); - bool operator==(const Uniform &other) const; - bool operator!=(const Uniform &other) const - { - return !operator==(other); - } - - // Decide whether two uniforms are the same at shader link time, - // assuming one from vertex shader and the other from fragment shader. - // See GLSL ES Spec 3.00.3, sec 4.3.5. - bool isSameUniformAtLinkTime(const Uniform &other) const; -}; - -struct COMPILER_EXPORT Attribute : public ShaderVariable -{ - Attribute(); - ~Attribute(); - Attribute(const Attribute &other); - Attribute &operator=(const Attribute &other); - bool operator==(const Attribute &other) const; - bool operator!=(const Attribute &other) const - { - return !operator==(other); - } - - int location; -}; - -struct COMPILER_EXPORT InterfaceBlockField : public ShaderVariable -{ - InterfaceBlockField(); - ~InterfaceBlockField(); - InterfaceBlockField(const InterfaceBlockField &other); - InterfaceBlockField &operator=(const InterfaceBlockField &other); - bool operator==(const InterfaceBlockField &other) const; - bool operator!=(const InterfaceBlockField &other) const - { - return !operator==(other); - } - - // Decide whether two InterfaceBlock fields are the same at shader - // link time, assuming one from vertex shader and the other from - // fragment shader. - // See GLSL ES Spec 3.00.3, sec 4.3.7. - bool isSameInterfaceBlockFieldAtLinkTime( - const InterfaceBlockField &other) const; - - bool isRowMajorLayout; -}; - -struct COMPILER_EXPORT Varying : public ShaderVariable -{ - Varying(); - ~Varying(); - Varying(const Varying &otherg); - Varying &operator=(const Varying &other); - bool operator==(const Varying &other) const; - bool operator!=(const Varying &other) const - { - return !operator==(other); - } - - // Decide whether two varyings are the same at shader link time, - // assuming one from vertex shader and the other from fragment shader. - // See GLSL ES Spec 3.00.3, sec 4.3.9. - bool isSameVaryingAtLinkTime(const Varying &other) const; - - InterpolationType interpolation; - bool isInvariant; -}; - -struct COMPILER_EXPORT InterfaceBlock -{ - InterfaceBlock(); - ~InterfaceBlock(); - InterfaceBlock(const InterfaceBlock &other); - InterfaceBlock &operator=(const InterfaceBlock &other); - - std::string name; - std::string mappedName; - std::string instanceName; - unsigned int arraySize; - BlockLayoutType layout; - bool isRowMajorLayout; - bool staticUse; - std::vector fields; -}; - -} - -#endif // _COMPILER_INTERFACE_VARIABLES_ diff --git a/platform/winrt/include/KHR/khrplatform.h b/platform/winrt/include/KHR/khrplatform.h deleted file mode 100644 index 43aac97a73e..00000000000 --- a/platform/winrt/include/KHR/khrplatform.h +++ /dev/null @@ -1,282 +0,0 @@ -#ifndef __khrplatform_h_ -#define __khrplatform_h_ - -/* -** Copyright (c) 2008-2009 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. -*/ - -/* Khronos platform-specific types and definitions. - * - * $Revision: 23298 $ on $Date: 2013-09-30 17:07:13 -0700 (Mon, 30 Sep 2013) $ - * - * Adopters may modify this file to suit their platform. Adopters are - * encouraged to submit platform specific modifications to the Khronos - * group so that they can be included in future versions of this file. - * Please submit changes by sending them to the public Khronos Bugzilla - * (http://khronos.org/bugzilla) by filing a bug against product - * "Khronos (general)" component "Registry". - * - * A predefined template which fills in some of the bug fields can be - * reached using http://tinyurl.com/khrplatform-h-bugreport, but you - * must create a Bugzilla login first. - * - * - * See the Implementer's Guidelines for information about where this file - * should be located on your system and for more details of its use: - * http://www.khronos.org/registry/implementers_guide.pdf - * - * This file should be included as - * #include - * by Khronos client API header files that use its types and defines. - * - * The types in khrplatform.h should only be used to define API-specific types. - * - * Types defined in khrplatform.h: - * khronos_int8_t signed 8 bit - * khronos_uint8_t unsigned 8 bit - * khronos_int16_t signed 16 bit - * khronos_uint16_t unsigned 16 bit - * khronos_int32_t signed 32 bit - * khronos_uint32_t unsigned 32 bit - * khronos_int64_t signed 64 bit - * khronos_uint64_t unsigned 64 bit - * khronos_intptr_t signed same number of bits as a pointer - * khronos_uintptr_t unsigned same number of bits as a pointer - * khronos_ssize_t signed size - * khronos_usize_t unsigned size - * khronos_float_t signed 32 bit floating point - * khronos_time_ns_t unsigned 64 bit time in nanoseconds - * khronos_utime_nanoseconds_t unsigned time interval or absolute time in - * nanoseconds - * khronos_stime_nanoseconds_t signed time interval in nanoseconds - * khronos_boolean_enum_t enumerated boolean type. This should - * only be used as a base type when a client API's boolean type is - * an enum. Client APIs which use an integer or other type for - * booleans cannot use this as the base type for their boolean. - * - * Tokens defined in khrplatform.h: - * - * KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values. - * - * KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0. - * KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0. - * - * Calling convention macros defined in this file: - * KHRONOS_APICALL - * KHRONOS_APIENTRY - * KHRONOS_APIATTRIBUTES - * - * These may be used in function prototypes as: - * - * KHRONOS_APICALL void KHRONOS_APIENTRY funcname( - * int arg1, - * int arg2) KHRONOS_APIATTRIBUTES; - */ - -/*------------------------------------------------------------------------- - * Definition of KHRONOS_APICALL - *------------------------------------------------------------------------- - * This precedes the return type of the function in the function prototype. - */ -#if defined(_WIN32) && !defined(__SCITECH_SNAP__) -# define KHRONOS_APICALL __declspec(dllimport) -#elif defined (__SYMBIAN32__) -# define KHRONOS_APICALL IMPORT_C -#else -# define KHRONOS_APICALL -#endif - -/*------------------------------------------------------------------------- - * Definition of KHRONOS_APIENTRY - *------------------------------------------------------------------------- - * This follows the return type of the function and precedes the function - * name in the function prototype. - */ -#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__) - /* Win32 but not WinCE */ -# define KHRONOS_APIENTRY __stdcall -#else -# define KHRONOS_APIENTRY -#endif - -/*------------------------------------------------------------------------- - * Definition of KHRONOS_APIATTRIBUTES - *------------------------------------------------------------------------- - * This follows the closing parenthesis of the function prototype arguments. - */ -#if defined (__ARMCC_2__) -#define KHRONOS_APIATTRIBUTES __softfp -#else -#define KHRONOS_APIATTRIBUTES -#endif - -/*------------------------------------------------------------------------- - * basic type definitions - *-----------------------------------------------------------------------*/ -#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__) - - -/* - * Using - */ -#include -typedef int32_t khronos_int32_t; -typedef uint32_t khronos_uint32_t; -typedef int64_t khronos_int64_t; -typedef uint64_t khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif defined(__VMS ) || defined(__sgi) - -/* - * Using - */ -#include -typedef int32_t khronos_int32_t; -typedef uint32_t khronos_uint32_t; -typedef int64_t khronos_int64_t; -typedef uint64_t khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif defined(_WIN32) && !defined(__SCITECH_SNAP__) - -/* - * Win32 - */ -typedef __int32 khronos_int32_t; -typedef unsigned __int32 khronos_uint32_t; -typedef __int64 khronos_int64_t; -typedef unsigned __int64 khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif defined(__sun__) || defined(__digital__) - -/* - * Sun or Digital - */ -typedef int khronos_int32_t; -typedef unsigned int khronos_uint32_t; -#if defined(__arch64__) || defined(_LP64) -typedef long int khronos_int64_t; -typedef unsigned long int khronos_uint64_t; -#else -typedef long long int khronos_int64_t; -typedef unsigned long long int khronos_uint64_t; -#endif /* __arch64__ */ -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif 0 - -/* - * Hypothetical platform with no float or int64 support - */ -typedef int khronos_int32_t; -typedef unsigned int khronos_uint32_t; -#define KHRONOS_SUPPORT_INT64 0 -#define KHRONOS_SUPPORT_FLOAT 0 - -#else - -/* - * Generic fallback - */ -#include -typedef int32_t khronos_int32_t; -typedef uint32_t khronos_uint32_t; -typedef int64_t khronos_int64_t; -typedef uint64_t khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#endif - - -/* - * Types that are (so far) the same on all platforms - */ -typedef signed char khronos_int8_t; -typedef unsigned char khronos_uint8_t; -typedef signed short int khronos_int16_t; -typedef unsigned short int khronos_uint16_t; - -/* - * Types that differ between LLP64 and LP64 architectures - in LLP64, - * pointers are 64 bits, but 'long' is still 32 bits. Win64 appears - * to be the only LLP64 architecture in current use. - */ -#ifdef _WIN64 -typedef signed long long int khronos_intptr_t; -typedef unsigned long long int khronos_uintptr_t; -typedef signed long long int khronos_ssize_t; -typedef unsigned long long int khronos_usize_t; -#else -typedef signed long int khronos_intptr_t; -typedef unsigned long int khronos_uintptr_t; -typedef signed long int khronos_ssize_t; -typedef unsigned long int khronos_usize_t; -#endif - -#if KHRONOS_SUPPORT_FLOAT -/* - * Float type - */ -typedef float khronos_float_t; -#endif - -#if KHRONOS_SUPPORT_INT64 -/* Time types - * - * These types can be used to represent a time interval in nanoseconds or - * an absolute Unadjusted System Time. Unadjusted System Time is the number - * of nanoseconds since some arbitrary system event (e.g. since the last - * time the system booted). The Unadjusted System Time is an unsigned - * 64 bit value that wraps back to 0 every 584 years. Time intervals - * may be either signed or unsigned. - */ -typedef khronos_uint64_t khronos_utime_nanoseconds_t; -typedef khronos_int64_t khronos_stime_nanoseconds_t; -#endif - -/* - * Dummy value used to pad enum types to 32 bits. - */ -#ifndef KHRONOS_MAX_ENUM -#define KHRONOS_MAX_ENUM 0x7FFFFFFF -#endif - -/* - * Enumerated boolean type - * - * Values other than zero should be considered to be true. Therefore - * comparisons should not be made against KHRONOS_TRUE. - */ -typedef enum { - KHRONOS_FALSE = 0, - KHRONOS_TRUE = 1, - KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM -} khronos_boolean_enum_t; - -#endif /* __khrplatform_h_ */ diff --git a/platform/winrt/include/LICENSE.ANGLE.txt b/platform/winrt/include/LICENSE.ANGLE.txt deleted file mode 100644 index bdacb32e36d..00000000000 --- a/platform/winrt/include/LICENSE.ANGLE.txt +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (C) 2002-2013 The ANGLE Project Authors. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of TransGaming Inc., Google Inc., 3DLabs Inc. -// Ltd., nor the names of their contributors may be used to endorse -// or promote products derived from this software without specific -// prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. diff --git a/platform/winrt/include/angle_gl.h b/platform/winrt/include/angle_gl.h deleted file mode 100644 index d093f75ee29..00000000000 --- a/platform/winrt/include/angle_gl.h +++ /dev/null @@ -1,23 +0,0 @@ -// -// Copyright (c) 2014 The ANGLE Project Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. -// -// angle_gl.h: -// Includes all necessary GL headers and definitions for ANGLE. -// - -#ifndef ANGLE_GL_H_ -#define ANGLE_GL_H_ - -#include "GLES2/gl2.h" -#include "GLES2/gl2ext.h" -#include "GLES3/gl3.h" -#include "GLES3/gl3ext.h" - -// The following enum is used in ANGLE, but is from desktop GL -#ifndef GL_SAMPLER_2D_RECT_ARB -#define GL_SAMPLER_2D_RECT_ARB 0x8B63 -#endif - -#endif // ANGLE_GL_H_ diff --git a/platform/winrt/include/angle_windowsstore.h b/platform/winrt/include/angle_windowsstore.h deleted file mode 100644 index 53ec93e037d..00000000000 --- a/platform/winrt/include/angle_windowsstore.h +++ /dev/null @@ -1,37 +0,0 @@ -// -// Copyright (c) 2014 The ANGLE Project Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. -// -// angle_windowsstore.h: - -#ifndef ANGLE_WINDOWSSTORE_H_ -#define ANGLE_WINDOWSSTORE_H_ - -// The following properties can be set on the CoreApplication to support additional -// ANGLE configuration options. -// -// The Visual Studio sample templates provided with this version of ANGLE have examples -// of how to set these property values. - -// -// Property: EGLNativeWindowTypeProperty -// Type: IInspectable -// Description: Set this property to specify the window type to use for creating a surface. -// If this property is missing, surface creation will fail. -// -const wchar_t EGLNativeWindowTypeProperty[] = L"EGLNativeWindowTypeProperty"; - -// -// Property: EGLRenderSurfaceSizeProperty -// Type: Size -// Description: Set this property to specify a preferred size in pixels of the render surface. -// The render surface size width and height must be greater than 0. -// If this property is set, then the render surface size is fixed. -// If this property is missing, a default behavior will be provided. -// The default behavior uses the window size if a CoreWindow is specified or -// the size of the SwapChainPanel control if one is specified. -// -const wchar_t EGLRenderSurfaceSizeProperty[] = L"EGLRenderSurfaceSizeProperty"; - -#endif // ANGLE_WINDOWSSTORE_H_ From 1d759f02e6c34ad68f737fe024c6f996d5e3ffe7 Mon Sep 17 00:00:00 2001 From: George Marques Date: Sat, 3 Sep 2016 19:35:42 -0300 Subject: [PATCH 3/8] Fix root path resolution on PCK file --- core/io/file_access_pack.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/io/file_access_pack.cpp b/core/io/file_access_pack.cpp index f12a3a44127..c5bf6cce6ca 100644 --- a/core/io/file_access_pack.cpp +++ b/core/io/file_access_pack.cpp @@ -398,6 +398,8 @@ Error DirAccessPack::change_dir(String p_dir) { nd = nd.simplify_path(); + if (nd == "") nd = "."; + if (nd.begins_with("/")) { nd = nd.replace_first("/", ""); absolute = true; From c51f54749f88cb7cce3a5b653f0df2cad1f64fe8 Mon Sep 17 00:00:00 2001 From: George Marques Date: Sat, 3 Sep 2016 19:36:44 -0300 Subject: [PATCH 4/8] Fix drivers coding for WinRT - Add a proper function to retrieve IP addresses. - Solve issues with Windows FileAccess and DirAccess to use the same code for WinRT. - Add patches to the GLES2 rasterizer to workaround ANGLE issues. --- drivers/gles2/rasterizer_gles2.cpp | 10 +++++++++- drivers/gles2/shaders/material.glsl | 4 ++++ drivers/unix/ip_unix.cpp | 14 ++++++++++---- drivers/windows/dir_access_windows.cpp | 23 ----------------------- drivers/windows/file_access_windows.cpp | 10 ++++++++++ drivers/windows/semaphore_windows.cpp | 2 +- 6 files changed, 34 insertions(+), 29 deletions(-) diff --git a/drivers/gles2/rasterizer_gles2.cpp b/drivers/gles2/rasterizer_gles2.cpp index bf99535af78..d3cd35ad8d3 100644 --- a/drivers/gles2/rasterizer_gles2.cpp +++ b/drivers/gles2/rasterizer_gles2.cpp @@ -10193,6 +10193,11 @@ void RasterizerGLES2::init() { shadow = NULL; shadow_pass = 0; +#ifdef ANGLE_ENABLED + // Fix for ANGLE + material_shader.set_conditional(MaterialShaderGLES2::DISABLE_FRONT_FACING, true); +#endif + framebuffer.fbo = 0; framebuffer.width = 0; framebuffer.height = 0; @@ -10271,9 +10276,12 @@ void RasterizerGLES2::init() { s3tc_supported = extensions.has("GL_EXT_texture_compression_dxt1") || extensions.has("GL_EXT_texture_compression_s3tc") || extensions.has("WEBGL_compressed_texture_s3tc"); use_half_float = extensions.has("GL_OES_vertex_half_float"); atitc_supported = extensions.has("GL_AMD_compressed_ATC_texture"); - srgb_supported = extensions.has("GL_EXT_sRGB"); +#ifndef ANGLE_ENABLED s3tc_srgb_supported = s3tc_supported && extensions.has("GL_EXT_texture_compression_s3tc"); +#else + s3tc_srgb_supported = s3tc_supported; +#endif latc_supported = extensions.has("GL_EXT_texture_compression_latc"); anisotropic_level = 1.0; use_anisotropic_filter = extensions.has("GL_EXT_texture_filter_anisotropic"); diff --git a/drivers/gles2/shaders/material.glsl b/drivers/gles2/shaders/material.glsl index 763347efc5a..e5be25757d7 100644 --- a/drivers/gles2/shaders/material.glsl +++ b/drivers/gles2/shaders/material.glsl @@ -811,7 +811,11 @@ void main() { float specular_exp=1.0; float glow=0.0; float shade_param=0.0; +#ifdef DISABLE_FRONT_FACING + float side=float(1)*2.0-1.0; +#else float side=float(gl_FrontFacing)*2.0-1.0; +#endif #if defined(ENABLE_TANGENT_INTERP) vec3 binormal = normalize(binormal_interp)*side; vec3 tangent = normalize(tangent_interp)*side; diff --git a/drivers/unix/ip_unix.cpp b/drivers/unix/ip_unix.cpp index 8d46495e15d..feb1809fcae 100644 --- a/drivers/unix/ip_unix.cpp +++ b/drivers/unix/ip_unix.cpp @@ -127,6 +127,15 @@ void IP_Unix::get_local_addresses(List *r_addresses) const { using namespace Windows::Networking; using namespace Windows::Networking::Connectivity; + auto hostnames = NetworkInformation::GetHostNames(); + + for (int i = 0; i < hostnames->Size; i++) { + + if (hostnames->GetAt(i)->Type == HostNameType::Ipv4 && hostnames->GetAt(i)->IPInformation != nullptr) { + + r_addresses->push_back(IP_Address(String(hostnames->GetAt(i)->CanonicalName->Data()))); + } + } auto hostnames = NetworkInformation::GetHostNames(); @@ -148,10 +157,7 @@ void IP_Unix::get_local_addresses(List *r_addresses) const { while (true) { addrs = (IP_ADAPTER_ADDRESSES *)memalloc(buf_size); - int err = GetAdaptersAddresses(AF_UNSPEC, GAA_FLAG_SKIP_ANYCAST | - GAA_FLAG_SKIP_MULTICAST | - GAA_FLAG_SKIP_DNS_SERVER | - GAA_FLAG_SKIP_FRIENDLY_NAME, + int err = GetAdaptersAddresses(AF_UNSPEC, GAA_FLAG_SKIP_ANYCAST | GAA_FLAG_SKIP_MULTICAST | GAA_FLAG_SKIP_DNS_SERVER | GAA_FLAG_SKIP_FRIENDLY_NAME, NULL, addrs, &buf_size); if (err == NO_ERROR) { break; diff --git a/drivers/windows/dir_access_windows.cpp b/drivers/windows/dir_access_windows.cpp index 070e5990676..e590111d4a3 100644 --- a/drivers/windows/dir_access_windows.cpp +++ b/drivers/windows/dir_access_windows.cpp @@ -38,12 +38,6 @@ #include #include -#ifdef WINRT_ENABLED -#include -#include -#include -#endif - /* [03:57] yessopie, so i dont havemak to rely on unicows @@ -130,14 +124,6 @@ Error DirAccessWindows::change_dir(String p_dir) { GLOBAL_LOCK_FUNCTION -#ifdef WINRT_ENABLED - - p_dir = fix_path(p_dir); - current_dir = normalize_path(p_dir); - - return OK; -#else - p_dir = fix_path(p_dir); wchar_t real_current_dir_name[2048]; @@ -170,19 +156,12 @@ Error DirAccessWindows::change_dir(String p_dir) { //} return worked ? OK : ERR_INVALID_PARAMETER; -#endif } Error DirAccessWindows::make_dir(String p_dir) { GLOBAL_LOCK_FUNCTION -#ifdef WINRT_ENABLED - - return ERR_CANT_CREATE; - -#else - if (p_dir.is_rel_path()) p_dir = get_current_dir().plus_file(p_dir); @@ -207,8 +186,6 @@ Error DirAccessWindows::make_dir(String p_dir) { }; return ERR_CANT_CREATE; - -#endif } String DirAccessWindows::get_current_dir() { diff --git a/drivers/windows/file_access_windows.cpp b/drivers/windows/file_access_windows.cpp index 64e73cd2b34..42537ad1f5a 100644 --- a/drivers/windows/file_access_windows.cpp +++ b/drivers/windows/file_access_windows.cpp @@ -115,7 +115,16 @@ void FileAccessWindows::close() { //int rename_error = _wrename((save_path+".tmp").c_str(),save_path.c_str()); bool rename_error; + +#ifdef WINRT_ENABLED + // WinRT has no PathFileExists, so we check attributes instead + DWORD fileAttr; + + fileAttr = GetFileAttributesW(save_path.c_str()); + if (INVALID_FILE_ATTRIBUTES == fileAttr) { +#else if (!PathFileExistsW(save_path.c_str())) { +#endif //creating new file rename_error = _wrename((save_path + ".tmp").c_str(), save_path.c_str()) != 0; } else { @@ -130,6 +139,7 @@ void FileAccessWindows::close() { ERR_FAIL_COND(rename_error); } } + bool FileAccessWindows::is_open() const { return (f != NULL); diff --git a/drivers/windows/semaphore_windows.cpp b/drivers/windows/semaphore_windows.cpp index 755481b972f..acf18be7ee8 100644 --- a/drivers/windows/semaphore_windows.cpp +++ b/drivers/windows/semaphore_windows.cpp @@ -29,7 +29,7 @@ /*************************************************************************/ #include "semaphore_windows.h" -#if defined(WINDOWS_ENABLED) && !defined(WINRT_ENABLED) +#if defined(WINDOWS_ENABLED) #include "os/memory.h" From 1cb77c3684388724273c034b5acdd562d9938219 Mon Sep 17 00:00:00 2001 From: George Marques Date: Sat, 3 Sep 2016 19:41:36 -0300 Subject: [PATCH 5/8] Patch thirdy-party libraries to build for WinRT - Patch enet code. - Patch OpenSSL code and add shims for unavailable API. - Add extra definition header for Freetype. --- drivers/builtin_openssl2/SCsub | 4 + drivers/builtin_openssl2/winrt.cpp | 127 ++++++++++++++++++++++ drivers/builtin_openssl2/winrt_fix.patch | 64 +++++++++++ drivers/freetype/winrtdef.h | 32 ++++++ thirdparty/openssl/crypto/rand/rand_win.c | 9 +- thirdparty/openssl/openssl/dtls1.h | 3 + 6 files changed, 237 insertions(+), 2 deletions(-) create mode 100644 drivers/builtin_openssl2/winrt.cpp create mode 100644 drivers/builtin_openssl2/winrt_fix.patch create mode 100644 drivers/freetype/winrtdef.h diff --git a/drivers/builtin_openssl2/SCsub b/drivers/builtin_openssl2/SCsub index 9720369baba..bddf33146a2 100644 --- a/drivers/builtin_openssl2/SCsub +++ b/drivers/builtin_openssl2/SCsub @@ -642,6 +642,7 @@ openssl_sources = [ # env.drivers_sources+=openssl_sources +env.Append(CPPPATH=["#drivers/builtin_openssl2"]) env_drivers.Append(CPPPATH=["#drivers/builtin_openssl2/crypto"]) env_drivers.Append(CPPPATH=["#drivers/builtin_openssl2/openssl"]) env_drivers.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/evp"]) @@ -650,6 +651,9 @@ env_drivers.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/modes"]) # env_ssl.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/store"]) env_drivers.Append(CPPFLAGS=["-DOPENSSL_NO_ASM", "-DOPENSSL_THREADS", "-DL_ENDIAN"]) +if "platform" in env and env["platform"] == "winrt": + openssl_sources += ['winrt.cpp'] + # Workaround for compilation error with GCC/Clang when -Werror is too greedy (GH-4517) import os if not (os.name == "nt" and os.getenv("VSINSTALLDIR") != None): # not Windows and not MSVC diff --git a/drivers/builtin_openssl2/winrt.cpp b/drivers/builtin_openssl2/winrt.cpp new file mode 100644 index 00000000000..d451476b324 --- /dev/null +++ b/drivers/builtin_openssl2/winrt.cpp @@ -0,0 +1,127 @@ +/* Snippets extracted from https://github.com/Microsoft/openssl/blob/ec7e430e06e4e3ac87c183dee33cb216814cf980/ms/winrt.cpp + * Adapted for Godot definitions + */ +/* winrt.cpp + * Copyright 2014 Microsoft Corporation + * C++/CX Entropy/shims for Windows Phone/Windows Store platform + * written by Alejandro Jimenez Martinez + * (aljim@microsoft.com) for the OpenSSL project 2014. + */ + +#include +#if defined(WINAPI_FAMILY) +extern "C" { +unsigned entropyRT(BYTE *buffer, unsigned len); +void RAND_add(const void *buf, int num, double entropy); +int RAND_poll(void); +} +#endif + +unsigned entropyRT(BYTE *buffer, unsigned len) { + using namespace Platform; + using namespace Windows::Foundation; + using namespace Windows::Foundation::Collections; + using namespace Windows::Security::Cryptography; + using namespace Windows::Storage::Streams; + IBuffer ^ buf = CryptographicBuffer::GenerateRandom(len); + Array ^ arr; + CryptographicBuffer::CopyToByteArray(buf, &arr); + unsigned arrayLen = arr->Length; + + // Make sure not to overflow the copy + arrayLen = (arrayLen > len) ? len : arrayLen; + memcpy(buffer, arr->Data, arrayLen); + return arrayLen; +} + +int RAND_poll(void) { + BYTE buf[60]; + unsigned collected = entropyRT(buf, sizeof(buf)); + RAND_add(buf, collected, collected); + return 1; +} + +#if defined(WINRT_ENABLED) +extern "C" { +#include +#include +#include + +void *GetModuleHandle( + _In_opt_ LPCTSTR lpModuleName) { + return NULL; +} +//no log for phone +int RegisterEventSource( + _In_ LPCTSTR lpUNCServerName, + _In_ LPCTSTR lpSourceName) { + return NULL; +} + +int ReportEvent( + _In_ HANDLE hEventLog, + _In_ WORD wType, + _In_ WORD wCategory, + _In_ DWORD dwEventID, + _In_ PSID lpUserSid, + _In_ WORD wNumStrings, + _In_ DWORD dwDataSize, + _In_ LPCTSTR *lpStrings, + _In_ LPVOID lpRawData) { + return 0; +} +int MessageBox( + _In_opt_ HWND hWnd, + _In_opt_ LPCTSTR lpText, + _In_opt_ LPCTSTR lpCaption, + _In_ UINT uType) { + return 0; +} +int __cdecl GetProcessWindowStation(void) { + return NULL; +} +BOOL __cdecl GetUserObjectInformationW( + _In_ HANDLE hObj, + _In_ int nIndex, + _Out_opt_ PVOID pvInfo, + _In_ DWORD nLength, + _Out_opt_ LPDWORD lpnLengthNeeded) { + return 0; +} +int __cdecl GetStdHandle( + _In_ DWORD nStdHandle) { + return 0; +} +BOOL DeregisterEventSource( + _Inout_ HANDLE hEventLog) { + return 0; +} +char *getenv( + const char *varname) { + //hardcoded environmental variables used for the appx testing application for store/phone + if (!strcmp(varname, "OPENSSL_CONF")) { + return "./openssl.cnf"; + } + return 0; +} +int setenv(const char *envname, const char *envval, int overwrite) { + return -1; +} +int _getch(void) { + return 0; +} +int _kbhit() { + return 0; +} +BOOL __cdecl FlushConsoleInputBuffer( + _In_ HANDLE hConsoleInput) { + return 0; +} +int winrt_GetTickCount(void) { + LARGE_INTEGER t; + return (int)(QueryPerformanceCounter(&t) ? t.QuadPart : 0); +} +void *OPENSSL_UplinkTable[26] = { 0 }; +} //extern C + +#endif /*defined(WINRT_ENABLED)*/ diff --git a/drivers/builtin_openssl2/winrt_fix.patch b/drivers/builtin_openssl2/winrt_fix.patch new file mode 100644 index 00000000000..caf180a75bb --- /dev/null +++ b/drivers/builtin_openssl2/winrt_fix.patch @@ -0,0 +1,64 @@ +diff --git a/drivers/builtin_openssl2/crypto/rand/rand_win.c b/drivers/builtin_openssl2/crypto/rand/rand_win.c +index 06670ae..70fd52a 100644 +--- a/drivers/builtin_openssl2/crypto/rand/rand_win.c ++++ b/drivers/builtin_openssl2/crypto/rand/rand_win.c +@@ -118,8 +118,10 @@ + # ifndef _WIN32_WINNT + # define _WIN32_WINNT 0x0400 + # endif ++#ifndef WINRT_ENABLED + # include + # include ++#endif + + /* + * Limit the time spent walking through the heap, processes, threads and +@@ -161,7 +163,7 @@ typedef struct tagCURSORINFO { + # define CURSOR_SHOWING 0x00000001 + # endif /* CURSOR_SHOWING */ + +-# if !defined(OPENSSL_SYS_WINCE) ++# if !defined(OPENSSL_SYS_WINCE) && !defined(WINRT_ENABLED) + typedef BOOL(WINAPI *CRYPTACQUIRECONTEXTW) (HCRYPTPROV *, LPCWSTR, LPCWSTR, + DWORD, DWORD); + typedef BOOL(WINAPI *CRYPTGENRANDOM) (HCRYPTPROV, DWORD, BYTE *); +@@ -196,6 +198,7 @@ typedef NET_API_STATUS(NET_API_FUNCTION *NETFREE) (LPBYTE); + # endif /* 1 */ + # endif /* !OPENSSL_SYS_WINCE */ + ++#if !defined(WINRT_ENABLED) + int RAND_poll(void) + { + MEMORYSTATUS m; +@@ -580,6 +583,8 @@ int RAND_poll(void) + return (1); + } + ++#endif // WINRT_ENABLED ++ + int RAND_event(UINT iMsg, WPARAM wParam, LPARAM lParam) + { + double add_entropy = 0; +@@ -682,7 +687,7 @@ static void readtimer(void) + + static void readscreen(void) + { +-# if !defined(OPENSSL_SYS_WINCE) && !defined(OPENSSL_SYS_WIN32_CYGWIN) ++# if !defined(OPENSSL_SYS_WINCE) && !defined(OPENSSL_SYS_WIN32_CYGWIN) && !defined(WINRT_ENABLED) + HDC hScrDC; /* screen DC */ + HBITMAP hBitmap; /* handle for our bitmap */ + BITMAP bm; /* bitmap properties */ +diff --git a/drivers/builtin_openssl2/openssl/dtls1.h b/drivers/builtin_openssl2/openssl/dtls1.h +index 64ad3c8..a58aca2 100644 +--- a/drivers/builtin_openssl2/openssl/dtls1.h ++++ b/drivers/builtin_openssl2/openssl/dtls1.h +@@ -81,6 +81,9 @@ + # include + # endif + # endif ++#ifdef WINRT_ENABLED ++#include ++#endif + + #ifdef __cplusplus + extern "C" { diff --git a/drivers/freetype/winrtdef.h b/drivers/freetype/winrtdef.h new file mode 100644 index 00000000000..69c6baf5329 --- /dev/null +++ b/drivers/freetype/winrtdef.h @@ -0,0 +1,32 @@ +/*************************************************************************/ +/* winrtdef.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is 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 Software. */ +/* */ +/* 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 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 */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ + +// "generic" is a reserved keyword in C++/CX code +// this avoids the errors in the variable name from Freetype code +#define generic freetype_generic diff --git a/thirdparty/openssl/crypto/rand/rand_win.c b/thirdparty/openssl/crypto/rand/rand_win.c index 06670ae017a..70fd52a7aaf 100644 --- a/thirdparty/openssl/crypto/rand/rand_win.c +++ b/thirdparty/openssl/crypto/rand/rand_win.c @@ -118,8 +118,10 @@ # ifndef _WIN32_WINNT # define _WIN32_WINNT 0x0400 # endif +#ifndef WINRT_ENABLED # include # include +#endif /* * Limit the time spent walking through the heap, processes, threads and @@ -161,7 +163,7 @@ typedef struct tagCURSORINFO { # define CURSOR_SHOWING 0x00000001 # endif /* CURSOR_SHOWING */ -# if !defined(OPENSSL_SYS_WINCE) +# if !defined(OPENSSL_SYS_WINCE) && !defined(WINRT_ENABLED) typedef BOOL(WINAPI *CRYPTACQUIRECONTEXTW) (HCRYPTPROV *, LPCWSTR, LPCWSTR, DWORD, DWORD); typedef BOOL(WINAPI *CRYPTGENRANDOM) (HCRYPTPROV, DWORD, BYTE *); @@ -196,6 +198,7 @@ typedef NET_API_STATUS(NET_API_FUNCTION *NETFREE) (LPBYTE); # endif /* 1 */ # endif /* !OPENSSL_SYS_WINCE */ +#if !defined(WINRT_ENABLED) int RAND_poll(void) { MEMORYSTATUS m; @@ -580,6 +583,8 @@ int RAND_poll(void) return (1); } +#endif // WINRT_ENABLED + int RAND_event(UINT iMsg, WPARAM wParam, LPARAM lParam) { double add_entropy = 0; @@ -682,7 +687,7 @@ static void readtimer(void) static void readscreen(void) { -# if !defined(OPENSSL_SYS_WINCE) && !defined(OPENSSL_SYS_WIN32_CYGWIN) +# if !defined(OPENSSL_SYS_WINCE) && !defined(OPENSSL_SYS_WIN32_CYGWIN) && !defined(WINRT_ENABLED) HDC hScrDC; /* screen DC */ HBITMAP hBitmap; /* handle for our bitmap */ BITMAP bm; /* bitmap properties */ diff --git a/thirdparty/openssl/openssl/dtls1.h b/thirdparty/openssl/openssl/dtls1.h index 64ad3c87d06..a58aca248dc 100644 --- a/thirdparty/openssl/openssl/dtls1.h +++ b/thirdparty/openssl/openssl/dtls1.h @@ -81,6 +81,9 @@ # include # endif # endif +#ifdef WINRT_ENABLED +#include +#endif #ifdef __cplusplus extern "C" { From 21c4bff64c3b0b8b265dc91a2689301440f10b03 Mon Sep 17 00:00:00 2001 From: George Marques Date: Sat, 3 Sep 2016 19:43:40 -0300 Subject: [PATCH 6/8] Add Windows Universal export to editor - Use OPENSSL_ENABLED definition to the whole source to detect it anywhere. - Add WinRT/UWP template files with manifest and default images. --- platform/winrt/export/export.cpp | 2349 +++++++++++++++++ platform/winrt/export/export.h | 29 + tools/dist/uwp_template/AppxManifest.xml | 32 + .../Assets/SplashScreen.scale-100.png | Bin 0 -> 14919 bytes .../Assets/Square150x150Logo.scale-100.png | Bin 0 -> 7001 bytes .../Assets/Square310x310Logo.scale-100.png | Bin 0 -> 14490 bytes .../Assets/Square44x44Logo.scale-100.png | Bin 0 -> 2067 bytes .../Assets/Square71x71Logo.scale-100.png | Bin 0 -> 3369 bytes .../Assets/StoreLogo.scale-100.png | Bin 0 -> 2339 bytes .../Assets/Wide310x150Logo.scale-100.png | Bin 0 -> 7390 bytes 10 files changed, 2410 insertions(+) create mode 100644 platform/winrt/export/export.cpp create mode 100644 platform/winrt/export/export.h create mode 100644 tools/dist/uwp_template/AppxManifest.xml create mode 100644 tools/dist/uwp_template/Assets/SplashScreen.scale-100.png create mode 100644 tools/dist/uwp_template/Assets/Square150x150Logo.scale-100.png create mode 100644 tools/dist/uwp_template/Assets/Square310x310Logo.scale-100.png create mode 100644 tools/dist/uwp_template/Assets/Square44x44Logo.scale-100.png create mode 100644 tools/dist/uwp_template/Assets/Square71x71Logo.scale-100.png create mode 100644 tools/dist/uwp_template/Assets/StoreLogo.scale-100.png create mode 100644 tools/dist/uwp_template/Assets/Wide310x150Logo.scale-100.png diff --git a/platform/winrt/export/export.cpp b/platform/winrt/export/export.cpp new file mode 100644 index 00000000000..9a99cefc281 --- /dev/null +++ b/platform/winrt/export/export.cpp @@ -0,0 +1,2349 @@ +/*************************************************************************/ +/* export.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is 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 Software. */ +/* */ +/* 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 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 */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ + +/************************************************************************* + * The code for signing the package was ported from fb-util-for-appx + * available at https://github.com/facebook/fb-util-for-appx + * and distributed also under the following license: + +BSD License + +For fb-util-for-appx software + +Copyright (c) 2016, Facebook, Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name Facebook nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*************************************************************************/ + +#include "export.h" +#include "bind/core_bind.h" +#include "globals.h" +#include "io/base64.h" +#include "io/marshalls.h" +#include "io/sha256.h" +#include "io/unzip.h" +#include "io/zip.h" +#include "io/zip_io.h" +#include "object.h" +#include "os/file_access.h" +#include "platform/winrt/logo.h" +#include "tools/editor/editor_import_export.h" +#include "tools/editor/editor_node.h" +#include "version.h" + +#include + +#ifdef OPENSSL_ENABLED +#include +#include +#include +#include +#include +#include +#include +#include + +// Capabilities +static const char *uwp_capabilities[] = { + "allJoyn", + "codeGeneration", + "internetClient", + "internetClientServer", + "privateNetworkClientServer", + NULL +}; +static const char *uwp_uap_capabilities[] = { + "appointments", + "blockedChatMessages", + "chat", + "contacts", + "enterpriseAuthentication", + "musicLibrary", + "objects3D", + "picturesLibrary", + "phoneCall", + "removableStorage", + "sharedUserCertificates", + "userAccountInformation", + "videosLibrary", + "voipCall", + NULL +}; +static const char *uwp_device_capabilites[] = { + "bluetooth", + "location", + "microphone", + "proximity", + "webcam", + NULL +}; + +namespace asn1 { +// https://msdn.microsoft.com/en-us/gg463180.aspx + +struct SPCStatementType { + ASN1_OBJECT *type; +}; +DECLARE_ASN1_FUNCTIONS(SPCStatementType) + +struct SPCSpOpusInfo { + ASN1_TYPE *programName; + ASN1_TYPE *moreInfo; +}; +DECLARE_ASN1_FUNCTIONS(SPCSpOpusInfo) + +struct DigestInfo { + X509_ALGOR *digestAlgorithm; + ASN1_OCTET_STRING *digest; +}; +DECLARE_ASN1_FUNCTIONS(DigestInfo) + +struct SPCAttributeTypeAndOptionalValue { + ASN1_OBJECT *type; + ASN1_TYPE *value; // SPCInfoValue +}; +DECLARE_ASN1_FUNCTIONS(SPCAttributeTypeAndOptionalValue) + +// Undocumented. +struct SPCInfoValue { + ASN1_INTEGER *i1; + ASN1_OCTET_STRING *s1; + ASN1_INTEGER *i2; + ASN1_INTEGER *i3; + ASN1_INTEGER *i4; + ASN1_INTEGER *i5; + ASN1_INTEGER *i6; +}; +DECLARE_ASN1_FUNCTIONS(SPCInfoValue) + +struct SPCIndirectDataContent { + SPCAttributeTypeAndOptionalValue *data; + DigestInfo *messageDigest; +}; +DECLARE_ASN1_FUNCTIONS(SPCIndirectDataContent) + +IMPLEMENT_ASN1_FUNCTIONS(SPCIndirectDataContent) +ASN1_SEQUENCE(SPCIndirectDataContent) = { + ASN1_SIMPLE(SPCIndirectDataContent, data, + SPCAttributeTypeAndOptionalValue), + ASN1_SIMPLE(SPCIndirectDataContent, messageDigest, DigestInfo), +} ASN1_SEQUENCE_END(SPCIndirectDataContent) + + IMPLEMENT_ASN1_FUNCTIONS(SPCAttributeTypeAndOptionalValue) ASN1_SEQUENCE(SPCAttributeTypeAndOptionalValue) = { + ASN1_SIMPLE(SPCAttributeTypeAndOptionalValue, type, ASN1_OBJECT), ASN1_OPT(SPCAttributeTypeAndOptionalValue, value, ASN1_ANY), + } ASN1_SEQUENCE_END(SPCAttributeTypeAndOptionalValue) + + IMPLEMENT_ASN1_FUNCTIONS(SPCInfoValue) ASN1_SEQUENCE(SPCInfoValue) = { + ASN1_SIMPLE(SPCInfoValue, i1, ASN1_INTEGER), ASN1_SIMPLE(SPCInfoValue, s1, ASN1_OCTET_STRING), ASN1_SIMPLE(SPCInfoValue, i2, ASN1_INTEGER), ASN1_SIMPLE(SPCInfoValue, i3, ASN1_INTEGER), ASN1_SIMPLE(SPCInfoValue, i4, ASN1_INTEGER), ASN1_SIMPLE(SPCInfoValue, i5, ASN1_INTEGER), ASN1_SIMPLE(SPCInfoValue, i6, ASN1_INTEGER), + } ASN1_SEQUENCE_END(SPCInfoValue) + + IMPLEMENT_ASN1_FUNCTIONS(DigestInfo) ASN1_SEQUENCE(DigestInfo) = { + ASN1_SIMPLE(DigestInfo, digestAlgorithm, X509_ALGOR), ASN1_SIMPLE(DigestInfo, digest, ASN1_OCTET_STRING), + } ASN1_SEQUENCE_END(DigestInfo) + + ASN1_SEQUENCE(SPCSpOpusInfo) = { + ASN1_OPT(SPCSpOpusInfo, programName, ASN1_ANY), ASN1_OPT(SPCSpOpusInfo, moreInfo, ASN1_ANY), + } ASN1_SEQUENCE_END(SPCSpOpusInfo) IMPLEMENT_ASN1_FUNCTIONS(SPCSpOpusInfo) + + ASN1_SEQUENCE(SPCStatementType) = { + ASN1_SIMPLE(SPCStatementType, type, ASN1_OBJECT), + } ASN1_SEQUENCE_END(SPCStatementType) IMPLEMENT_ASN1_FUNCTIONS(SPCStatementType) +} // namespace asn1 + +class EncodedASN1 { + + uint8_t *i_data; + size_t i_size; + + EncodedASN1(uint8_t **p_data, size_t p_size) { + + i_data = *p_data; + i_size = p_size; + } + +public: + template + static EncodedASN1 FromItem(T *item) { + uint8_t *dataRaw = NULL; + int size = TEncode(item, &dataRaw); + + return EncodedASN1(&dataRaw, size); + } + + const uint8_t *data() const { + return i_data; + } + + size_t size() const { + return i_size; + } + + // Assumes the encoded ASN.1 represents a SEQUENCE and puts it into + // an ASN1_STRING. + // + // The returned object holds a copy of this object's data. + ASN1_STRING *ToSequenceString() { + ASN1_STRING *string = ASN1_STRING_new(); + if (!string) { + return NULL; + } + if (!ASN1_STRING_set(string, i_data, i_size)) { + return NULL; + } + return string; + } + + // Assumes the encoded ASN.1 represents a SEQUENCE and puts it into + // an ASN1_TYPE. + // + // The returned object holds a copy of this object's data. + ASN1_TYPE *ToSequenceType() { + ASN1_STRING *string = ToSequenceString(); + ASN1_TYPE *type = ASN1_TYPE_new(); + if (!type) { + return NULL; + } + type->type = V_ASN1_SEQUENCE; + type->value.sequence = string; + return type; + } +}; + +#endif // OPENSSL_ENABLED + +class AppxPackager { + + enum { + FILE_HEADER_MAGIC = 0x04034b50, + DATA_DESCRIPTOR_MAGIC = 0x08074b50, + CENTRAL_DIR_MAGIC = 0x02014b50, + END_OF_CENTRAL_DIR_MAGIC = 0x06054b50, + ZIP64_END_OF_CENTRAL_DIR_MAGIC = 0x06064b50, + ZIP64_END_DIR_LOCATOR_MAGIC = 0x07064b50, + P7X_SIGNATURE = 0x58434b50, + ZIP64_HEADER_ID = 0x0001, + ZIP_VERSION = 20, + ZIP_ARCHIVE_VERSION = 45, + GENERAL_PURPOSE = 0x00, + BASE_FILE_HEADER_SIZE = 30, + DATA_DESCRIPTOR_SIZE = 24, + BASE_CENTRAL_DIR_SIZE = 46, + EXTRA_FIELD_LENGTH = 28, + ZIP64_HEADER_SIZE = 24, + ZIP64_END_OF_CENTRAL_DIR_SIZE = (56 - 12), + END_OF_CENTRAL_DIR_SIZE = 42, + BLOCK_SIZE = 65536, + }; + + struct BlockHash { + + String base64_hash; + size_t compressed_size; + }; + + struct FileMeta { + + String name; + int lfh_size; + bool compressed; + size_t compressed_size; + size_t uncompressed_size; + Vector hashes; + uLong file_crc32; + ZPOS64_T zip_offset; + }; + + String progress_task; + FileAccess *package; + String tmp_blockmap_file_path; + String tmp_content_types_file_path; + + Set mime_types; + + Vector file_metadata; + + ZPOS64_T central_dir_offset; + ZPOS64_T end_of_central_dir_offset; + Vector central_dir_data; + + String hash_block(uint8_t *p_block_data, size_t p_block_len); + + void make_block_map(); + void make_content_types(); + + _FORCE_INLINE_ unsigned int buf_put_int16(uint16_t p_val, uint8_t *p_buf) { + for (int i = 0; i < 2; i++) { + *p_buf++ = (p_val >> (i * 8)) & 0xFF; + } + return 2; + } + + _FORCE_INLINE_ unsigned int buf_put_int32(uint32_t p_val, uint8_t *p_buf) { + for (int i = 0; i < 4; i++) { + *p_buf++ = (p_val >> (i * 8)) & 0xFF; + } + return 4; + } + + _FORCE_INLINE_ unsigned int buf_put_int64(uint64_t p_val, uint8_t *p_buf) { + for (int i = 0; i < 8; i++) { + *p_buf++ = (p_val >> (i * 8)) & 0xFF; + } + return 8; + } + + _FORCE_INLINE_ unsigned int buf_put_string(String p_val, uint8_t *p_buf) { + for (int i = 0; i < p_val.length(); i++) { + *p_buf++ = p_val.utf8().get(i); + } + return p_val.length(); + } + + Vector make_file_header(FileMeta p_file_meta); + void store_central_dir_header(const FileMeta p_file, bool p_do_hash = true); + Vector make_end_of_central_record(); + + String content_type(String p_extension); + +#ifdef OPENSSL_ENABLED + + // Signing methods and structs: + + String certificate_path; + String certificate_pass; + bool sign_package; + + struct CertFile { + + EVP_PKEY *private_key; + X509 *certificate; + }; + + SHA256_CTX axpc_context; // SHA256 context for ZIP file entries + SHA256_CTX axcd_context; // SHA256 context for ZIP directory entries + + struct AppxDigests { + + uint8_t axpc[SHA256_DIGEST_LENGTH]; // ZIP file entries + uint8_t axcd[SHA256_DIGEST_LENGTH]; // ZIP directory entry + uint8_t axct[SHA256_DIGEST_LENGTH]; // Content types XML + uint8_t axbm[SHA256_DIGEST_LENGTH]; // Block map XML + uint8_t axci[SHA256_DIGEST_LENGTH]; // Code Integrity file (optional) + }; + + CertFile cert_file; + AppxDigests digests; + + void MakeSPCInfoValue(asn1::SPCInfoValue &info); + Error MakeIndirectDataContent(asn1::SPCIndirectDataContent &idc); + Error add_attributes(PKCS7_SIGNER_INFO *signerInfo); + void make_digests(); + void write_digest(Vector &p_out_buffer); + + Error openssl_error(unsigned long p_err); + Error read_cert_file(const String &p_path, const String &p_password, CertFile *p_out_cf); + Error sign(const CertFile &p_cert, const AppxDigests &digests, PKCS7 *p_out_signature); + +#endif // OPENSSL_ENABLED + +public: + enum SignOption { + + SIGN, + DONT_SIGN, + }; + + void set_progress_task(String p_task) { progress_task = p_task; } + void init(FileAccess *p_fa, SignOption p_sign, String &p_certificate_path, String &p_certificate_password); + void add_file(String p_file_name, const uint8_t *p_buffer, size_t p_len, int p_file_no, int p_total_files, bool p_compress = false); + void finish(); + + AppxPackager(); + ~AppxPackager(); +}; + +class EditorExportPlatformWinrt : public EditorExportPlatform { + + OBJ_TYPE(EditorExportPlatformWinrt, EditorExportPlatform); + + Ref logo; + + enum Platform { + ARM, + X86, + X64 + } arch; + + bool is_debug; + + String custom_release_package; + String custom_debug_package; + + String cmdline; + + String display_name; + String short_name; + String unique_name; + String description; + String publisher; + String publisher_display_name; + + String product_guid; + String publisher_guid; + + int version_major; + int version_minor; + int version_build; + int version_revision; + + bool orientation_landscape; + bool orientation_portrait; + bool orientation_landscape_flipped; + bool orientation_portrait_flipped; + + String background_color; + Ref store_logo; + Ref square44; + Ref square71; + Ref square150; + Ref square310; + Ref wide310; + Ref splash; + + bool name_on_square150; + bool name_on_square310; + bool name_on_wide; + + Set capabilities; + Set uap_capabilities; + Set device_capabilities; + + bool sign_package; + String certificate_path; + String certificate_pass; + + _FORCE_INLINE_ bool array_has(const char **p_array, const char *p_value) const { + while (*p_array) { + if (String(*p_array) == String(p_value)) return true; + p_array++; + } + return false; + } + + bool _valid_resource_name(const String &p_name) const; + bool _valid_guid(const String &p_guid) const; + bool _valid_bgcolor(const String &p_color) const; + bool _valid_image(const Ref p_image, int p_width, int p_height) const; + + Vector _fix_manifest(const Vector &p_template, bool p_give_internet) const; + Vector _get_image_data(const String &p_path); + + static Error save_appx_file(void *p_userdata, const String &p_path, const Vector &p_data, int p_file, int p_total); + static bool _should_compress_asset(const String &p_path, const Vector &p_data); + +protected: + bool _set(const StringName &p_name, const Variant &p_value); + bool _get(const StringName &p_name, Variant &r_ret) const; + void _get_property_list(List *p_list) const; + +public: + virtual String get_name() const { return "Windows Universal"; } + virtual ImageCompression get_image_compression() const { return IMAGE_COMPRESSION_ETC1; } + virtual Ref get_logo() const { return logo; } + + virtual bool can_export(String *r_error = NULL) const; + virtual String get_binary_extension() const { return "appx"; } + + virtual Error export_project(const String &p_path, bool p_debug, int p_flags = 0); + + EditorExportPlatformWinrt(); + ~EditorExportPlatformWinrt(); +}; + +/////////////////////////////////////////////////////////////////////////// + +String AppxPackager::hash_block(uint8_t *p_block_data, size_t p_block_len) { + + char hash[32]; + char base64[45]; + + sha256_context ctx; + sha256_init(&ctx); + sha256_hash(&ctx, p_block_data, p_block_len); + sha256_done(&ctx, (uint8_t *)hash); + + base64_encode(base64, hash, 32); + base64[44] = '\0'; + + return String(base64); +} + +void AppxPackager::make_block_map() { + + FileAccess *tmp_file = FileAccess::open(tmp_blockmap_file_path, FileAccess::WRITE); + + tmp_file->store_string(""); + tmp_file->store_string(""); + + for (int i = 0; i < file_metadata.size(); i++) { + + FileMeta file = file_metadata[i]; + + tmp_file->store_string( + ""); + + for (int j = 0; j < file.hashes.size(); j++) { + + tmp_file->store_string("store_string("Size=\"" + itos(file.hashes[j].compressed_size) + "\" "); + tmp_file->store_string("/>"); + } + + tmp_file->store_string(""); + } + + tmp_file->store_string(""); + + tmp_file->close(); + memdelete(tmp_file); + tmp_file = NULL; +} + +String AppxPackager::content_type(String p_extension) { + + if (p_extension == "png") + return "image/png"; + else if (p_extension == "jpg") + return "image/jpg"; + else if (p_extension == "xml") + return "application/xml"; + else if (p_extension == "exe" || p_extension == "dll") + return "application/x-msdownload"; + else + return "application/octet-stream"; +} + +void AppxPackager::make_content_types() { + + FileAccess *tmp_file = FileAccess::open(tmp_content_types_file_path, FileAccess::WRITE); + + tmp_file->store_string(""); + tmp_file->store_string(""); + + Map types; + + for (int i = 0; i < file_metadata.size(); i++) { + + String ext = file_metadata[i].name.extension(); + + if (types.has(ext)) continue; + + types[ext] = content_type(ext); + + tmp_file->store_string(""); + } + + // Appx signature file + tmp_file->store_string(""); + + // Override for package files + tmp_file->store_string(""); + tmp_file->store_string(""); + tmp_file->store_string(""); + tmp_file->store_string(""); + + tmp_file->store_string(""); + + tmp_file->close(); + memdelete(tmp_file); + tmp_file = NULL; +} + +Vector AppxPackager::make_file_header(FileMeta p_file_meta) { + + Vector buf; + buf.resize(BASE_FILE_HEADER_SIZE + p_file_meta.name.length()); + + int offs = 0; + // Write magic + offs += buf_put_int32(FILE_HEADER_MAGIC, &buf[offs]); + + // Version + offs += buf_put_int16(ZIP_VERSION, &buf[offs]); + + // Special flag + offs += buf_put_int16(GENERAL_PURPOSE, &buf[offs]); + + // Compression + offs += buf_put_int16(p_file_meta.compressed ? Z_DEFLATED : 0, &buf[offs]); + + // File date and time + offs += buf_put_int32(0, &buf[offs]); + + // CRC-32 + offs += buf_put_int32(p_file_meta.file_crc32, &buf[offs]); + + // Compressed size + offs += buf_put_int32(p_file_meta.compressed_size, &buf[offs]); + + // Uncompressed size + offs += buf_put_int32(p_file_meta.uncompressed_size, &buf[offs]); + + // File name length + offs += buf_put_int16(p_file_meta.name.length(), &buf[offs]); + + // Extra data length + offs += buf_put_int16(0, &buf[offs]); + + // File name + offs += buf_put_string(p_file_meta.name, &buf[offs]); + + // Done! + return buf; +} + +void AppxPackager::store_central_dir_header(const FileMeta p_file, bool p_do_hash) { + + Vector &buf = central_dir_data; + int offs = buf.size(); + buf.resize(buf.size() + BASE_CENTRAL_DIR_SIZE + p_file.name.length()); + + // Write magic + offs += buf_put_int32(CENTRAL_DIR_MAGIC, &buf[offs]); + + // ZIP versions + offs += buf_put_int16(ZIP_ARCHIVE_VERSION, &buf[offs]); + offs += buf_put_int16(ZIP_VERSION, &buf[offs]); + + // General purpose flag + offs += buf_put_int16(GENERAL_PURPOSE, &buf[offs]); + + // Compression + offs += buf_put_int16(p_file.compressed ? Z_DEFLATED : 0, &buf[offs]); + + // Modification date/time + offs += buf_put_int32(0, &buf[offs]); + + // Crc-32 + offs += buf_put_int32(p_file.file_crc32, &buf[offs]); + + // File sizes + offs += buf_put_int32(p_file.compressed_size, &buf[offs]); + offs += buf_put_int32(p_file.uncompressed_size, &buf[offs]); + + // File name length + offs += buf_put_int16(p_file.name.length(), &buf[offs]); + + // Extra field length + offs += buf_put_int16(0, &buf[offs]); + + // Comment length + offs += buf_put_int16(0, &buf[offs]); + + // Disk number start, internal/external file attributes + for (int i = 0; i < 8; i++) { + buf[offs++] = 0; + } + + // Relative offset + offs += buf_put_int32(p_file.zip_offset, &buf[offs]); + + // File name + offs += buf_put_string(p_file.name, &buf[offs]); + +#ifdef OPENSSL_ENABLED + // Calculate the hash for signing + if (p_do_hash) + SHA256_Update(&axcd_context, buf.ptr(), buf.size()); +#endif // OPENSSL_ENABLED + + // Done! +} + +Vector AppxPackager::make_end_of_central_record() { + + Vector buf; + buf.resize(ZIP64_END_OF_CENTRAL_DIR_SIZE + 12 + END_OF_CENTRAL_DIR_SIZE); // Size plus magic + + int offs = 0; + + // Write magic + offs += buf_put_int32(ZIP64_END_OF_CENTRAL_DIR_MAGIC, &buf[offs]); + + // Size of this record + offs += buf_put_int64(ZIP64_END_OF_CENTRAL_DIR_SIZE, &buf[offs]); + + // Version (yes, twice) + offs += buf_put_int16(ZIP_ARCHIVE_VERSION, &buf[offs]); + offs += buf_put_int16(ZIP_ARCHIVE_VERSION, &buf[offs]); + + // Disk number + for (int i = 0; i < 8; i++) { + buf[offs++] = 0; + } + + // Number of entries (total and per disk) + offs += buf_put_int64(file_metadata.size(), &buf[offs]); + offs += buf_put_int64(file_metadata.size(), &buf[offs]); + + // Size of central dir + offs += buf_put_int64(central_dir_data.size(), &buf[offs]); + + // Central dir offset + offs += buf_put_int64(central_dir_offset, &buf[offs]); + + ////// ZIP64 locator + + // Write magic for zip64 central dir locator + offs += buf_put_int32(ZIP64_END_DIR_LOCATOR_MAGIC, &buf[offs]); + + // Disk number + for (int i = 0; i < 4; i++) { + buf[offs++] = 0; + } + + // Relative offset + offs += buf_put_int64(end_of_central_dir_offset, &buf[offs]); + + // Number of disks + offs += buf_put_int32(1, &buf[offs]); + + /////// End of zip directory + + // Write magic for end central dir + offs += buf_put_int32(END_OF_CENTRAL_DIR_MAGIC, &buf[offs]); + + // Dummy stuff for Zip64 + for (int i = 0; i < 4; i++) { + buf[offs++] = 0x0; + } + for (int i = 0; i < 12; i++) { + buf[offs++] = 0xFF; + } + + // Size of comments + for (int i = 0; i < 2; i++) { + buf[offs++] = 0; + } + + // Done! + return buf; +} + +void AppxPackager::init(FileAccess *p_fa, SignOption p_sign, String &p_certificate_path, String &p_certificate_password) { + + package = p_fa; + central_dir_offset = 0; + end_of_central_dir_offset = 0; + tmp_blockmap_file_path = EditorSettings::get_singleton()->get_settings_path() + "/tmp/tmpblockmap.xml"; + tmp_content_types_file_path = EditorSettings::get_singleton()->get_settings_path() + "/tmp/tmpcontenttypes.xml"; +#ifdef OPENSSL_ENABLED + certificate_path = p_certificate_path; + certificate_pass = p_certificate_password; + sign_package = p_sign == SIGN; + SHA256_Init(&axpc_context); + SHA256_Init(&axcd_context); +#endif // OPENSSL_ENABLED +} + +void AppxPackager::add_file(String p_file_name, const uint8_t *p_buffer, size_t p_len, int p_file_no, int p_total_files, bool p_compress) { + + if (p_file_no >= 1 && p_total_files >= 1) { + EditorNode::progress_task_step(progress_task, "File: " + p_file_name, (p_file_no * 100) / p_total_files); + } + + bool do_hash = p_file_name != "AppxSignature.p7x"; + + FileMeta meta; + meta.name = p_file_name; + meta.uncompressed_size = p_len; + meta.compressed_size = p_len; + meta.compressed = p_compress; + meta.zip_offset = package->get_pos(); + + Vector file_buffer; + + // Data for compression + z_stream strm; + FileAccess *strm_f = NULL; + Vector strm_in; + strm_in.resize(BLOCK_SIZE); + Vector strm_out; + + if (p_compress) { + + strm.zalloc = zipio_alloc; + strm.zfree = zipio_free; + strm.opaque = &strm_f; + + strm_out.resize(BLOCK_SIZE + 8); + + deflateInit2(&strm, Z_DEFAULT_COMPRESSION, Z_DEFLATED, -15, 8, Z_DEFAULT_STRATEGY); + } + + int step = 0; + + while (p_len - step > 0) { + + size_t block_size = (p_len - step) > BLOCK_SIZE ? BLOCK_SIZE : (p_len - step); + + for (int i = 0; i < block_size; i++) { + strm_in[i] = p_buffer[step + i]; + } + + BlockHash bh; + bh.base64_hash = hash_block(strm_in.ptr(), block_size); + + if (p_compress) { + + strm.avail_in = block_size; + strm.avail_out = strm_out.size(); + strm.next_in = strm_in.ptr(); + strm.next_out = strm_out.ptr(); + + int total_out_before = strm.total_out; + + deflate(&strm, Z_FULL_FLUSH); + bh.compressed_size = strm.total_out - total_out_before; + + //package->store_buffer(strm_out.ptr(), strm.total_out - total_out_before); + int start = file_buffer.size(); + file_buffer.resize(file_buffer.size() + bh.compressed_size); + for (int i = 0; i < bh.compressed_size; i++) + file_buffer[start + i] = strm_out[i]; +#ifdef OPENSSL_ENABLED + if (do_hash) + SHA256_Update(&axpc_context, strm_out.ptr(), strm.total_out - total_out_before); +#endif // OPENSSL_ENABLED + + } else { + bh.compressed_size = block_size; + //package->store_buffer(strm_in.ptr(), block_size); + int start = file_buffer.size(); + file_buffer.resize(file_buffer.size() + block_size); + for (int i = 0; i < bh.compressed_size; i++) + file_buffer[start + i] = strm_in[i]; +#ifdef OPENSSL_ENABLED + if (do_hash) + SHA256_Update(&axpc_context, strm_in.ptr(), block_size); +#endif // OPENSSL_ENABLED + } + + meta.hashes.push_back(bh); + + step += block_size; + } + + if (p_compress) { + + strm.avail_in = 0; + strm.avail_out = strm_out.size(); + strm.next_in = strm_in.ptr(); + strm.next_out = strm_out.ptr(); + + int total_out_before = strm.total_out; + + deflate(&strm, Z_FINISH); + + //package->store_buffer(strm_out.ptr(), strm.total_out - total_out_before); + int start = file_buffer.size(); + file_buffer.resize(file_buffer.size() + (strm.total_out - total_out_before)); + for (int i = 0; i < (strm.total_out - total_out_before); i++) + file_buffer[start + i] = strm_out[i]; +#ifdef OPENSSL_ENABLED + if (do_hash) + SHA256_Update(&axpc_context, strm_out.ptr(), strm.total_out - total_out_before); +#endif // OPENSSL_ENABLED + + deflateEnd(&strm); + meta.compressed_size = strm.total_out; + + } else { + + meta.compressed_size = p_len; + } + + // Calculate file CRC-32 + uLong crc = crc32(0L, Z_NULL, 0); + crc = crc32(crc, p_buffer, p_len); + meta.file_crc32 = crc; + + // Create file header + Vector file_header = make_file_header(meta); + meta.lfh_size = file_header.size(); + +#ifdef OPENSSL_ENABLED + // Hash the data for signing + if (do_hash) { + SHA256_Update(&axpc_context, file_header.ptr(), file_header.size()); + SHA256_Update(&axpc_context, file_buffer.ptr(), file_buffer.size()); + } +#endif // OPENSSL_ENABLED + + // Store the header and file; + package->store_buffer(file_header.ptr(), file_header.size()); + package->store_buffer(file_buffer.ptr(), file_buffer.size()); + + file_metadata.push_back(meta); +} + +void AppxPackager::finish() { + + // Create and add block map file + EditorNode::progress_task_step("export", "Creating block map...", 4); + + make_block_map(); + FileAccess *blockmap_file = FileAccess::open(tmp_blockmap_file_path, FileAccess::READ); + Vector blockmap_buffer; + blockmap_buffer.resize(blockmap_file->get_len()); + + blockmap_file->get_buffer(blockmap_buffer.ptr(), blockmap_buffer.size()); + +#ifdef OPENSSL_ENABLED + // Hash the file for signing + if (sign_package) { + SHA256_CTX axbm_context; + SHA256_Init(&axbm_context); + SHA256_Update(&axbm_context, blockmap_buffer.ptr(), blockmap_buffer.size()); + SHA256_Final(digests.axbm, &axbm_context); + } +#endif // OPENSSL_ENABLED + + add_file("AppxBlockMap.xml", blockmap_buffer.ptr(), blockmap_buffer.size(), -1, -1, true); + + blockmap_file->close(); + memdelete(blockmap_file); + blockmap_file = NULL; + + // Add content types + EditorNode::progress_task_step("export", "Setting content types...", 5); + make_content_types(); + + FileAccess *types_file = FileAccess::open(tmp_content_types_file_path, FileAccess::READ); + Vector types_buffer; + types_buffer.resize(types_file->get_len()); + + types_file->get_buffer(types_buffer.ptr(), types_buffer.size()); + +#ifdef OPENSSL_ENABLED + if (sign_package) { + // Hash the file for signing + SHA256_CTX axct_context; + SHA256_Init(&axct_context); + SHA256_Update(&axct_context, types_buffer.ptr(), types_buffer.size()); + SHA256_Final(digests.axct, &axct_context); + } +#endif // OPENSSL_ENABLED + + add_file("[Content_Types].xml", types_buffer.ptr(), types_buffer.size(), -1, -1, true); + + types_file->close(); + memdelete(types_file); + types_file = NULL; + + // Pre-process central directory before signing + for (int i = 0; i < file_metadata.size(); i++) { + store_central_dir_header(file_metadata[i]); + } + +#ifdef OPENSSL_ENABLED + // Create the signature file + if (sign_package) { + + Error err = read_cert_file(certificate_path, certificate_pass, &cert_file); + + if (err != OK) { + EditorNode::add_io_error(TTR("Couldn't read the certficate file. Are the path and password both correct?")); + package->close(); + memdelete(package); + package = NULL; + return; + } + + // Make a temp end of the zip for hashing + central_dir_offset = package->get_pos(); + end_of_central_dir_offset = central_dir_offset + central_dir_data.size(); + Vector zip_end_dir = make_end_of_central_record(); + + // Hash the end directory + SHA256_Update(&axcd_context, zip_end_dir.ptr(), zip_end_dir.size()); + + // Finish the hashes + make_digests(); + + PKCS7 *signature = PKCS7_new(); + if (!signature) { + EditorNode::add_io_error(TTR("Error creating the signature object.")); + package->close(); + memdelete(package); + package = NULL; + return; + } + + err = sign(cert_file, digests, signature); + + if (err != OK) { + EditorNode::add_io_error(TTR("Error creating the package signature.")); + package->close(); + memdelete(package); + package = NULL; + return; + } + + // Read the signature as bytes + BIO *bio_out = BIO_new(BIO_s_mem()); + i2d_PKCS7_bio(bio_out, signature); + + BIO_flush(bio_out); + + uint8_t *bio_ptr; + size_t bio_size = BIO_get_mem_data(bio_out, &bio_ptr); + + // Create the signature buffer with magic number + Vector signature_file; + signature_file.resize(4 + bio_size); + buf_put_int32(P7X_SIGNATURE, signature_file.ptr()); + for (int i = 0; i < bio_size; i++) + signature_file[i + 4] = bio_ptr[i]; + + // Add the signature to the package + add_file("AppxSignature.p7x", signature_file.ptr(), signature_file.size(), -1, -1, true); + + // Add central directory entry + store_central_dir_header(file_metadata[file_metadata.size() - 1], false); + } +#endif // OPENSSL_ENABLED + + // Write central directory + EditorNode::progress_task_step("export", "Finishing package...", 6); + central_dir_offset = package->get_pos(); + package->store_buffer(central_dir_data.ptr(), central_dir_data.size()); + + // End record + end_of_central_dir_offset = package->get_pos(); + Vector end_record = make_end_of_central_record(); + package->store_buffer(end_record.ptr(), end_record.size()); + + package->close(); + memdelete(package); + package = NULL; +} + +#ifdef OPENSSL_ENABLED +// https://support.microsoft.com/en-us/kb/287547 +const char SPC_INDIRECT_DATA_OBJID[] = "1.3.6.1.4.1.311.2.1.4"; +const char SPC_STATEMENT_TYPE_OBJID[] = "1.3.6.1.4.1.311.2.1.11"; +const char SPC_SP_OPUS_INFO_OBJID[] = "1.3.6.1.4.1.311.2.1.12"; +const char SPC_SIPINFO_OBJID[] = "1.3.6.1.4.1.311.2.1.30"; +#endif // OPENSSL_ENABLED + +AppxPackager::AppxPackager() {} + +AppxPackager::~AppxPackager() {} + +//////////////////////////////////////////////////////////////////// + +#ifdef OPENSSL_ENABLED +Error AppxPackager::openssl_error(unsigned long p_err) { + + ERR_load_crypto_strings(); + + char buffer[256]; + ERR_error_string_n(p_err, buffer, sizeof(buffer)); + + String err(buffer); + + ERR_EXPLAIN(err); + ERR_FAIL_V(FAILED); +} + +void AppxPackager::MakeSPCInfoValue(asn1::SPCInfoValue &info) { + + // I have no idea what these numbers mean. + static uint8_t s1Magic[] = { + 0x4B, 0xDF, 0xC5, 0x0A, 0x07, 0xCE, 0xE2, 0x4D, + 0xB7, 0x6E, 0x23, 0xC8, 0x39, 0xA0, 0x9F, 0xD1, + }; + ASN1_INTEGER_set(info.i1, 0x01010000); + ASN1_OCTET_STRING_set(info.s1, s1Magic, sizeof(s1Magic)); + ASN1_INTEGER_set(info.i2, 0x00000000); + ASN1_INTEGER_set(info.i3, 0x00000000); + ASN1_INTEGER_set(info.i4, 0x00000000); + ASN1_INTEGER_set(info.i5, 0x00000000); + ASN1_INTEGER_set(info.i6, 0x00000000); +} + +Error AppxPackager::MakeIndirectDataContent(asn1::SPCIndirectDataContent &idc) { + + using namespace asn1; + + ASN1_TYPE *algorithmParameter = ASN1_TYPE_new(); + if (!algorithmParameter) { + return openssl_error(ERR_peek_last_error()); + } + algorithmParameter->type = V_ASN1_NULL; + + SPCInfoValue *infoValue = SPCInfoValue_new(); + if (!infoValue) { + return openssl_error(ERR_peek_last_error()); + } + MakeSPCInfoValue(*infoValue); + + ASN1_TYPE *value = + EncodedASN1::FromItem(infoValue) + .ToSequenceType(); + + { + Vector digest; + write_digest(digest); + if (!ASN1_OCTET_STRING_set(idc.messageDigest->digest, + digest.ptr(), digest.size())) { + + return openssl_error(ERR_peek_last_error()); + } + } + + idc.data->type = OBJ_txt2obj(SPC_SIPINFO_OBJID, 1); + idc.data->value = value; + idc.messageDigest->digestAlgorithm->algorithm = OBJ_nid2obj(NID_sha256); + idc.messageDigest->digestAlgorithm->parameter = algorithmParameter; + + return OK; +} + +Error AppxPackager::add_attributes(PKCS7_SIGNER_INFO *p_signer_info) { + + // Add opus attribute + asn1::SPCSpOpusInfo *opus = asn1::SPCSpOpusInfo_new(); + if (!opus) return openssl_error(ERR_peek_last_error()); + + ASN1_STRING *opus_value = EncodedASN1::FromItem(opus) + .ToSequenceString(); + + if (!PKCS7_add_signed_attribute( + p_signer_info, + OBJ_txt2nid(SPC_SP_OPUS_INFO_OBJID), + V_ASN1_SEQUENCE, + opus_value)) { + + asn1::SPCSpOpusInfo_free(opus); + + ASN1_STRING_free(opus_value); + return openssl_error(ERR_peek_last_error()); + } + + // Add content type attribute + if (!PKCS7_add_signed_attribute( + p_signer_info, + NID_pkcs9_contentType, + V_ASN1_OBJECT, + OBJ_txt2obj(SPC_INDIRECT_DATA_OBJID, 1))) { + + asn1::SPCSpOpusInfo_free(opus); + ASN1_STRING_free(opus_value); + return openssl_error(ERR_peek_last_error()); + } + + // Add statement type attribute + asn1::SPCStatementType *statement_type = asn1::SPCStatementType_new(); + if (!statement_type) return openssl_error(ERR_peek_last_error()); + + statement_type->type = OBJ_nid2obj(NID_ms_code_ind); + ASN1_STRING *statement_type_value = + EncodedASN1::FromItem(statement_type) + .ToSequenceString(); + + if (!PKCS7_add_signed_attribute( + p_signer_info, + OBJ_txt2nid(SPC_STATEMENT_TYPE_OBJID), + V_ASN1_SEQUENCE, + statement_type_value)) { + + ASN1_STRING_free(opus_value); + asn1::SPCStatementType_free(statement_type); + ASN1_STRING_free(statement_type_value); + + return openssl_error(ERR_peek_last_error()); + } + + return OK; +} + +void AppxPackager::make_digests() { + + // AXPC + SHA256_Final(digests.axpc, &axpc_context); + + // AXCD + SHA256_Final(digests.axcd, &axcd_context); + + // AXCI + for (int i = 0; i < SHA256_DIGEST_LENGTH; i++) + digests.axci[i] = 0; +} + +void AppxPackager::write_digest(Vector &p_out_buffer) { + + // Size of digests plus 6 32-bit magic numbers + p_out_buffer.resize((SHA256_DIGEST_LENGTH * 5) + (6 * 4)); + + int offs = 0; + + // APPX + uint32_t sig = 0x58505041; + offs += buf_put_int32(sig, &p_out_buffer[offs]); + + // AXPC + uint32_t axpc_sig = 0x43505841; + offs += buf_put_int32(axpc_sig, &p_out_buffer[offs]); + for (int i = 0; i < SHA256_DIGEST_LENGTH; i++) { + p_out_buffer[offs++] = digests.axpc[i]; + } + + // AXCD + uint32_t axcd_sig = 0x44435841; + offs += buf_put_int32(axcd_sig, &p_out_buffer[offs]); + for (int i = 0; i < SHA256_DIGEST_LENGTH; i++) { + p_out_buffer[offs++] = digests.axcd[i]; + } + + // AXCT + uint32_t axct_sig = 0x54435841; + offs += buf_put_int32(axct_sig, &p_out_buffer[offs]); + for (int i = 0; i < SHA256_DIGEST_LENGTH; i++) { + p_out_buffer[offs++] = digests.axct[i]; + } + + // AXBM + uint32_t axbm_sig = 0x4D425841; + offs += buf_put_int32(axbm_sig, &p_out_buffer[offs]); + for (int i = 0; i < SHA256_DIGEST_LENGTH; i++) { + p_out_buffer[offs++] = digests.axbm[i]; + } + + // AXCI + uint32_t axci_sig = 0x49435841; + offs += buf_put_int32(axci_sig, &p_out_buffer[offs]); + for (int i = 0; i < SHA256_DIGEST_LENGTH; i++) { + p_out_buffer[offs++] = digests.axci[i]; + } + + // Done! +} + +Error AppxPackager::read_cert_file(const String &p_path, const String &p_password, CertFile *p_out_cf) { + + ERR_FAIL_COND_V(!p_out_cf, ERR_INVALID_PARAMETER); + + BIO *bio = BIO_new_file(p_path.utf8().get_data(), "rb"); + if (!bio) { + return openssl_error(ERR_peek_last_error()); + } + + PKCS12 *data = d2i_PKCS12_bio(bio, NULL); + if (!data) { + BIO_free(bio); + return openssl_error(ERR_peek_last_error()); + } + + /* Fails to link with GCC, need to solve when implement signing + if (!PKCS12_parse(data, p_password.utf8().get_data(), &p_out_cf->private_key, &p_out_cf->certificate, NULL)) { + PKCS12_free(data); + BIO_free(bio); + return openssl_error(ERR_peek_last_error()); + }*/ + + if (!p_out_cf->private_key) { + PKCS12_free(data); + BIO_free(bio); + return openssl_error(ERR_peek_last_error()); + } + + if (!p_out_cf->certificate) { + PKCS12_free(data); + BIO_free(bio); + return openssl_error(ERR_peek_last_error()); + } + + PKCS12_free(data); + BIO_free(bio); + + return OK; +} + +Error AppxPackager::sign(const CertFile &p_cert, const AppxDigests &digests, PKCS7 *p_out_signature) { + + OpenSSL_add_all_algorithms(); + + // Register object IDs + OBJ_create_and_add_object(SPC_INDIRECT_DATA_OBJID, NULL, NULL); + OBJ_create_and_add_object(SPC_SIPINFO_OBJID, NULL, NULL); + OBJ_create_and_add_object(SPC_SP_OPUS_INFO_OBJID, NULL, NULL); + OBJ_create_and_add_object(SPC_STATEMENT_TYPE_OBJID, NULL, NULL); + + if (!PKCS7_set_type(p_out_signature, NID_pkcs7_signed)) { + + return openssl_error(ERR_peek_last_error()); + } + + PKCS7_SIGNER_INFO *signer_info = PKCS7_add_signature(p_out_signature, p_cert.certificate, p_cert.private_key, EVP_sha256()); + if (!signer_info) return openssl_error(ERR_peek_last_error()); + + add_attributes(signer_info); + + if (!PKCS7_content_new(p_out_signature, NID_pkcs7_data)) { + + return openssl_error(ERR_peek_last_error()); + } + + if (!PKCS7_add_certificate(p_out_signature, p_cert.certificate)) { + + return openssl_error(ERR_peek_last_error()); + } + + asn1::SPCIndirectDataContent *idc = asn1::SPCIndirectDataContent_new(); + + MakeIndirectDataContent(*idc); + EncodedASN1 idc_encoded = + EncodedASN1::FromItem(idc); + + BIO *signed_data = PKCS7_dataInit(p_out_signature, NULL); + + if (idc_encoded.size() < 2) { + + ERR_EXPLAIN("Invalid encoded size"); + ERR_FAIL_V(FAILED); + } + + if ((idc_encoded.data()[1] & 0x80) == 0x00) { + + ERR_EXPLAIN("Invalid encoded data"); + ERR_FAIL_V(FAILED); + } + + size_t skip = 4; + + if (BIO_write(signed_data, idc_encoded.data() + skip, idc_encoded.size() - skip) != idc_encoded.size() - skip) { + + return openssl_error(ERR_peek_last_error()); + } + if (BIO_flush(signed_data) != 1) { + + return openssl_error(ERR_peek_last_error()); + } + + if (!PKCS7_dataFinal(p_out_signature, signed_data)) { + + return openssl_error(ERR_peek_last_error()); + } + + PKCS7 *content = PKCS7_new(); + if (!content) { + + return openssl_error(ERR_peek_last_error()); + } + + content->type = OBJ_txt2obj(SPC_INDIRECT_DATA_OBJID, 1); + + ASN1_TYPE *idc_sequence = idc_encoded.ToSequenceType(); + content->d.other = idc_sequence; + + if (!PKCS7_set_content(p_out_signature, content)) { + + return openssl_error(ERR_peek_last_error()); + } + + return OK; +} + +#endif // OPENSSL_ENABLED + +//////////////////////////////////////////////////////////////////// + +bool EditorExportPlatformWinrt::_valid_resource_name(const String &p_name) const { + + if (p_name.empty()) return false; + if (p_name.ends_with(".")) return false; + + static const char *invalid_names[] = { + "CON", "PRN", "AUX", "NUL", "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", + "COM8", "COM9", "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", "LPT9", + NULL + }; + + const char **t = invalid_names; + while (*t) { + if (p_name == *t) return false; + t++; + } + + return true; +} + +bool EditorExportPlatformWinrt::_valid_guid(const String &p_guid) const { + + Vector parts = p_guid.split("-"); + + if (parts.size() != 5) return false; + if (parts[0].length() != 8) return false; + for (int i = 1; i < 4; i++) + if (parts[i].length() != 4) return false; + if (parts[4].length() != 12) return false; + + return true; +} + +bool EditorExportPlatformWinrt::_valid_bgcolor(const String &p_color) const { + + if (p_color.empty()) return true; + if (p_color.begins_with("#") && p_color.is_valid_html_color()) return true; + + // Colors from https://msdn.microsoft.com/en-us/library/windows/apps/dn934817.aspx + static const char *valid_colors[] = { + "aliceBlue", "antiqueWhite", "aqua", "aquamarine", "azure", "beige", + "bisque", "black", "blanchedAlmond", "blue", "blueViolet", "brown", + "burlyWood", "cadetBlue", "chartreuse", "chocolate", "coral", "cornflowerBlue", + "cornsilk", "crimson", "cyan", "darkBlue", "darkCyan", "darkGoldenrod", + "darkGray", "darkGreen", "darkKhaki", "darkMagenta", "darkOliveGreen", "darkOrange", + "darkOrchid", "darkRed", "darkSalmon", "darkSeaGreen", "darkSlateBlue", "darkSlateGray", + "darkTurquoise", "darkViolet", "deepPink", "deepSkyBlue", "dimGray", "dodgerBlue", + "firebrick", "floralWhite", "forestGreen", "fuchsia", "gainsboro", "ghostWhite", + "gold", "goldenrod", "gray", "green", "greenYellow", "honeydew", + "hotPink", "indianRed", "indigo", "ivory", "khaki", "lavender", + "lavenderBlush", "lawnGreen", "lemonChiffon", "lightBlue", "lightCoral", "lightCyan", + "lightGoldenrodYellow", "lightGreen", "lightGray", "lightPink", "lightSalmon", "lightSeaGreen", + "lightSkyBlue", "lightSlateGray", "lightSteelBlue", "lightYellow", "lime", "limeGreen", + "linen", "magenta", "maroon", "mediumAquamarine", "mediumBlue", "mediumOrchid", + "mediumPurple", "mediumSeaGreen", "mediumSlateBlue", "mediumSpringGreen", "mediumTurquoise", "mediumVioletRed", + "midnightBlue", "mintCream", "mistyRose", "moccasin", "navajoWhite", "navy", + "oldLace", "olive", "oliveDrab", "orange", "orangeRed", "orchid", + "paleGoldenrod", "paleGreen", "paleTurquoise", "paleVioletRed", "papayaWhip", "peachPuff", + "peru", "pink", "plum", "powderBlue", "purple", "red", + "rosyBrown", "royalBlue", "saddleBrown", "salmon", "sandyBrown", "seaGreen", + "seaShell", "sienna", "silver", "skyBlue", "slateBlue", "slateGray", + "snow", "springGreen", "steelBlue", "tan", "teal", "thistle", + "tomato", "transparent", "turquoise", "violet", "wheat", "white", + "whiteSmoke", "yellow", "yellowGreen", + NULL + }; + + const char **color = valid_colors; + + while (*color) { + if (p_color == *color) return true; + color++; + } + + return false; +} + +bool EditorExportPlatformWinrt::_valid_image(const Ref p_image, int p_width, int p_height) const { + + if (!p_image.is_valid()) return false; + + // TODO: Add resource creation or image rescaling to enable other scales: + // 1.25, 1.5, 2.0 + real_t scales[] = { 1.0 }; + bool valid_w = false; + bool valid_h = false; + + for (int i = 0; i < 1; i++) { + + int w = ceil(p_width * scales[i]); + int h = ceil(p_height * scales[i]); + + if (w == p_image->get_width()) + valid_w = true; + if (h == p_image->get_height()) + valid_h = true; + } + + return valid_w && valid_h; +} + +Vector EditorExportPlatformWinrt::_fix_manifest(const Vector &p_template, bool p_give_internet) const { + + String result = String::utf8((const char *)p_template.ptr(), p_template.size()); + + result = result.replace("$godot_version$", VERSION_FULL_NAME); + + result = result.replace("$identity_name$", unique_name); + result = result.replace("$publisher$", publisher); + + result = result.replace("$product_guid$", product_guid); + result = result.replace("$publisher_guid$", publisher_guid); + + String version = itos(version_major) + "." + itos(version_minor) + "." + itos(version_build) + "." + itos(version_revision); + result = result.replace("$version_string$", version); + + String architecture = arch == ARM ? "ARM" : arch == X86 ? "x86" : "x64"; + result = result.replace("$architecture$", architecture); + + result = result.replace("$display_name$", display_name.empty() ? (String)Globals::get_singleton()->get("application/name") : display_name); + result = result.replace("$publisher_display_name$", publisher_display_name); + result = result.replace("$app_description$", description); + result = result.replace("$bg_color$", background_color); + result = result.replace("$short_name$", short_name); + + String name_on_tiles = ""; + if (name_on_square150) { + name_on_tiles += " \n"; + } + if (name_on_wide) { + name_on_tiles += " \n"; + } + if (name_on_square310) { + name_on_tiles += " \n"; + } + + String show_name_on_tiles = ""; + if (!name_on_tiles.empty()) { + show_name_on_tiles = "\n" + name_on_tiles + " "; + } + + result = result.replace("$name_on_tiles$", name_on_tiles); + + String rotations = ""; + if (orientation_landscape) { + rotations += " \n"; + } + if (orientation_portrait) { + rotations += " \n"; + } + if (orientation_landscape_flipped) { + rotations += " \n"; + } + if (orientation_portrait_flipped) { + rotations += " \n"; + } + + String rotation_preference = ""; + if (!rotations.empty()) { + rotation_preference = "\n" + rotations + " "; + } + + result = result.replace("$rotation_preference$", rotation_preference); + + String capabilities_elements = ""; + const char **basic = uwp_capabilities; + while (*basic) { + if (capabilities.has(*basic)) { + capabilities_elements += " \n"; + } + basic++; + } + const char **uap = uwp_uap_capabilities; + while (*uap) { + if (uap_capabilities.has(*uap)) { + capabilities_elements += " \n"; + } + uap++; + } + const char **device = uwp_device_capabilites; + while (*device) { + if (uap_capabilities.has(*device)) { + capabilities_elements += " \n"; + } + device++; + } + + if (!capabilities.has("internetClient") && p_give_internet) { + capabilities_elements += " \n"; + } + + String capabilities_string = ""; + if (!capabilities_elements.empty()) { + capabilities_string = "\n" + capabilities_elements + " "; + } + + result = result.replace("$capabilities_place$", capabilities_string); + + Vector r_ret; + r_ret.resize(result.length()); + + for (int i = 0; i < result.length(); i++) + r_ret[i] = result.utf8().get(i); + + return r_ret; +} + +Vector EditorExportPlatformWinrt::_get_image_data(const String &p_path) { + + Vector data; + Ref ref; + + if (p_path.find("StoreLogo") != -1) { + ref = store_logo; + } else if (p_path.find("Square44x44Logo") != -1) { + ref = square44; + } else if (p_path.find("Square71x71Logo") != -1) { + ref = square71; + } else if (p_path.find("Square150x150Logo") != -1) { + ref = square150; + } else if (p_path.find("Square310x310Logo") != -1) { + ref = square310; + } else if (p_path.find("Wide310x150Logo") != -1) { + ref = wide310; + } else if (p_path.find("SplashScreen") != -1) { + ref = splash; + } + + if (!ref.is_valid()) return data; + + String tmp_path = EditorSettings::get_singleton()->get_settings_path().plus_file("tmp/uwp_tmp_logo.png"); + + Error err = ref->get_data().save_png(tmp_path); + + if (err != OK) { + + String err_string = "Couldn't save temp logo file."; + + EditorNode::add_io_error(err_string); + ERR_EXPLAIN(err_string); + ERR_FAIL_V(data); + } + + FileAccess *f = FileAccess::open(tmp_path, FileAccess::READ, &err); + + if (err != OK) { + + String err_string = "Couldn't open temp logo file."; + + EditorNode::add_io_error(err_string); + ERR_EXPLAIN(err_string); + ERR_FAIL_V(data); + } + + data.resize(f->get_len()); + f->get_buffer(data.ptr(), data.size()); + + f->close(); + memdelete(f); + + // Delete temp file + DirAccess *dir = DirAccess::open(tmp_path.get_base_dir(), &err); + + if (err != OK) { + + String err_string = "Couldn't open temp path to remove temp logo file."; + + EditorNode::add_io_error(err_string); + ERR_EXPLAIN(err_string); + ERR_FAIL_V(data); + } + + err = dir->remove(tmp_path); + + memdelete(dir); + + if (err != OK) { + + String err_string = "Couldn't remove temp logo file."; + + EditorNode::add_io_error(err_string); + ERR_EXPLAIN(err_string); + ERR_FAIL_V(data); + } + + return data; +} + +Error EditorExportPlatformWinrt::save_appx_file(void *p_userdata, const String &p_path, const Vector &p_data, int p_file, int p_total) { + + AppxPackager *packager = (AppxPackager *)p_userdata; + String dst_path = p_path.replace_first("res://", "game/"); + + packager->add_file(dst_path, p_data.ptr(), p_data.size(), p_file, p_total, _should_compress_asset(p_path, p_data)); + + return OK; +} + +bool EditorExportPlatformWinrt::_should_compress_asset(const String &p_path, const Vector &p_data) { + + /* TODO: This was copied verbatim from Android export. It should be + * refactored to the parent class and also be used for .zip export. + */ + + /* + * By not compressing files with little or not benefit in doing so, + * a performance gain is expected at runtime. Moreover, if the APK is + * zip-aligned, assets stored as they are can be efficiently read by + * Android by memory-mapping them. + */ + + // -- Unconditional uncompress to mimic AAPT plus some other + + static const char *unconditional_compress_ext[] = { + // From https://github.com/android/platform_frameworks_base/blob/master/tools/aapt/Package.cpp + // These formats are already compressed, or don't compress well: + ".jpg", ".jpeg", ".png", ".gif", + ".wav", ".mp2", ".mp3", ".ogg", ".aac", + ".mpg", ".mpeg", ".mid", ".midi", ".smf", ".jet", + ".rtttl", ".imy", ".xmf", ".mp4", ".m4a", + ".m4v", ".3gp", ".3gpp", ".3g2", ".3gpp2", + ".amr", ".awb", ".wma", ".wmv", + // Godot-specific: + ".webp", // Same reasoning as .png + ".cfb", // Don't let small config files slow-down startup + // Trailer for easier processing + NULL + }; + + for (const char **ext = unconditional_compress_ext; *ext; ++ext) { + if (p_path.to_lower().ends_with(String(*ext))) { + return false; + } + } + + // -- Compressed resource? + + if (p_data.size() >= 4 && p_data[0] == 'R' && p_data[1] == 'S' && p_data[2] == 'C' && p_data[3] == 'C') { + // Already compressed + return false; + } + + // --- TODO: Decide on texture resources according to their image compression setting + + return true; +} + +bool EditorExportPlatformWinrt::_set(const StringName &p_name, const Variant &p_value) { + + String n = p_name; + + if (n == "architecture/target") + arch = (Platform)((int)p_value); + else if (n == "custom_package/debug") + custom_debug_package = p_value; + else if (n == "custom_package/release") + custom_release_package = p_value; + else if (n == "command_line/extra_args") + cmdline = p_value; + else if (n == "package/display_name") + display_name = p_value; + else if (n == "package/short_name") + short_name = p_value; + else if (n == "package/unique_name") + unique_name = p_value; + else if (n == "package/description") + description = p_value; + else if (n == "package/publisher") + publisher = p_value; + else if (n == "package/publisher_display_name") + publisher_display_name = p_value; + else if (n == "identity/product_guid") + product_guid = p_value; + else if (n == "identity/publisher_guid") + publisher_guid = p_value; + else if (n == "version/major") + version_major = p_value; + else if (n == "version/minor") + version_minor = p_value; + else if (n == "version/build") + version_build = p_value; + else if (n == "version/revision") + version_revision = p_value; + else if (n == "orientation/landscape") + orientation_landscape = p_value; + else if (n == "orientation/portrait") + orientation_portrait = p_value; + else if (n == "orientation/landscape_flipped") + orientation_landscape_flipped = p_value; + else if (n == "orientation/portrait_flipped") + orientation_portrait_flipped = p_value; + else if (n == "images/background_color") + background_color = p_value; + else if (n == "images/store_logo") + store_logo = p_value; + else if (n == "images/square44x44_logo") + square44 = p_value; + else if (n == "images/square71x71_logo") + square71 = p_value; + else if (n == "images/square150x150_logo") + square150 = p_value; + else if (n == "images/square310x310_logo") + square310 = p_value; + else if (n == "images/wide310x150_logo") + wide310 = p_value; + else if (n == "images/splash_screen") + splash = p_value; + else if (n == "tiles/show_name_on_square150x150") + name_on_square150 = p_value; + else if (n == "tiles/show_name_on_wide310x150") + name_on_wide = p_value; + else if (n == "tiles/show_name_on_square310x310") + name_on_square310 = p_value; + +#if 0 // Signing disabled + else if (n == "signing/sign") + sign_package = p_value; + else if (n == "signing/certificate_file") + certificate_path = p_value; + else if (n == "signing/certificate_password") + certificate_pass = p_value; +#endif + else if (n.begins_with("capabilities/")) { + + String what = n.get_slice("/", 1).replace("_", ""); + bool enable = p_value; + + if (array_has(uwp_capabilities, what.utf8().get_data())) { + + if (enable) + capabilities.insert(what); + else + capabilities.erase(what); + + } else if (array_has(uwp_uap_capabilities, what.utf8().get_data())) { + + if (enable) + uap_capabilities.insert(what); + else + uap_capabilities.erase(what); + + } else if (array_has(uwp_device_capabilites, what.utf8().get_data())) { + + if (enable) + device_capabilities.insert(what); + else + device_capabilities.erase(what); + } + } else + return false; + + return true; +} + +bool EditorExportPlatformWinrt::_get(const StringName &p_name, Variant &r_ret) const { + + String n = p_name; + + if (n == "architecture/target") + r_ret = (int)arch; + else if (n == "custom_package/debug") + r_ret = custom_debug_package; + else if (n == "custom_package/release") + r_ret = custom_release_package; + else if (n == "command_line/extra_args") + r_ret = cmdline; + else if (n == "package/display_name") + r_ret = display_name; + else if (n == "package/short_name") + r_ret = short_name; + else if (n == "package/unique_name") + r_ret = unique_name; + else if (n == "package/description") + r_ret = description; + else if (n == "package/publisher") + r_ret = publisher; + else if (n == "package/publisher_display_name") + r_ret = publisher_display_name; + else if (n == "identity/product_guid") + r_ret = product_guid; + else if (n == "identity/publisher_guid") + r_ret = publisher_guid; + else if (n == "version/major") + r_ret = version_major; + else if (n == "version/minor") + r_ret = version_minor; + else if (n == "version/build") + r_ret = version_build; + else if (n == "version/revision") + r_ret = version_revision; + else if (n == "orientation/landscape") + r_ret = orientation_landscape; + else if (n == "orientation/portrait") + r_ret = orientation_portrait; + else if (n == "orientation/landscape_flipped") + r_ret = orientation_landscape_flipped; + else if (n == "orientation/portrait_flipped") + r_ret = orientation_portrait_flipped; + else if (n == "images/background_color") + r_ret = background_color; + else if (n == "images/store_logo") + r_ret = store_logo; + else if (n == "images/square44x44_logo") + r_ret = square44; + else if (n == "images/square71x71_logo") + r_ret = square71; + else if (n == "images/square150x150_logo") + r_ret = square150; + else if (n == "images/square310x310_logo") + r_ret = square310; + else if (n == "images/wide310x150_logo") + r_ret = wide310; + else if (n == "images/splash_screen") + r_ret = splash; + else if (n == "tiles/show_name_on_square150x150") + r_ret = name_on_square150; + else if (n == "tiles/show_name_on_wide310x150") + r_ret = name_on_wide; + else if (n == "tiles/show_name_on_square310x310") + r_ret = name_on_square310; + +#if 0 // Signing disabled + else if (n == "signing/sign") + r_ret = sign_package; + else if (n == "signing/certificate_file") + r_ret = certificate_path; + else if (n == "signing/certificate_password") + r_ret = certificate_pass; +#endif + else if (n.begins_with("capabilities/")) { + + String what = n.get_slice("/", 1).replace("_", ""); + + if (array_has(uwp_capabilities, what.utf8().get_data())) { + + r_ret = capabilities.has(what); + + } else if (array_has(uwp_uap_capabilities, what.utf8().get_data())) { + + r_ret = uap_capabilities.has(what); + + } else if (array_has(uwp_device_capabilites, what.utf8().get_data())) { + + r_ret = device_capabilities.has(what); + } + } else + return false; + + return true; +} + +void EditorExportPlatformWinrt::_get_property_list(List *p_list) const { + + p_list->push_back(PropertyInfo(Variant::STRING, "custom_package/debug", PROPERTY_HINT_GLOBAL_FILE, "appx")); + p_list->push_back(PropertyInfo(Variant::STRING, "custom_package/release", PROPERTY_HINT_GLOBAL_FILE, "appx")); + + p_list->push_back(PropertyInfo(Variant::INT, "architecture/target", PROPERTY_HINT_ENUM, "ARM,x86,x64")); + + p_list->push_back(PropertyInfo(Variant::STRING, "command_line/extra_args")); + + p_list->push_back(PropertyInfo(Variant::STRING, "package/display_name")); + p_list->push_back(PropertyInfo(Variant::STRING, "package/short_name")); + p_list->push_back(PropertyInfo(Variant::STRING, "package/unique_name")); + p_list->push_back(PropertyInfo(Variant::STRING, "package/description")); + p_list->push_back(PropertyInfo(Variant::STRING, "package/publisher")); + p_list->push_back(PropertyInfo(Variant::STRING, "package/publisher_display_name")); + + p_list->push_back(PropertyInfo(Variant::STRING, "identity/product_guid")); + p_list->push_back(PropertyInfo(Variant::STRING, "identity/publisher_guid")); + + p_list->push_back(PropertyInfo(Variant::INT, "version/major")); + p_list->push_back(PropertyInfo(Variant::INT, "version/minor")); + p_list->push_back(PropertyInfo(Variant::INT, "version/build")); + p_list->push_back(PropertyInfo(Variant::INT, "version/revision")); + + p_list->push_back(PropertyInfo(Variant::BOOL, "orientation/landscape")); + p_list->push_back(PropertyInfo(Variant::BOOL, "orientation/portrait")); + p_list->push_back(PropertyInfo(Variant::BOOL, "orientation/landscape_flipped")); + p_list->push_back(PropertyInfo(Variant::BOOL, "orientation/portrait_flipped")); + + p_list->push_back(PropertyInfo(Variant::STRING, "images/background_color")); + p_list->push_back(PropertyInfo(Variant::OBJECT, "images/store_logo", PROPERTY_HINT_RESOURCE_TYPE, "ImageTexture")); + p_list->push_back(PropertyInfo(Variant::OBJECT, "images/square44x44_logo", PROPERTY_HINT_RESOURCE_TYPE, "ImageTexture")); + p_list->push_back(PropertyInfo(Variant::OBJECT, "images/square71x71_logo", PROPERTY_HINT_RESOURCE_TYPE, "ImageTexture")); + p_list->push_back(PropertyInfo(Variant::OBJECT, "images/square150x150_logo", PROPERTY_HINT_RESOURCE_TYPE, "ImageTexture")); + p_list->push_back(PropertyInfo(Variant::OBJECT, "images/square310x310_logo", PROPERTY_HINT_RESOURCE_TYPE, "ImageTexture")); + p_list->push_back(PropertyInfo(Variant::OBJECT, "images/wide310x150_logo", PROPERTY_HINT_RESOURCE_TYPE, "ImageTexture")); + p_list->push_back(PropertyInfo(Variant::OBJECT, "images/splash_screen", PROPERTY_HINT_RESOURCE_TYPE, "ImageTexture")); + + p_list->push_back(PropertyInfo(Variant::BOOL, "tiles/show_name_on_square150x150")); + p_list->push_back(PropertyInfo(Variant::BOOL, "tiles/show_name_on_wide310x150")); + p_list->push_back(PropertyInfo(Variant::BOOL, "tiles/show_name_on_square310x310")); + +#if 0 // Signing does not work :( disabling for now + p_list->push_back(PropertyInfo(Variant::BOOL, "signing/sign")); + p_list->push_back(PropertyInfo(Variant::STRING, "signing/certificate_file", PROPERTY_HINT_GLOBAL_FILE, "pfx")); + p_list->push_back(PropertyInfo(Variant::STRING, "signing/certificate_password")); +#endif + + // Capabilites + const char **basic = uwp_capabilities; + while (*basic) { + p_list->push_back(PropertyInfo(Variant::BOOL, "capabilities/" + String(*basic).camelcase_to_underscore(false))); + basic++; + } + + const char **uap = uwp_uap_capabilities; + while (*uap) { + p_list->push_back(PropertyInfo(Variant::BOOL, "capabilities/" + String(*uap).camelcase_to_underscore(false))); + uap++; + } + + const char **device = uwp_device_capabilites; + while (*device) { + p_list->push_back(PropertyInfo(Variant::BOOL, "capabilities/" + String(*device).camelcase_to_underscore(false))); + device++; + } +} + +bool EditorExportPlatformWinrt::can_export(String *r_error) const { + + String err; + bool valid = true; + + if (!exists_export_template("winrt_x86_debug.zip") || !exists_export_template("winrt_x86_release.zip") || !exists_export_template("winrt_arm_debug.zip") || !exists_export_template("winrt_arm_release.zip") || !exists_export_template("winrt_x64_debug.zip") || !exists_export_template("winrt_x64_release.zip")) { + valid = false; + err += TTR("No export templates found.\nDownload and install export templates.") + "\n"; + } + + if (custom_debug_package != "" && !FileAccess::exists(custom_debug_package)) { + valid = false; + err += TTR("Custom debug package not found.") + "\n"; + } + + if (custom_release_package != "" && !FileAccess::exists(custom_release_package)) { + valid = false; + err += TTR("Custom release package not found.") + "\n"; + } + + if (!_valid_resource_name(unique_name)) { + valid = false; + err += TTR("Invalid unique name.") + "\n"; + } + + if (!_valid_guid(product_guid)) { + valid = false; + err += TTR("Invalid product GUID.") + "\n"; + } + + if (!_valid_guid(publisher_guid)) { + valid = false; + err += TTR("Invalid publisher GUID.") + "\n"; + } + + if (!_valid_bgcolor(background_color)) { + valid = false; + err += TTR("Invalid background color.") + "\n"; + } + + if (store_logo.is_valid() && !_valid_image(store_logo, 50, 50)) { + valid = false; + err += TTR("Invalid Store Logo image dimensions (should be 50x50).") + "\n"; + } + + if (square44.is_valid() && !_valid_image(square44, 44, 44)) { + valid = false; + err += TTR("Invalid square 44x44 logo image dimensions (should be 44x44).") + "\n"; + } + + if (square71.is_valid() && !_valid_image(square71, 71, 71)) { + valid = false; + err += TTR("Invalid square 71x71 logo image dimensions (should be 71x71).") + "\n"; + } + + if (square150.is_valid() && !_valid_image(square150, 150, 150)) { + valid = false; + err += TTR("Invalid square 150x150 logo image dimensions (should be 150x150).") + "\n"; + } + + if (square310.is_valid() && !_valid_image(square310, 310, 310)) { + valid = false; + err += TTR("Invalid square 310x310 logo image dimensions (should be 310x310).") + "\n"; + } + + if (wide310.is_valid() && !_valid_image(wide310, 310, 150)) { + valid = false; + err += TTR("Invalid wide 310x150 logo image dimensions (should be 310x150).") + "\n"; + } + + if (splash.is_valid() && !_valid_image(splash, 620, 300)) { + valid = false; + err += TTR("Invalid splash screen image dimensions (should be 620x300).") + "\n"; + } + + if (r_error) + *r_error = err; + + return valid; +} + +Error EditorExportPlatformWinrt::export_project(const String &p_path, bool p_debug, int p_flags) { + + String src_appx; + + EditorProgress ep("export", "Exporting for Windows Universal", 7); + + if (is_debug) + src_appx = custom_debug_package; + else + src_appx = custom_release_package; + + if (src_appx == "") { + String err; + if (p_debug) { + switch (arch) { + case X86: { + src_appx = find_export_template("winrt_x86_debug.zip", &err); + break; + } + case X64: { + src_appx = find_export_template("winrt_x64_debug.zip", &err); + break; + } + case ARM: { + src_appx = find_export_template("winrt_arm_debug.zip", &err); + break; + } + } + } else { + switch (arch) { + case X86: { + src_appx = find_export_template("winrt_x86_release.zip", &err); + break; + } + case X64: { + src_appx = find_export_template("winrt_x64_release.zip", &err); + break; + } + case ARM: { + src_appx = find_export_template("winrt_arm_release.zip", &err); + break; + } + } + } + if (src_appx == "") { + EditorNode::add_io_error(err); + return ERR_FILE_NOT_FOUND; + } + } + + Error err = OK; + + FileAccess *fa_pack = FileAccess::open(p_path, FileAccess::WRITE, &err); + ERR_FAIL_COND_V(err != OK, ERR_CANT_CREATE); + + AppxPackager packager; + packager.init(fa_pack, sign_package ? AppxPackager::SIGN : AppxPackager::DONT_SIGN, certificate_path, certificate_pass); + + FileAccess *src_f = NULL; + zlib_filefunc_def io = zipio_create_io_from_file(&src_f); + + ep.step("Creating package...", 0); + + unzFile pkg = unzOpen2(src_appx.utf8().get_data(), &io); + + if (!pkg) { + + EditorNode::add_io_error("Could not find template appx to export:\n" + src_appx); + return ERR_FILE_NOT_FOUND; + } + + int ret = unzGoToFirstFile(pkg); + + ep.step("Copying template files...", 1); + + EditorNode::progress_add_task("template_files", "Template files", 100); + packager.set_progress_task("template_files"); + + int template_files_amount = 9; + int template_file_no = 1; + + while (ret == UNZ_OK) { + + // get file name + unz_file_info info; + char fname[16834]; + ret = unzGetCurrentFileInfo(pkg, &info, fname, 16834, NULL, 0, NULL, 0); + + String path = fname; + + if (path.ends_with("/")) { + // Ignore directories + ret = unzGoToNextFile(pkg); + continue; + } + + Vector data; + bool do_read = true; + + if (path.begins_with("Assets/")) { + + path = path.replace(".scale-100", ""); + + data = _get_image_data(path); + if (data.size() > 0) do_read = false; + } + + //read + if (do_read) { + data.resize(info.uncompressed_size); + unzOpenCurrentFile(pkg); + unzReadCurrentFile(pkg, data.ptr(), data.size()); + unzCloseCurrentFile(pkg); + } + + if (path == "AppxManifest.xml") { + + data = _fix_manifest(data, p_flags & (EXPORT_DUMB_CLIENT | EXPORT_REMOTE_DEBUG)); + } + + print_line("ADDING: " + path); + + packager.add_file(path, data.ptr(), data.size(), template_file_no++, template_files_amount, _should_compress_asset(path, data)); + + ret = unzGoToNextFile(pkg); + } + + EditorNode::progress_end_task("template_files"); + + ep.step("Creating command line...", 2); + + Vector cl = cmdline.strip_edges().split(" "); + for (int i = 0; i < cl.size(); i++) { + if (cl[i].strip_edges().length() == 0) { + cl.remove(i); + i--; + } + } + + if (!(p_flags & EXPORT_DUMB_CLIENT)) { + cl.push_back("-path"); + cl.push_back("game"); + } + + gen_export_flags(cl, p_flags); + + // Command line file + Vector clf; + + // Argc + clf.resize(4); + encode_uint32(cl.size(), clf.ptr()); + + for (int i = 0; i < cl.size(); i++) { + + CharString txt = cl[i].utf8(); + int base = clf.size(); + clf.resize(base + 4 + txt.length()); + encode_uint32(txt.length(), &clf[base]); + copymem(&clf[base + 4], txt.ptr(), txt.length()); + print_line(itos(i) + " param: " + cl[i]); + } + + packager.add_file("__cl__.cl", clf.ptr(), clf.size(), -1, -1, false); + + ep.step("Adding project files...", 3); + + EditorNode::progress_add_task("project_files", "Project Files", 100); + packager.set_progress_task("project_files"); + + err = export_project_files(save_appx_file, &packager, false); + + EditorNode::progress_end_task("project_files"); + + ep.step("Closing package...", 7); + + unzClose(pkg); + + packager.finish(); + + return OK; +} + +EditorExportPlatformWinrt::EditorExportPlatformWinrt() { + + Image img(_winrt_logo); + logo = Ref(memnew(ImageTexture)); + logo->create_from_image(img); + + is_debug = true; + + custom_release_package = ""; + custom_debug_package = ""; + + arch = X86; + + display_name = ""; + short_name = "Godot"; + unique_name = "Godot.Engine"; + description = "Godot Engine"; + publisher = "CN=GodotEngine"; + publisher_display_name = "Godot Engine"; + + product_guid = "00000000-0000-0000-0000-000000000000"; + publisher_guid = "00000000-0000-0000-0000-000000000000"; + + version_major = 1; + version_minor = 0; + version_build = 0; + version_revision = 0; + + orientation_landscape = true; + orientation_portrait = true; + orientation_landscape_flipped = true; + orientation_portrait_flipped = true; + + background_color = "transparent"; + + name_on_square150 = false; + name_on_square310 = false; + name_on_wide = false; + + sign_package = false; + certificate_path = ""; + certificate_pass = ""; +} + +EditorExportPlatformWinrt::~EditorExportPlatformWinrt() {} + +void register_winrt_exporter() { + + Ref exporter = Ref(memnew(EditorExportPlatformWinrt)); + EditorImportExport::get_singleton()->add_export_platform(exporter); +} diff --git a/platform/winrt/export/export.h b/platform/winrt/export/export.h new file mode 100644 index 00000000000..278d6d23cd6 --- /dev/null +++ b/platform/winrt/export/export.h @@ -0,0 +1,29 @@ +/*************************************************************************/ +/* export.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is 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 Software. */ +/* */ +/* 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 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 */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +void register_winrt_exporter(); diff --git a/tools/dist/uwp_template/AppxManifest.xml b/tools/dist/uwp_template/AppxManifest.xml new file mode 100644 index 00000000000..48a2ba7eb3b --- /dev/null +++ b/tools/dist/uwp_template/AppxManifest.xml @@ -0,0 +1,32 @@ + + + + + + $display_name$ + $publisher_display_name$ + Assets\StoreLogo.png + + + + + + + + + + + + + $name_on_tiles$ + + + $rotation_preference$ + + + + $capabilities_place$ + + + + \ No newline at end of file diff --git a/tools/dist/uwp_template/Assets/SplashScreen.scale-100.png b/tools/dist/uwp_template/Assets/SplashScreen.scale-100.png new file mode 100644 index 0000000000000000000000000000000000000000..540bfb1c016983ee967d9e14893993279944896e GIT binary patch literal 14919 zcmbtb1w&Nd(_Xq^NeStaF6j;dDG8VElDFFdV3F(rSlx~!6q`SM{yZrv&;Jsqq zJ$vq)>3L>uq_UC>1}ZTs2n51-FDs=A0>RpVKrqb6h`=2`+T%&!FGOQ`87a^+^jA)6 zVIpt`#X(lf8TiHw^f!#en{*H0CX&m0#dk>mP+&l;V9(FxejpG9=)IKqN00f#C3l~X zkY&-6u_ms>f&A-uc!^`=@sG+OAzwg2zhoC(m-b9_^pY!%ewjyO1eFQ7U2Dxe?v~`t zf+dg{awufq$YF)hfX8LCFVejI{FMpbhA42RHF2GLw(B?VO(q^Uab0t5FMDH(N&UaC zeAgga3My}TB_(yY8--u$dr2POjTzxF?X+Jv%#uD&hu~{5QEn(R#8Z}8^@fDm-hW9< zgxDcSb$3WhedDr)c!~CuDByx8K;3Z2ts6(`5J;H4z5xGB=F^rI(*%-M!4U}5Maw$_ zGm8@G!eHt(pW7%5mT*F&q(bDOa%yC#G`%At*wV|A(kRJ-qxQ2`zCV-4FOCOBHYMIbtlsZiJ$t+Aa5@>8)Q zhypJ54y@lt9@Nr0sx8t~*(SuF>Up4)f^Ved${^+C*1T-#j$t|^FW(GT^yLx$xLwdL zkA0@Zun8~r#?9Lifs2>rv%Kr(-LUMyHwFsc*<<_y)QH3Qn?K`LzWzgr6O4`cI8dq| z`)7IGNIF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Slwy$mzXqN9hO#redy8`eg{Gp++TX ztNr>K3#KV5nPQxsL0>`d^)n+Hbg+et*;QqcDnQK_Z27kA(ObfI8ixQn-6fO>=A@{9 zfDvmOGX`5Sl&!9Bd3k;S0wVnn>Z1}(*j(rTiXL=-@(v&M;Qn0^;r-+6B z*eYzjS{{ah5)bYt2~?j>D=>ee<|{+i_C%wYoi85{xj@}2^quuyC94KH4s4p(jj#1VmNI+Q zBD5&op9spF|eg!>RCruRyZuAw_EWc*d>)P0V%^LFv(2n7Now-9{)8HYtsqCKX9*2B07< zj9koPCo9?wVaw=s5n~qUF0YN}OD_BbN{{qFxSANiG41N*8IF{6IB#jJ#Z3i)x%0jJ z3xtU?y3`tb*b~A4bKpUWZY+^*k?rcZ&MV%b^@r9 z4D58@da}ujPjUk(?$2Q0RU9O|%3hR!8#KOo=}Bgqr`Lw8``rsUAiYeHUeA&K=^ zgML&KZv=WL+eX!jR5_m3N-`rt4S0*TV)z>y>w~IR|L*bq*UCFhBV5@ zW}@>Z_+|DyVIj5JSiS{3=mav+!f=`+4ez!qjwnbcP#iGjhVp4qy)$aqQn?!~-U+=_ zoOL4yyf#*hM(^K!J_-F;C^*SjTJDNPqQ4!MuqPX7O5o} z$n|@IB($)ty0jQhIq)u5ETezeS@1)d)Bpa(I+@V3b5J=9iq0%_9hTQ2aA#-?$#wWJ ze#OwKHM957m9mo1Io?{H`(dy|E2*+M9A^;ZG@|mH6SQ9tpAA2qTv)ECWM!oIvMU13 z%d1XyWaY9PGN_BNhUlW#M;8dJXCDJEC6W!^&QLQk@sD5v$72P&q zRu0;G#;#+6zIQMc<%r6z4!iDP=XhtR-pgvxo*XcYEf$NqvGd(;sOj$uCVKE)PC1igQ!Bvm0{81#QaQwD|r literal 0 HcmV?d00001 diff --git a/tools/dist/uwp_template/Assets/Square150x150Logo.scale-100.png b/tools/dist/uwp_template/Assets/Square150x150Logo.scale-100.png new file mode 100644 index 0000000000000000000000000000000000000000..6cff663eb52228337e6fa154980bd5b584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9;sLiVf(DPcu^TEdRU zRxgvb6r~AC<`Y%upRi1UWL;i*!uvfgwRCRCO+8Nb7F9P+kC2h|01&>Jx;y{TL$Z!cJ0fDst x02(AT2rx^;70}NiIS2Oh`RU0meA5PD`#(O9427Ap`;7nq002ovPDHLkV1kzx^pF4m literal 0 HcmV?d00001 diff --git a/tools/dist/uwp_template/Assets/Square71x71Logo.scale-100.png b/tools/dist/uwp_template/Assets/Square71x71Logo.scale-100.png new file mode 100644 index 0000000000000000000000000000000000000000..b1bf33136599ce560c0bdc9e8cad3cc691951679 GIT binary patch literal 3369 zcmV+^4c79BP)Tbl}C?>qQ)4bK~af8K|mCW0t%|?-ZLLi6sea` zA_n&-E_dIv&;8$h_Ur6ZaEoryE%Gsm{t`54-G2Y5X3I1w#C(UJBY)?!v+KNlHf!yU z7(a*Kav|l`_EvV4tjcio$DIAH=iv9P+8ksvnwALULTRzgk%CZ=_&IcX;90LH>Cn9h z^5;_UoZg6eUT*Pr1pjLi`uE>mKGk|tY0kVg#feg71@I6M>V&0T3S~@T&dk%E#>&ns zO%PH$4(OfSHVfni1(~;HMbo0{!8t~wN*6JmrURA`C z?hy=l8VK~#LbUq&O?+;Ug`~xMZu!&f)y3~hsm1AZx==J3f+Ct#RW%Et)ChRuI((EH z2o5w!@7W`T;7cJCq?DcRK}r-w>6P4pzpSKk_J%}k*Fmn&!4ZnQA>dpOxjqL+)s(s$ z0ghc!>jyMA^H%RjQ_$YI5#ababbp_>dPiEnM#$NDJEtmAd0bWP|GxeC>>B6mU5a`6 z#ml5reho6<2BwNO2`?1p%v_5QPW{4y{GIU*P5GrJwDpBKS)cYAoCWziB&)m~-iD%(&cbPhL_6@*y2TC?A1^=)G^23s+GP=TwS*wZz1C6YZ@B$DF zoYhqO9WFn(J8nuEpAn>X0}=M<0<5#H{McTBGdH*B&mbOkWp@Sgb%|I2j2yrvnXd)1Kq7t$ z=v-*op9*s_e&RJab8|}`2DxF-RJEjhaNEkvw>*M#(awAcgfn=kNeU(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VDv)>X+u78Ac%VS9S z8c3BpE>abeKaOZDdA!7u>u)pH3fg9iOGcr{zXR!a2*ptWv##%BwYwhK^xM(fMmV?h z7eY)$a^yC);SM9@bdQsPHv`e0O7aSg`6edkVFZsMnIOOrS=)sR$wqsdSg4~BSit1{(Q&)bnR5*0}g}yPC${)*|f2vzi~wDrorF4}U<(8|WOCIWzV@rrPxAjH{{!$~a~c$M*pmPN002ov JPDHLkV1kP7YO4SM literal 0 HcmV?d00001 diff --git a/tools/dist/uwp_template/Assets/Wide310x150Logo.scale-100.png b/tools/dist/uwp_template/Assets/Wide310x150Logo.scale-100.png new file mode 100644 index 0000000000000000000000000000000000000000..b06f1ad50fda8192a365f6f0a66969d2d0e35838 GIT binary patch literal 7390 zcmZu$bzD>L_a8k#x*5$tq;sSQI0TfGknV0ibf<)rbc_&`&W(l-(A_j6PPjk?}eejh42Fg@w`;j6!F&ZF+hAoLS?DeAP|F-3S3^t zZ{c^oZ&12!`(Wr!ek$xq+KPQR^o;+d2AC8x%S20FZ)w`wo3E7`ta#D>B5S`kRlkmC zq}G&1HX@K_PrE%= zR%ONm>3akpefgh<1Zf0^x$D5jn~*={LXc7db9#JLoH#zZs*RPSxT69@=3P0<4I}<> zC-wn#Wpu)CjnTSwJ&U=yZ1uFWRQ?~;r18)-A51lzHJ|0h{=N2gRsRh`m#F+AVShb~W;73uKe^f3wxs)S)1JWL8k zwrmT5Dwh49j+w5EU=TQ+qab0}VCYu@w2-)N%bT!!MFpg!=hi6U(z{1W&X1_w=8MZE zX(&m;SF!Y`;+Q)KRF-L{O&lzijHD8cK1$$dx(~|A3$vi2NFgJlxh{Cj1#_b{BV>?G z%h6B+8tzwqsBM`L!f;Z^JMjC&Lk$eSBI#O<<){osaWN1ndDuK$RJy+T;>S{Bb$1Tc z$$m#cu1Rmr7%>0msM^Rbo~Cdt6M2{tO?*|fb?mUdP~DG$+153IRR=ZhNe57f3GXlq zi)`jw{c(p%CsrhO?Q_e@!)}}j75TF$MpYtEki2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()kQ)LI+BIn*lt zqy5{-o`KCNtJZZ|rnT6t*xomVR!^+e)zDqoyjNxkJ2z|6zW4LQHmZ#y)Wx+EYLoi+FbwW65z7?`&1YBD{u)if>ue15y9_HQ+WsNs$-uG zSpq01O9h}Mc~jCsYk)lWJe~Lc0~gcyOFjS=a}s_tCWAF3h%bj*wa!BNBV%k>Wfl53 z&r0Y<6EsGC){l4#w{*O41P73j-fm95;Zs|)DGad*U23-c?Aj+ zsG2A%CxbPQ@O*v>p!VBS{&Cwj zT(3dAwqorW`KSb4X}v*a3xEd8E_kUSZmq!?XNqYdRb?@|XvvH{V_TgtiKGVfbfYt_ zbfw2|0`acFnx5`p*T*ZPQ*vZZomMg;0i?zb?J9;SK<`~Ys(Jz>X>{;aTmZo#1RaqLjE|$$5UR@PMf&ht@Uo;(I*2)s_<+?C4`$SGqpz; z^xU|kCH@rTLd|(&^p8wilAfERRf9nqYV2Q1oB5IP+m=^GcNzTHBi$JxQ&VGx$>_ v(YzT$sjb;5p)%p?8}a*YxG literal 0 HcmV?d00001 From 477c770181640b293285fa2f2c4a1d1cfde67394 Mon Sep 17 00:00:00 2001 From: George Marques Date: Tue, 20 Sep 2016 20:02:58 -0300 Subject: [PATCH 7/8] Change winrt build to be less dependent on ANGLE Now it does not try to build if the solution is not found. This way it's possible to provide a minimal package with includes and libs and make it build correctly. Also remove messages from detect.py since it is ran for every platform target. --- platform/winrt/SCsub | 7 +++++-- platform/winrt/detect.py | 8 +++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/platform/winrt/SCsub b/platform/winrt/SCsub index 502ec2d0c91..aa44debdaa5 100644 --- a/platform/winrt/SCsub +++ b/platform/winrt/SCsub @@ -15,7 +15,10 @@ files = [ 'os_winrt.cpp', ] -cmd = env.AlwaysBuild(env.ANGLE('libANGLE.lib', None)) +if "build_angle" in env and env["build_angle"]: + cmd = env.AlwaysBuild(env.ANGLE('libANGLE.lib', None)) prog = env.Program('#bin/godot', files) -env.Depends(prog, [cmd]) + +if "build_angle" in env and env["build_angle"]: + env.Depends(prog, [cmd]) diff --git a/platform/winrt/detect.py b/platform/winrt/detect.py index e4fec86d449..2e529e1efcb 100644 --- a/platform/winrt/detect.py +++ b/platform/winrt/detect.py @@ -19,11 +19,6 @@ def can_build(): if (os.getenv("VSINSTALLDIR")): if (os.getenv("ANGLE_SRC_PATH") == None): - print("You need to define ANGLE_SRC_PATH to the path of ANGLE source root.") - return False - - if not os.path.isfile(str(os.getenv("ANGLE_SRC_PATH")) + "/winrt/10/src/angle.sln"): - print ("Couldn't find the ANGLE solution. Is ANGLE_SRC_PATH configured to the right path?") return False return True @@ -58,6 +53,9 @@ def configure(env): jobs = str(env.GetOption("num_jobs")) angle_build_cmd = "msbuild.exe " + angle_root + "/winrt/10/src/angle.sln /nologo /v:m /m:" + jobs + " /p:Configuration=Release /p:Platform=" + if os.path.isfile(str(os.getenv("ANGLE_SRC_PATH")) + "/winrt/10/src/angle.sln"): + env["build_angle"] = True + if os.getenv('Platform') == "ARM": print "Compiled program architecture will be an ARM executable. (forcing bits=32)." From b2f8a365f290c17b96cd517afa8f327372c29110 Mon Sep 17 00:00:00 2001 From: George Marques Date: Wed, 7 Jun 2017 12:54:21 -0300 Subject: [PATCH 8/8] Fix cherry-picking issues caused by code updates --- drivers/builtin_openssl2/SCsub | 662 ------------------ drivers/unix/ip_unix.cpp | 2 - methods.py | 335 +++++---- .../dist/uwp_template/AppxManifest.xml | 62 +- .../Assets/SplashScreen.scale-100.png | Bin .../Assets/Square150x150Logo.scale-100.png | Bin .../Assets/Square310x310Logo.scale-100.png | Bin .../Assets/Square44x44Logo.scale-100.png | Bin .../Assets/Square71x71Logo.scale-100.png | Bin .../Assets/StoreLogo.scale-100.png | Bin .../Assets/Wide310x150Logo.scale-100.png | Bin {drivers => modules}/freetype/winrtdef.h | 0 modules/openssl/SCsub | 3 + platform/windows/detect.py | 143 +--- platform/winrt/app.cpp | 130 ++-- platform/winrt/detect.py | 1 + platform/winrt/export/export.cpp | 14 +- platform/winrt/os_winrt.cpp | 109 ++- platform/winrt/os_winrt.h | 60 +- .../openssl}/winrt.cpp | 0 .../openssl}/winrt_fix.patch | 0 21 files changed, 343 insertions(+), 1178 deletions(-) delete mode 100644 drivers/builtin_openssl2/SCsub rename {tools => misc}/dist/uwp_template/AppxManifest.xml (97%) rename {tools => misc}/dist/uwp_template/Assets/SplashScreen.scale-100.png (100%) rename {tools => misc}/dist/uwp_template/Assets/Square150x150Logo.scale-100.png (100%) rename {tools => misc}/dist/uwp_template/Assets/Square310x310Logo.scale-100.png (100%) rename {tools => misc}/dist/uwp_template/Assets/Square44x44Logo.scale-100.png (100%) rename {tools => misc}/dist/uwp_template/Assets/Square71x71Logo.scale-100.png (100%) rename {tools => misc}/dist/uwp_template/Assets/StoreLogo.scale-100.png (100%) rename {tools => misc}/dist/uwp_template/Assets/Wide310x150Logo.scale-100.png (100%) rename {drivers => modules}/freetype/winrtdef.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/winrt.cpp (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/winrt_fix.patch (100%) diff --git a/drivers/builtin_openssl2/SCsub b/drivers/builtin_openssl2/SCsub deleted file mode 100644 index bddf33146a2..00000000000 --- a/drivers/builtin_openssl2/SCsub +++ /dev/null @@ -1,662 +0,0 @@ -Import('env') -Import('env_drivers') - -openssl_sources = [ - "ssl/t1_lib.c", - "ssl/t1_ext.c", - "ssl/s3_srvr.c", - "ssl/t1_enc.c", - "ssl/t1_meth.c", - "ssl/s23_clnt.c", - "ssl/ssl_asn1.c", - "ssl/tls_srp.c", - "ssl/kssl.c", - "ssl/d1_both.c", - "ssl/t1_clnt.c", - "ssl/bio_ssl.c", - "ssl/d1_srtp.c", - "ssl/t1_reneg.c", - "ssl/ssl_cert.c", - "ssl/s3_lib.c", - "ssl/d1_srvr.c", - "ssl/s23_meth.c", - "ssl/ssl_stat.c", - "ssl/ssl_err.c", - "ssl/ssl_algs.c", - "ssl/s3_cbc.c", - "ssl/d1_clnt.c", - "ssl/s3_pkt.c", - "ssl/d1_meth.c", - "ssl/s3_both.c", - "ssl/s2_enc.c", - "ssl/s3_meth.c", - "ssl/s3_enc.c", - "ssl/s23_pkt.c", - "ssl/s2_pkt.c", - "ssl/d1_pkt.c", - "ssl/ssl_rsa.c", - "ssl/s23_srvr.c", - "ssl/s2_meth.c", - "ssl/s3_clnt.c", - "ssl/s23_lib.c", - "ssl/t1_srvr.c", - "ssl/ssl_lib.c", - "ssl/ssl_txt.c", - "ssl/s2_srvr.c", - "ssl/ssl_sess.c", - "ssl/s2_clnt.c", - "ssl/d1_lib.c", - "ssl/s2_lib.c", - "ssl/ssl_err2.c", - "ssl/ssl_ciph.c", - "crypto/dsa/dsa_lib.c", - "crypto/dsa/dsa_pmeth.c", - "crypto/dsa/dsa_ossl.c", - "crypto/dsa/dsa_gen.c", - "crypto/dsa/dsa_asn1.c", - "crypto/dsa/dsa_prn.c", - "crypto/dsa/dsa_sign.c", - "crypto/dsa/dsa_key.c", - "crypto/dsa/dsa_vrf.c", - "crypto/dsa/dsa_err.c", - "crypto/dsa/dsa_ameth.c", - "crypto/dsa/dsa_depr.c", - "crypto/x509/x509_lu.c", - "crypto/x509/x509cset.c", - "crypto/x509/x509_set.c", - "crypto/x509/x509_d2.c", - "crypto/x509/x509_txt.c", - "crypto/x509/x509rset.c", - "crypto/x509/by_dir.c", - "crypto/x509/x509_vpm.c", - "crypto/x509/x509_vfy.c", - "crypto/x509/x509_trs.c", - "crypto/x509/by_file.c", - "crypto/x509/x509_obj.c", - "crypto/x509/x509spki.c", - "crypto/x509/x509_v3.c", - "crypto/x509/x509_req.c", - "crypto/x509/x509_att.c", - "crypto/x509/x_all.c", - "crypto/x509/x509_ext.c", - "crypto/x509/x509type.c", - "crypto/x509/x509_def.c", - "crypto/x509/x509_err.c", - "crypto/x509/x509name.c", - "crypto/x509/x509_r2x.c", - "crypto/x509/x509_cmp.c", - "crypto/asn1/x_pkey.c", - "crypto/asn1/a_gentm.c", - "crypto/asn1/x_sig.c", - "crypto/asn1/t_req.c", - "crypto/asn1/t_pkey.c", - "crypto/asn1/p8_pkey.c", - "crypto/asn1/a_i2d_fp.c", - "crypto/asn1/x_val.c", - "crypto/asn1/f_string.c", - "crypto/asn1/p5_pbe.c", - "crypto/asn1/bio_ndef.c", - "crypto/asn1/a_bool.c", - "crypto/asn1/asn1_gen.c", - "crypto/asn1/x_algor.c", - "crypto/asn1/bio_asn1.c", - "crypto/asn1/asn_mime.c", - "crypto/asn1/t_x509.c", - "crypto/asn1/a_strex.c", - "crypto/asn1/x_nx509.c", - "crypto/asn1/asn1_err.c", - "crypto/asn1/x_crl.c", - "crypto/asn1/a_print.c", - "crypto/asn1/a_type.c", - "crypto/asn1/tasn_new.c", - "crypto/asn1/n_pkey.c", - "crypto/asn1/x_bignum.c", - "crypto/asn1/asn_pack.c", - "crypto/asn1/evp_asn1.c", - "crypto/asn1/t_bitst.c", - "crypto/asn1/x_req.c", - "crypto/asn1/a_time.c", - "crypto/asn1/x_name.c", - "crypto/asn1/x_pubkey.c", - "crypto/asn1/tasn_typ.c", - "crypto/asn1/asn_moid.c", - "crypto/asn1/a_utctm.c", - "crypto/asn1/asn1_lib.c", - "crypto/asn1/x_x509a.c", - "crypto/asn1/a_set.c", - "crypto/asn1/t_crl.c", - "crypto/asn1/p5_pbev2.c", - "crypto/asn1/tasn_enc.c", - "crypto/asn1/a_mbstr.c", - "crypto/asn1/tasn_dec.c", - "crypto/asn1/x_x509.c", - "crypto/asn1/a_octet.c", - "crypto/asn1/x_long.c", - "crypto/asn1/a_bytes.c", - "crypto/asn1/t_x509a.c", - "crypto/asn1/a_enum.c", - "crypto/asn1/a_int.c", - "crypto/asn1/tasn_prn.c", - "crypto/asn1/i2d_pr.c", - "crypto/asn1/a_utf8.c", - "crypto/asn1/t_spki.c", - "crypto/asn1/a_digest.c", - "crypto/asn1/a_dup.c", - "crypto/asn1/i2d_pu.c", - "crypto/asn1/a_verify.c", - "crypto/asn1/f_enum.c", - "crypto/asn1/a_sign.c", - "crypto/asn1/d2i_pr.c", - "crypto/asn1/asn1_par.c", - "crypto/asn1/x_spki.c", - "crypto/asn1/a_d2i_fp.c", - "crypto/asn1/f_int.c", - "crypto/asn1/x_exten.c", - "crypto/asn1/tasn_utl.c", - "crypto/asn1/nsseq.c", - "crypto/asn1/a_bitstr.c", - "crypto/asn1/x_info.c", - "crypto/asn1/a_strnid.c", - "crypto/asn1/a_object.c", - "crypto/asn1/tasn_fre.c", - "crypto/asn1/d2i_pu.c", - "crypto/asn1/ameth_lib.c", - "crypto/asn1/x_attrib.c", - "crypto/evp/m_sha.c", - "crypto/evp/e_camellia.c", - "crypto/evp/e_aes.c", - "crypto/evp/bio_b64.c", - "crypto/evp/m_sigver.c", - "crypto/evp/m_wp.c", - "crypto/evp/m_sha1.c", - "crypto/evp/p_seal.c", - "crypto/evp/c_alld.c", - "crypto/evp/p5_crpt.c", - "crypto/evp/e_rc4.c", - "crypto/evp/m_ecdsa.c", - "crypto/evp/bio_enc.c", - "crypto/evp/e_des3.c", - "crypto/evp/m_null.c", - "crypto/evp/bio_ok.c", - "crypto/evp/pmeth_gn.c", - "crypto/evp/e_rc5.c", - "crypto/evp/e_rc2.c", - "crypto/evp/p_dec.c", - "crypto/evp/p_verify.c", - "crypto/evp/e_rc4_hmac_md5.c", - "crypto/evp/pmeth_lib.c", - "crypto/evp/m_ripemd.c", - "crypto/evp/m_md5.c", - "crypto/evp/e_bf.c", - "crypto/evp/p_enc.c", - "crypto/evp/m_dss.c", - "crypto/evp/bio_md.c", - "crypto/evp/evp_pbe.c", - "crypto/evp/e_seed.c", - "crypto/evp/e_cast.c", - "crypto/evp/p_open.c", - "crypto/evp/p5_crpt2.c", - "crypto/evp/m_dss1.c", - "crypto/evp/names.c", - "crypto/evp/evp_acnf.c", - "crypto/evp/e_des.c", - "crypto/evp/evp_cnf.c", - "crypto/evp/evp_lib.c", - "crypto/evp/digest.c", - "crypto/evp/evp_err.c", - "crypto/evp/evp_enc.c", - "crypto/evp/e_old.c", - "crypto/evp/c_all.c", - "crypto/evp/m_md2.c", - "crypto/evp/e_xcbc_d.c", - "crypto/evp/pmeth_fn.c", - "crypto/evp/p_lib.c", - "crypto/evp/evp_key.c", - "crypto/evp/encode.c", - "crypto/evp/e_aes_cbc_hmac_sha1.c", - "crypto/evp/e_aes_cbc_hmac_sha256.c", - "crypto/evp/m_mdc2.c", - "crypto/evp/e_null.c", - "crypto/evp/p_sign.c", - "crypto/evp/e_idea.c", - "crypto/evp/c_allc.c", - "crypto/evp/evp_pkey.c", - "crypto/evp/m_md4.c", - "crypto/ex_data.c", - "crypto/pkcs12/p12_p8e.c", - "crypto/pkcs12/p12_crt.c", - "crypto/pkcs12/p12_utl.c", - "crypto/pkcs12/p12_attr.c", - "crypto/pkcs12/p12_npas.c", - "crypto/pkcs12/p12_decr.c", - "crypto/pkcs12/p12_init.c", - "crypto/pkcs12/p12_kiss.c", - "crypto/pkcs12/p12_add.c", - "crypto/pkcs12/p12_p8d.c", - "crypto/pkcs12/p12_mutl.c", - "crypto/pkcs12/p12_crpt.c", - "crypto/pkcs12/pk12err.c", - "crypto/pkcs12/p12_asn.c", - "crypto/pkcs12/p12_key.c", - "crypto/ecdh/ech_key.c", - "crypto/ecdh/ech_ossl.c", - "crypto/ecdh/ech_lib.c", - "crypto/ecdh/ech_err.c", - "crypto/ecdh/ech_kdf.c", - "crypto/o_str.c", - "crypto/conf/conf_api.c", - "crypto/conf/conf_err.c", - "crypto/conf/conf_def.c", - "crypto/conf/conf_lib.c", - "crypto/conf/conf_mall.c", - "crypto/conf/conf_sap.c", - "crypto/conf/conf_mod.c", - "crypto/ebcdic.c", - "crypto/ecdsa/ecs_lib.c", - "crypto/ecdsa/ecs_asn1.c", - "crypto/ecdsa/ecs_ossl.c", - "crypto/ecdsa/ecs_vrf.c", - "crypto/ecdsa/ecs_sign.c", - "crypto/ecdsa/ecs_err.c", - "crypto/dso/dso_win32.c", - "crypto/dso/dso_lib.c", - "crypto/dso/dso_dlfcn.c", - "crypto/dso/dso_dl.c", - "crypto/dso/dso_beos.c", - "crypto/dso/dso_null.c", - "crypto/dso/dso_vms.c", - "crypto/dso/dso_err.c", - "crypto/dso/dso_openssl.c", - "crypto/cryptlib.c", - "crypto/md5/md5_one.c", - "crypto/md5/md5_dgst.c", - "crypto/pkcs7/pkcs7err.c", - "crypto/pkcs7/pk7_smime.c", - "crypto/pkcs7/bio_pk7.c", - "crypto/pkcs7/pk7_mime.c", - "crypto/pkcs7/pk7_lib.c", - "crypto/pkcs7/pk7_asn1.c", - "crypto/pkcs7/pk7_doit.c", - "crypto/pkcs7/pk7_attr.c", - "crypto/md4/md4_one.c", - "crypto/md4/md4_dgst.c", - "crypto/o_dir.c", - "crypto/buffer/buf_err.c", - "crypto/buffer/buf_str.c", - "crypto/buffer/buffer.c", - "crypto/cms/cms_lib.c", - "crypto/cms/cms_io.c", - "crypto/cms/cms_err.c", - "crypto/cms/cms_dd.c", - "crypto/cms/cms_smime.c", - "crypto/cms/cms_att.c", - "crypto/cms/cms_pwri.c", - "crypto/cms/cms_cd.c", - "crypto/cms/cms_sd.c", - "crypto/cms/cms_asn1.c", - "crypto/cms/cms_env.c", - "crypto/cms/cms_enc.c", - "crypto/cms/cms_ess.c", - "crypto/cms/cms_kari.c", - "crypto/mem_dbg.c", - "crypto/uid.c", - "crypto/stack/stack.c", - "crypto/ec/ec_ameth.c", - "crypto/ec/ec_err.c", - "crypto/ec/ec_lib.c", - "crypto/ec/ec_curve.c", - "crypto/ec/ec_oct.c", - "crypto/ec/ec_asn1.c", - "crypto/ec/ecp_oct.c", - "crypto/ec/ec_print.c", - "crypto/ec/ec2_smpl.c", - "crypto/ec/ecp_nistp224.c", - "crypto/ec/ec2_oct.c", - "crypto/ec/eck_prn.c", - "crypto/ec/ec_key.c", - "crypto/ec/ecp_nist.c", - "crypto/ec/ec_check.c", - "crypto/ec/ecp_smpl.c", - "crypto/ec/ec2_mult.c", - "crypto/ec/ecp_mont.c", - "crypto/ec/ecp_nistp521.c", - "crypto/ec/ec_mult.c", - "crypto/ec/ecp_nistputil.c", - "crypto/ec/ec_pmeth.c", - "crypto/ec/ec_cvt.c", - "crypto/ec/ecp_nistp256.c", - "crypto/krb5/krb5_asn.c", - "crypto/hmac/hmac.c", - "crypto/hmac/hm_ameth.c", - "crypto/hmac/hm_pmeth.c", - "crypto/comp/c_rle.c", - "crypto/comp/c_zlib.c", - "crypto/comp/comp_lib.c", - "crypto/comp/comp_err.c", - "crypto/des/fcrypt.c", - "crypto/des/str2key.c", - "crypto/des/cbc_cksm.c", - "crypto/des/des_enc.c", - "crypto/des/ofb_enc.c", - "crypto/des/read2pwd.c", - "crypto/des/ecb3_enc.c", - "crypto/des/rand_key.c", - "crypto/des/cfb64ede.c", - "crypto/des/rpc_enc.c", - "crypto/des/ofb64ede.c", - "crypto/des/qud_cksm.c", - "crypto/des/enc_writ.c", - "crypto/des/set_key.c", - "crypto/des/xcbc_enc.c", - "crypto/des/fcrypt_b.c", - "crypto/des/ede_cbcm_enc.c", - "crypto/des/des_old2.c", - "crypto/des/cfb_enc.c", - "crypto/des/ecb_enc.c", - "crypto/des/enc_read.c", - "crypto/des/des_old.c", - "crypto/des/ofb64enc.c", - "crypto/des/pcbc_enc.c", - "crypto/des/cbc_enc.c", - "crypto/des/cfb64enc.c", - "crypto/lhash/lh_stats.c", - "crypto/lhash/lhash.c", - "crypto/x509v3/v3_genn.c", - "crypto/x509v3/pcy_cache.c", - "crypto/x509v3/v3_sxnet.c", - "crypto/x509v3/v3_scts.c", - "crypto/x509v3/v3err.c", - "crypto/x509v3/v3_conf.c", - "crypto/x509v3/v3_utl.c", - "crypto/x509v3/v3_akeya.c", - "crypto/x509v3/v3_lib.c", - "crypto/x509v3/pcy_lib.c", - "crypto/x509v3/v3_cpols.c", - "crypto/x509v3/v3_ia5.c", - "crypto/x509v3/v3_bitst.c", - "crypto/x509v3/v3_skey.c", - "crypto/x509v3/v3_info.c", - "crypto/x509v3/v3_asid.c", - "crypto/x509v3/pcy_tree.c", - "crypto/x509v3/v3_pcons.c", - "crypto/x509v3/v3_bcons.c", - "crypto/x509v3/v3_pku.c", - "crypto/x509v3/v3_ocsp.c", - "crypto/x509v3/pcy_map.c", - "crypto/x509v3/v3_ncons.c", - "crypto/x509v3/v3_purp.c", - "crypto/x509v3/v3_enum.c", - "crypto/x509v3/v3_pmaps.c", - "crypto/x509v3/pcy_node.c", - "crypto/x509v3/v3_pcia.c", - "crypto/x509v3/v3_crld.c", - "crypto/x509v3/v3_pci.c", - "crypto/x509v3/v3_akey.c", - "crypto/x509v3/v3_addr.c", - "crypto/x509v3/v3_int.c", - "crypto/x509v3/v3_alt.c", - "crypto/x509v3/v3_extku.c", - "crypto/x509v3/v3_prn.c", - "crypto/x509v3/pcy_data.c", - "crypto/aes/aes_ofb.c", - "crypto/aes/aes_ctr.c", - "crypto/aes/aes_ecb.c", - "crypto/aes/aes_cfb.c", - "crypto/aes/aes_wrap.c", - "crypto/aes/aes_ige.c", - "crypto/aes/aes_misc.c", - "crypto/pqueue/pqueue.c", - "crypto/sha/sha_one.c", - "crypto/sha/sha_dgst.c", - "crypto/sha/sha512.c", - "crypto/sha/sha1_one.c", - "crypto/sha/sha1dgst.c", - "crypto/sha/sha256.c", - "crypto/whrlpool/wp_dgst.c", - "crypto/objects/obj_xref.c", - "crypto/objects/o_names.c", - "crypto/objects/obj_err.c", - "crypto/objects/obj_dat.c", - "crypto/objects/obj_lib.c", - "crypto/mem.c", - "crypto/fips_ers.c", - "crypto/o_fips.c", - "crypto/engine/eng_rdrand.c", - "crypto/engine/eng_err.c", - "crypto/engine/tb_ecdsa.c", - "crypto/engine/tb_rsa.c", - "crypto/engine/tb_cipher.c", - "crypto/engine/tb_dsa.c", - "crypto/engine/eng_lib.c", - "crypto/engine/tb_asnmth.c", - "crypto/engine/tb_ecdh.c", - "crypto/engine/tb_dh.c", - "crypto/engine/tb_store.c", - "crypto/engine/eng_init.c", - "crypto/engine/eng_cnf.c", - "crypto/engine/eng_all.c", - "crypto/engine/tb_digest.c", - "crypto/engine/tb_pkmeth.c", - "crypto/engine/eng_table.c", - "crypto/engine/eng_ctrl.c", - "crypto/engine/eng_list.c", - "crypto/engine/eng_cryptodev.c", - "crypto/engine/eng_pkey.c", - "crypto/engine/tb_rand.c", - "crypto/engine/eng_openssl.c", - "crypto/engine/eng_fat.c", - "crypto/engine/eng_dyn.c", - "crypto/ts/ts_rsp_verify.c", - "crypto/ts/ts_req_print.c", - "crypto/ts/ts_verify_ctx.c", - "crypto/ts/ts_req_utils.c", - "crypto/ts/ts_err.c", - "crypto/ts/ts_rsp_print.c", - "crypto/ts/ts_rsp_utils.c", - "crypto/ts/ts_lib.c", - "crypto/ts/ts_conf.c", - "crypto/ts/ts_asn1.c", - "crypto/ts/ts_rsp_sign.c", - "crypto/ocsp/ocsp_ext.c", - "crypto/ocsp/ocsp_cl.c", - "crypto/ocsp/ocsp_ht.c", - "crypto/ocsp/ocsp_lib.c", - "crypto/ocsp/ocsp_srv.c", - "crypto/ocsp/ocsp_vfy.c", - "crypto/ocsp/ocsp_err.c", - "crypto/ocsp/ocsp_prn.c", - "crypto/ocsp/ocsp_asn.c", - "crypto/bf/bf_cfb64.c", - "crypto/bf/bf_ecb.c", - "crypto/bf/bf_enc.c", - "crypto/bf/bf_skey.c", - "crypto/bf/bf_ofb64.c", - "crypto/idea/i_skey.c", - "crypto/idea/i_ofb64.c", - "crypto/idea/i_cbc.c", - "crypto/idea/i_ecb.c", - "crypto/idea/i_cfb64.c", - "crypto/cmac/cm_ameth.c", - "crypto/cmac/cmac.c", - "crypto/cmac/cm_pmeth.c", - "crypto/dh/dh_lib.c", - "crypto/dh/dh_key.c", - "crypto/dh/dh_asn1.c", - "crypto/dh/dh_depr.c", - "crypto/dh/dh_pmeth.c", - "crypto/dh/dh_prn.c", - "crypto/dh/dh_gen.c", - "crypto/dh/dh_ameth.c", - "crypto/dh/dh_check.c", - "crypto/dh/dh_err.c", - "crypto/dh/dh_kdf.c", - "crypto/dh/dh_rfc5114.c", - "crypto/modes/ccm128.c", - "crypto/modes/ofb128.c", - "crypto/modes/cts128.c", - "crypto/modes/ctr128.c", - "crypto/modes/gcm128.c", - "crypto/modes/cbc128.c", - "crypto/modes/cfb128.c", - "crypto/modes/xts128.c", - "crypto/modes/wrap128.c", - "crypto/camellia/cmll_cfb.c", - "crypto/camellia/cmll_ecb.c", - "crypto/camellia/cmll_utl.c", - "crypto/camellia/cmll_misc.c", - "crypto/camellia/cmll_ofb.c", - "crypto/camellia/cmll_ctr.c", - "crypto/seed/seed_ecb.c", - "crypto/seed/seed_cbc.c", - "crypto/seed/seed.c", - "crypto/seed/seed_ofb.c", - "crypto/seed/seed_cfb.c", - "crypto/txt_db/txt_db.c", - "crypto/cpt_err.c", - "crypto/pem/pem_pk8.c", - "crypto/pem/pem_lib.c", - "crypto/pem/pem_sign.c", - "crypto/pem/pem_all.c", - "crypto/pem/pem_info.c", - "crypto/pem/pem_pkey.c", - "crypto/pem/pem_seal.c", - "crypto/pem/pem_err.c", - "crypto/pem/pem_xaux.c", - "crypto/pem/pvkfmt.c", - "crypto/pem/pem_x509.c", - "crypto/pem/pem_oth.c", - "crypto/rand/rand_lib.c", - "crypto/rand/randfile.c", - "crypto/rand/rand_os2.c", - "crypto/rand/rand_unix.c", - "crypto/rand/rand_nw.c", - "crypto/rand/md_rand.c", - "crypto/rand/rand_err.c", - "crypto/rand/rand_win.c", - "crypto/rand/rand_egd.c", - "crypto/cversion.c", - "crypto/cast/c_ecb.c", - "crypto/cast/c_skey.c", - "crypto/cast/c_ofb64.c", - "crypto/cast/c_enc.c", - "crypto/cast/c_cfb64.c", - "crypto/o_time.c", - "crypto/mdc2/mdc2dgst.c", - "crypto/mdc2/mdc2_one.c", - "crypto/rc4/rc4_utl.c", - "crypto/ui/ui_compat.c", - "crypto/ui/ui_util.c", - "crypto/ui/ui_lib.c", - "crypto/ui/ui_err.c", - "crypto/ui/ui_openssl.c", - "crypto/bio/bf_buff.c", - "crypto/bio/bss_null.c", - "crypto/bio/bss_acpt.c", - "crypto/bio/bss_conn.c", - "crypto/bio/bss_fd.c", - "crypto/bio/bf_null.c", - "crypto/bio/bio_err.c", - "crypto/bio/bss_sock.c", - "crypto/bio/bss_mem.c", - "crypto/bio/b_dump.c", - "crypto/bio/b_print.c", - "crypto/bio/b_sock.c", - "crypto/bio/bss_dgram.c", - "crypto/bio/bf_nbio.c", - "crypto/bio/bio_lib.c", - "crypto/bio/bss_file.c", - "crypto/bio/bss_bio.c", - "crypto/bio/bss_log.c", - "crypto/bio/bio_cb.c", - "crypto/o_init.c", - "crypto/rc2/rc2_skey.c", - "crypto/rc2/rc2_cbc.c", - "crypto/rc2/rc2cfb64.c", - "crypto/rc2/rc2_ecb.c", - "crypto/rc2/rc2ofb64.c", - "crypto/bn/bn_x931p.c", - "crypto/bn/bn_blind.c", - "crypto/bn/bn_gf2m.c", - "crypto/bn/bn_const.c", - "crypto/bn/bn_sqr.c", - "crypto/bn/bn_nist.c", - "crypto/bn/bn_rand.c", - "crypto/bn/bn_err.c", - "crypto/bn/bn_div.c", - "crypto/bn/bn_kron.c", - "crypto/bn/bn_ctx.c", - "crypto/bn/bn_shift.c", - "crypto/bn/bn_mod.c", - "crypto/bn/bn_exp2.c", - "crypto/bn/bn_word.c", - "crypto/bn/bn_add.c", - "crypto/bn/bn_exp.c", - "crypto/bn/bn_mont.c", - "crypto/bn/bn_print.c", - "crypto/bn/bn_mul.c", - "crypto/bn/bn_prime.c", - "crypto/bn/bn_depr.c", - "crypto/bn/bn_gcd.c", - "crypto/bn/bn_mpi.c", - "crypto/bn/bn_sqrt.c", - "crypto/bn/bn_recp.c", - "crypto/bn/bn_lib.c", - "crypto/ripemd/rmd_dgst.c", - "crypto/ripemd/rmd_one.c", - "crypto/rsa/rsa_x931.c", - "crypto/rsa/rsa_depr.c", - "crypto/rsa/rsa_saos.c", - "crypto/rsa/rsa_crpt.c", - "crypto/rsa/rsa_pss.c", - "crypto/rsa/rsa_oaep.c", - "crypto/rsa/rsa_null.c", - "crypto/rsa/rsa_gen.c", - "crypto/rsa/rsa_prn.c", - "crypto/rsa/rsa_pmeth.c", - "crypto/rsa/rsa_asn1.c", - "crypto/rsa/rsa_ssl.c", - "crypto/rsa/rsa_ameth.c", - "crypto/rsa/rsa_pk1.c", - "crypto/rsa/rsa_err.c", - "crypto/rsa/rsa_lib.c", - "crypto/rsa/rsa_none.c", - "crypto/rsa/rsa_chk.c", - "crypto/rsa/rsa_eay.c", - "crypto/rsa/rsa_sign.c", - "crypto/srp/srp_lib.c", - "crypto/srp/srp_vfy.c", - "crypto/err/err.c", - "crypto/err/err_prn.c", - "crypto/err/err_all.c", - "crypto/mem_clr.c", - "crypto/rc4/rc4_skey.c", - "crypto/rc4/rc4_enc.c", - "crypto/camellia/camellia.c", - "crypto/camellia/cmll_cbc.c", - #"crypto/aes/aes_x86core.c", - "crypto/aes/aes_core.c", - "crypto/aes/aes_cbc.c", - "crypto/whrlpool/wp_block.c", - "crypto/bn/bn_asm.c", -] - -# env.drivers_sources+=openssl_sources - -env.Append(CPPPATH=["#drivers/builtin_openssl2"]) -env_drivers.Append(CPPPATH=["#drivers/builtin_openssl2/crypto"]) -env_drivers.Append(CPPPATH=["#drivers/builtin_openssl2/openssl"]) -env_drivers.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/evp"]) -env_drivers.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/asn1"]) -env_drivers.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/modes"]) -# env_ssl.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/store"]) -env_drivers.Append(CPPFLAGS=["-DOPENSSL_NO_ASM", "-DOPENSSL_THREADS", "-DL_ENDIAN"]) - -if "platform" in env and env["platform"] == "winrt": - openssl_sources += ['winrt.cpp'] - -# Workaround for compilation error with GCC/Clang when -Werror is too greedy (GH-4517) -import os -if not (os.name == "nt" and os.getenv("VSINSTALLDIR") != None): # not Windows and not MSVC - env_drivers.Append(CFLAGS=["-Wno-error=implicit-function-declaration"]) - -env_drivers.add_source_files(env.drivers_sources, openssl_sources) diff --git a/drivers/unix/ip_unix.cpp b/drivers/unix/ip_unix.cpp index feb1809fcae..d2a1b29eaff 100644 --- a/drivers/unix/ip_unix.cpp +++ b/drivers/unix/ip_unix.cpp @@ -137,8 +137,6 @@ void IP_Unix::get_local_addresses(List *r_addresses) const { } } - auto hostnames = NetworkInformation::GetHostNames(); - for (int i = 0; i < hostnames->Size; i++) { if (hostnames->GetAt(i)->Type == HostNameType::Ipv4 || hostnames->GetAt(i)->Type == HostNameType::Ipv6 && hostnames->GetAt(i)->IPInformation != nullptr) { diff --git a/methods.py b/methods.py index 949bc8dd4f8..eb68256c7de 100755 --- a/methods.py +++ b/methods.py @@ -200,7 +200,7 @@ def build_glsl_header(filename): out_file_base = out_file out_file_base = out_file_base[out_file_base.rfind("/") + 1:] out_file_base = out_file_base[out_file_base.rfind("\\") + 1:] -# print("out file "+out_file+" base " +out_file_base) +# print("out file "+out_file+" base " +out_file_base) out_file_ifdef = out_file_base.replace(".", "_").upper() fd.write("#ifndef " + out_file_ifdef + "\n") fd.write("#define " + out_file_ifdef + "\n") @@ -249,79 +249,79 @@ def build_glsl_header(filename): fd.write("""\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, const Transform& p_transform) { _FU - const Transform &tr = p_transform; + const Transform &tr = p_transform; - GLfloat matrix[16]={ /* build a 16x16 matrix */ - tr.basis.elements[0][0], - tr.basis.elements[1][0], - tr.basis.elements[2][0], - 0, - tr.basis.elements[0][1], - tr.basis.elements[1][1], - tr.basis.elements[2][1], - 0, - tr.basis.elements[0][2], - tr.basis.elements[1][2], - tr.basis.elements[2][2], - 0, - tr.origin.x, - tr.origin.y, - tr.origin.z, - 1 - }; + GLfloat matrix[16]={ /* build a 16x16 matrix */ + tr.basis.elements[0][0], + tr.basis.elements[1][0], + tr.basis.elements[2][0], + 0, + tr.basis.elements[0][1], + tr.basis.elements[1][1], + tr.basis.elements[2][1], + 0, + tr.basis.elements[0][2], + tr.basis.elements[1][2], + tr.basis.elements[2][2], + 0, + tr.origin.x, + tr.origin.y, + tr.origin.z, + 1 + }; - glUniformMatrix4fv(get_uniform(p_uniform),1,false,matrix); + glUniformMatrix4fv(get_uniform(p_uniform),1,false,matrix); - } + } - """) + """) fd.write("""\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, const Matrix32& p_transform) { _FU - const Matrix32 &tr = p_transform; + const Matrix32 &tr = p_transform; - GLfloat matrix[16]={ /* build a 16x16 matrix */ - tr.elements[0][0], - tr.elements[0][1], - 0, - 0, - tr.elements[1][0], - tr.elements[1][1], - 0, - 0, - 0, - 0, - 1, - 0, - tr.elements[2][0], - tr.elements[2][1], - 0, - 1 - }; + GLfloat matrix[16]={ /* build a 16x16 matrix */ + tr.elements[0][0], + tr.elements[0][1], + 0, + 0, + tr.elements[1][0], + tr.elements[1][1], + 0, + 0, + 0, + 0, + 1, + 0, + tr.elements[2][0], + tr.elements[2][1], + 0, + 1 + }; - glUniformMatrix4fv(get_uniform(p_uniform),1,false,matrix); + glUniformMatrix4fv(get_uniform(p_uniform),1,false,matrix); - } + } - """) + """) fd.write("""\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, const CameraMatrix& p_matrix) { _FU - GLfloat matrix[16]; + GLfloat matrix[16]; - for (int i=0;i<4;i++) { - for (int j=0;j<4;j++) { + for (int i=0;i<4;i++) { + for (int j=0;j<4;j++) { - matrix[i*4+j]=p_matrix.matrix[i][j]; - } - } + matrix[i*4+j]=p_matrix.matrix[i][j]; + } + } - glUniformMatrix4fv(get_uniform(p_uniform),1,false,matrix); - }; """) + glUniformMatrix4fv(get_uniform(p_uniform),1,false,matrix); + }; """) fd.write("\n\n#undef _FU\n\n\n") @@ -493,7 +493,7 @@ def build_hlsl_dx9_header(filename): out_file_base = out_file out_file_base = out_file_base[out_file_base.rfind("/") + 1:] out_file_base = out_file_base[out_file_base.rfind("\\") + 1:] -# print("out file "+out_file+" base " +out_file_base) +# print("out file "+out_file+" base " +out_file_base) out_file_ifdef = out_file_base.replace(".", "_").upper() fd.write("#ifndef " + out_file_ifdef + "\n") fd.write("#define " + out_file_ifdef + "\n") @@ -542,46 +542,46 @@ def build_hlsl_dx9_header(filename): fd.write("""\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, const Transform& p_transform) { _FU - const Transform &tr = p_transform; + const Transform &tr = p_transform; - float matrix[16]={ /* build a 16x16 matrix */ - tr.basis.elements[0][0], - tr.basis.elements[0][1], - tr.basis.elements[0][2], - tr.origin.x, - tr.basis.elements[1][0], - tr.basis.elements[1][1], - tr.basis.elements[1][2], - tr.origin.y, - tr.basis.elements[2][0], - tr.basis.elements[2][1], - tr.basis.elements[2][2], - tr.origin.z, - 0, - 0, - 0, - 1 - }; + float matrix[16]={ /* build a 16x16 matrix */ + tr.basis.elements[0][0], + tr.basis.elements[0][1], + tr.basis.elements[0][2], + tr.origin.x, + tr.basis.elements[1][0], + tr.basis.elements[1][1], + tr.basis.elements[1][2], + tr.origin.y, + tr.basis.elements[2][0], + tr.basis.elements[2][1], + tr.basis.elements[2][2], + tr.origin.z, + 0, + 0, + 0, + 1 + }; - set_uniformfv(p_uniform,&matrix[0],4); + set_uniformfv(p_uniform,&matrix[0],4); - } + } - """) + """) fd.write("""\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, const CameraMatrix& p_matrix) { _FU - float matrix[16]; + float matrix[16]; - for (int i=0;i<4;i++) { - for (int j=0;j<4;j++) { + for (int i=0;i<4;i++) { + for (int j=0;j<4;j++) { - matrix[i*4+j]=p_matrix.matrix[j][i]; - } - } + matrix[i*4+j]=p_matrix.matrix[j][i]; + } + } - set_uniformfv(p_uniform,&matrix[0],4); - }; """) + set_uniformfv(p_uniform,&matrix[0],4); + }; """) fd.write("\n\n#undef _FU\n\n\n") @@ -720,7 +720,7 @@ def include_file_in_legacygl_header(filename, header_data, depth): enumbase = ifdefline[:ifdefline.find("_EN_")] ifdefline = ifdefline.replace("_EN_", "_") line = line.replace("_EN_", "_") -# print(enumbase+":"+ifdefline); +# print(enumbase+":"+ifdefline); if (enumbase not in header_data.enums): header_data.enums[enumbase] = [] if (ifdefline not in header_data.enums[enumbase]): @@ -816,7 +816,7 @@ def build_legacygl_header(filename, include, class_suffix, output_attribs): out_file_base = out_file out_file_base = out_file_base[out_file_base.rfind("/") + 1:] out_file_base = out_file_base[out_file_base.rfind("\\") + 1:] -# print("out file "+out_file+" base " +out_file_base) +# print("out file "+out_file+" base " +out_file_base) out_file_ifdef = out_file_base.replace(".", "_").upper() fd.write("#ifndef " + out_file_ifdef + class_suffix + "_120\n") fd.write("#define " + out_file_ifdef + class_suffix + "_120\n") @@ -867,79 +867,79 @@ def build_legacygl_header(filename, include, class_suffix, output_attribs): fd.write("""\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, const Transform& p_transform) { _FU - const Transform &tr = p_transform; + const Transform &tr = p_transform; - GLfloat matrix[16]={ /* build a 16x16 matrix */ - tr.basis.elements[0][0], - tr.basis.elements[1][0], - tr.basis.elements[2][0], - 0, - tr.basis.elements[0][1], - tr.basis.elements[1][1], - tr.basis.elements[2][1], - 0, - tr.basis.elements[0][2], - tr.basis.elements[1][2], - tr.basis.elements[2][2], - 0, - tr.origin.x, - tr.origin.y, - tr.origin.z, - 1 - }; + GLfloat matrix[16]={ /* build a 16x16 matrix */ + tr.basis.elements[0][0], + tr.basis.elements[1][0], + tr.basis.elements[2][0], + 0, + tr.basis.elements[0][1], + tr.basis.elements[1][1], + tr.basis.elements[2][1], + 0, + tr.basis.elements[0][2], + tr.basis.elements[1][2], + tr.basis.elements[2][2], + 0, + tr.origin.x, + tr.origin.y, + tr.origin.z, + 1 + }; - glUniformMatrix4fv(get_uniform(p_uniform),1,false,matrix); + glUniformMatrix4fv(get_uniform(p_uniform),1,false,matrix); - } + } - """) + """) fd.write("""\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, const Matrix32& p_transform) { _FU - const Matrix32 &tr = p_transform; + const Matrix32 &tr = p_transform; - GLfloat matrix[16]={ /* build a 16x16 matrix */ - tr.elements[0][0], - tr.elements[0][1], - 0, - 0, - tr.elements[1][0], - tr.elements[1][1], - 0, - 0, - 0, - 0, - 1, - 0, - tr.elements[2][0], - tr.elements[2][1], - 0, - 1 - }; + GLfloat matrix[16]={ /* build a 16x16 matrix */ + tr.elements[0][0], + tr.elements[0][1], + 0, + 0, + tr.elements[1][0], + tr.elements[1][1], + 0, + 0, + 0, + 0, + 1, + 0, + tr.elements[2][0], + tr.elements[2][1], + 0, + 1 + }; - glUniformMatrix4fv(get_uniform(p_uniform),1,false,matrix); + glUniformMatrix4fv(get_uniform(p_uniform),1,false,matrix); - } + } - """) + """) fd.write("""\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, const CameraMatrix& p_matrix) { _FU - GLfloat matrix[16]; + GLfloat matrix[16]; - for (int i=0;i<4;i++) { - for (int j=0;j<4;j++) { + for (int i=0;i<4;i++) { + for (int j=0;j<4;j++) { - matrix[i*4+j]=p_matrix.matrix[i][j]; - } - } + matrix[i*4+j]=p_matrix.matrix[i][j]; + } + } - glUniformMatrix4fv(get_uniform(p_uniform),1,false,matrix); - }; """) + glUniformMatrix4fv(get_uniform(p_uniform),1,false,matrix); + }; """) fd.write("\n\n#undef _FU\n\n\n") @@ -959,10 +959,10 @@ def build_legacygl_header(filename, include, class_suffix, output_attribs): x = header_data.enums[xv] bits = 1 amt = len(x) -# print(x) +# print(x) while(2**bits < amt): bits += 1 -# print("amount: "+str(amt)+" bits "+str(bits)); +# print("amount: "+str(amt)+" bits "+str(bits)); strs = "{" for i in range(amt): strs += "\"#define " + x[i] + "\\n\"," @@ -1252,31 +1252,31 @@ def win32_spawn(sh, escape, cmd, args, env): """ def win32_spawn(sh, escape, cmd, args, spawnenv): - import win32file - import win32event - import win32process - import win32security - for var in spawnenv: - spawnenv[var] = spawnenv[var].encode('ascii', 'replace') + import win32file + import win32event + import win32process + import win32security + for var in spawnenv: + spawnenv[var] = spawnenv[var].encode('ascii', 'replace') - sAttrs = win32security.SECURITY_ATTRIBUTES() - StartupInfo = win32process.STARTUPINFO() - newargs = ' '.join(map(escape, args[1:])) - cmdline = cmd + " " + newargs + sAttrs = win32security.SECURITY_ATTRIBUTES() + StartupInfo = win32process.STARTUPINFO() + newargs = ' '.join(map(escape, args[1:])) + cmdline = cmd + " " + newargs - # check for any special operating system commands - if cmd == 'del': - for arg in args[1:]: - win32file.DeleteFile(arg) - exit_code = 0 - else: - # otherwise execute the command. - hProcess, hThread, dwPid, dwTid = win32process.CreateProcess(None, cmdline, None, None, 1, 0, spawnenv, None, StartupInfo) - win32event.WaitForSingleObject(hProcess, win32event.INFINITE) - exit_code = win32process.GetExitCodeProcess(hProcess) - win32file.CloseHandle(hProcess); - win32file.CloseHandle(hThread); - return exit_code + # check for any special operating system commands + if cmd == 'del': + for arg in args[1:]: + win32file.DeleteFile(arg) + exit_code = 0 + else: + # otherwise execute the command. + hProcess, hThread, dwPid, dwTid = win32process.CreateProcess(None, cmdline, None, None, 1, 0, spawnenv, None, StartupInfo) + win32event.WaitForSingleObject(hProcess, win32event.INFINITE) + exit_code = win32process.GetExitCodeProcess(hProcess) + win32file.CloseHandle(hProcess); + win32file.CloseHandle(hThread); + return exit_code """ def android_add_maven_repository(self, url): @@ -1440,8 +1440,7 @@ def save_active_platforms(apnames, ap): for x in ap: pth = x + "/logo.png" -# print("open path: "+pth) -<<<<<<< HEAD +# print("open path: "+pth) pngf = open(pth, "rb") b = pngf.read(1) str = " /* AUTOGENERATED FILE, DO NOT EDIT */ \n" @@ -1560,6 +1559,6 @@ def detect_visual_c_compiler_version(tools_env): return vc_chosen_compiler_str def precious_program(env, program, sources, **args): - program = env.ProgramOriginal(program, sources, **args) - env.Precious(program) - return program + program = env.ProgramOriginal(program, sources, **args) + env.Precious(program) + return program diff --git a/tools/dist/uwp_template/AppxManifest.xml b/misc/dist/uwp_template/AppxManifest.xml similarity index 97% rename from tools/dist/uwp_template/AppxManifest.xml rename to misc/dist/uwp_template/AppxManifest.xml index 48a2ba7eb3b..d50214f0f12 100644 --- a/tools/dist/uwp_template/AppxManifest.xml +++ b/misc/dist/uwp_template/AppxManifest.xml @@ -1,32 +1,32 @@ - - - - - - $display_name$ - $publisher_display_name$ - Assets\StoreLogo.png - - - - - - - - - - - - - $name_on_tiles$ - - - $rotation_preference$ - - - - $capabilities_place$ - - - + + + + + + $display_name$ + $publisher_display_name$ + Assets\StoreLogo.png + + + + + + + + + + + + + $name_on_tiles$ + + + $rotation_preference$ + + + + $capabilities_place$ + + + \ No newline at end of file diff --git a/tools/dist/uwp_template/Assets/SplashScreen.scale-100.png b/misc/dist/uwp_template/Assets/SplashScreen.scale-100.png similarity index 100% rename from tools/dist/uwp_template/Assets/SplashScreen.scale-100.png rename to misc/dist/uwp_template/Assets/SplashScreen.scale-100.png diff --git a/tools/dist/uwp_template/Assets/Square150x150Logo.scale-100.png b/misc/dist/uwp_template/Assets/Square150x150Logo.scale-100.png similarity index 100% rename from tools/dist/uwp_template/Assets/Square150x150Logo.scale-100.png rename to misc/dist/uwp_template/Assets/Square150x150Logo.scale-100.png diff --git a/tools/dist/uwp_template/Assets/Square310x310Logo.scale-100.png b/misc/dist/uwp_template/Assets/Square310x310Logo.scale-100.png similarity index 100% rename from tools/dist/uwp_template/Assets/Square310x310Logo.scale-100.png rename to misc/dist/uwp_template/Assets/Square310x310Logo.scale-100.png diff --git a/tools/dist/uwp_template/Assets/Square44x44Logo.scale-100.png b/misc/dist/uwp_template/Assets/Square44x44Logo.scale-100.png similarity index 100% rename from tools/dist/uwp_template/Assets/Square44x44Logo.scale-100.png rename to misc/dist/uwp_template/Assets/Square44x44Logo.scale-100.png diff --git a/tools/dist/uwp_template/Assets/Square71x71Logo.scale-100.png b/misc/dist/uwp_template/Assets/Square71x71Logo.scale-100.png similarity index 100% rename from tools/dist/uwp_template/Assets/Square71x71Logo.scale-100.png rename to misc/dist/uwp_template/Assets/Square71x71Logo.scale-100.png diff --git a/tools/dist/uwp_template/Assets/StoreLogo.scale-100.png b/misc/dist/uwp_template/Assets/StoreLogo.scale-100.png similarity index 100% rename from tools/dist/uwp_template/Assets/StoreLogo.scale-100.png rename to misc/dist/uwp_template/Assets/StoreLogo.scale-100.png diff --git a/tools/dist/uwp_template/Assets/Wide310x150Logo.scale-100.png b/misc/dist/uwp_template/Assets/Wide310x150Logo.scale-100.png similarity index 100% rename from tools/dist/uwp_template/Assets/Wide310x150Logo.scale-100.png rename to misc/dist/uwp_template/Assets/Wide310x150Logo.scale-100.png diff --git a/drivers/freetype/winrtdef.h b/modules/freetype/winrtdef.h similarity index 100% rename from drivers/freetype/winrtdef.h rename to modules/freetype/winrtdef.h diff --git a/modules/openssl/SCsub b/modules/openssl/SCsub index 38a230a4cf3..33ea1737584 100644 --- a/modules/openssl/SCsub +++ b/modules/openssl/SCsub @@ -648,6 +648,9 @@ if (env['builtin_openssl'] != 'no'): "crypto/bn/bn_asm.c", ] + if "platform" in env and env["platform"] == "winrt": + thirdparty_sources += ['winrt.cpp'] + thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] env_openssl.add_source_files(env.modules_sources, thirdparty_sources) diff --git a/platform/windows/detect.py b/platform/windows/detect.py index 3938f5a1551..03d0a68a875 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -110,146 +110,6 @@ def get_name(): ('mingw_prefix_64','Mingw Prefix 64 bits',mingw64), ] -def get_flags(): - - return [ - ('glew','yes'), - ('openssl','builtin'), #use builtin openssl - ] - -def build_res_file( target, source, env ): - - cmdbase = "" - if (env["bits"] == "32"): - cmdbase = env['mingw_prefix'] - else: - cmdbase = env['mingw_prefix_64'] - CPPPATH = env['CPPPATH'] - cmdbase = cmdbase + 'windres --include-dir . ' - import subprocess - for x in range(len(source)): - cmd = cmdbase + '-i ' + str(source[x]) + ' -o ' + str(target[x]) - try: - out = subprocess.Popen(cmd,shell = True,stderr = subprocess.PIPE).communicate() - if len(out[1]): - return 1 - except: - return 1 - return 0 - -def configure(env): - - env.Append(CPPPATH=['#platform/windows']) - env['is_mingw']=False - if (os.name=="nt" and os.getenv("VSINSTALLDIR")!=None): - #build using visual studio - env['ENV']['TMP'] = os.environ['TMP'] - env.Append(CPPPATH=['#platform/windows/include']) - env.Append(LIBPATH=['#platform/windows/lib']) - - - if (env["target"]=="release"): - - env.Append(CCFLAGS=['/O2']) - env.Append(LINKFLAGS=['/SUBSYSTEM:WINDOWS']) - env.Append(LINKFLAGS=['/ENTRY:mainCRTStartup']) - - elif (env["target"]=="release_debug"): - - env.Append(CCFLAGS=['/O2','/DDEBUG_ENABLED']) - env.Append(LINKFLAGS=['/SUBSYSTEM:CONSOLE']) - elif (env["target"]=="debug_release"): - - env.Append(CCFLAGS=['/Z7','/Od']) - env.Append(LINKFLAGS=['/DEBUG']) - env.Append(LINKFLAGS=['/SUBSYSTEM:WINDOWS']) - env.Append(LINKFLAGS=['/ENTRY:mainCRTStartup']) - - elif (env["target"]=="debug"): - - env.Append(CCFLAGS=['/Z7','/DDEBUG_ENABLED','/DDEBUG_MEMORY_ENABLED','/DD3D_DEBUG_INFO','/Od']) - env.Append(LINKFLAGS=['/SUBSYSTEM:CONSOLE']) - env.Append(LINKFLAGS=['/DEBUG']) - - - env.Append(CCFLAGS=['/MT','/Gd','/GR','/nologo']) - env.Append(CXXFLAGS=['/TP']) - env.Append(CPPFLAGS=['/DMSVC', '/GR', ]) - env.Append(CCFLAGS=['/I'+os.getenv("WindowsSdkDir")+"/Include"]) - env.Append(CCFLAGS=['/DWINDOWS_ENABLED']) - env.Append(CCFLAGS=['/DRTAUDIO_ENABLED']) - env.Append(CCFLAGS=['/DWIN32']) - env.Append(CCFLAGS=['/DTYPED_METHOD_BIND']) - - env.Append(CCFLAGS=['/DGLES2_ENABLED']) - LIBS=['winmm','opengl32','dsound','kernel32','ole32','oleaut32','user32','gdi32', 'IPHLPAPI','Shlwapi', 'wsock32','Ws2_32', 'shell32','advapi32','dinput8','dxguid'] - env.Append(LINKFLAGS=[p+env["LIBSUFFIX"] for p in LIBS]) - - env.Append(LIBPATH=[os.getenv("WindowsSdkDir")+"/Lib"]) - if (os.getenv("DXSDK_DIR")): - DIRECTX_PATH=os.getenv("DXSDK_DIR") - else: - DIRECTX_PATH="C:/Program Files/Microsoft DirectX SDK (March 2009)" - - if (os.getenv("VCINSTALLDIR")): - VC_PATH=os.getenv("VCINSTALLDIR") - else: - VC_PATH="" - - env.Append(CCFLAGS=["/I" + p for p in os.getenv("INCLUDE").split(";")]) - env.Append(LIBPATH=[p for p in os.getenv("LIB").split(";")]) - env.Append(CCFLAGS=["/I"+DIRECTX_PATH+"/Include"]) - env.Append(LIBPATH=[DIRECTX_PATH+"/Lib/x86"]) - env['ENV'] = os.environ; - - # This detection function needs the tools env (that is env['ENV'], not SCons's env), and that is why it's this far bellow in the code - compiler_version_str = methods.detect_visual_c_compiler_version(env['ENV']) - - # Note: this detection/override code from here onward should be here instead of in SConstruct because it's platform and compiler specific (MSVC/Windows) - if(env["bits"] != "default"): - print "Error: bits argument is disabled for MSVC" - print ("Bits argument is not supported for MSVC compilation. Architecture depends on the Native/Cross Compile Tools Prompt/Developer Console (or Visual Studio settings)" - +" that is being used to run SCons. As a consequence, bits argument is disabled. Run scons again without bits argument (example: scons p=windows) and SCons will attempt to detect what MSVC compiler" - +" will be executed and inform you.") - sys.exit() - - # Forcing bits argument because MSVC does not have a flag to set this through SCons... it's different compilers (cl.exe's) called from the propper command prompt - # that decide the architecture that is build for. Scons can only detect the os.getenviron (because vsvarsall.bat sets a lot of stuff for cl.exe to work with) - env["bits"]="32" - env["x86_opt_vc"]=True - - print "Detected MSVC compiler: "+compiler_version_str - # If building for 64bit architecture, disable assembly optimisations for 32 bit builds (theora as of writting)... vc compiler for 64bit can not compile _asm - if(compiler_version_str == "amd64" or compiler_version_str == "x86_amd64"): - env["bits"]="64" - env["x86_opt_vc"]=False - print "Compiled program architecture will be a 64 bit executable (forcing bits=64)." - elif (compiler_version_str=="x86" or compiler_version_str == "amd64_x86"): - print "Compiled program architecture will be a 32 bit executable. (forcing bits=32)." - else: - print "Failed to detect MSVC compiler architecture version... Defaulting to 32bit executable settings (forcing bits=32). Compilation attempt will continue, but SCons can not detect for what architecture this build is compiled for. You should check your settings/compilation setup." - if env["bits"]=="64": - env.Append(CCFLAGS=['/D_WIN64']) - - # Incremental linking fix - env['BUILDERS']['ProgramOriginal'] = env['BUILDERS']['Program'] - env['BUILDERS']['Program'] = methods.precious_program - - else: - - # Workaround for MinGW. See: - # http://www.scons.org/wiki/LongCmdLinesOnWin32 - env.use_windows_spawn_fix() - - #build using mingw - if (os.name=="nt"): - env['ENV']['TMP'] = os.environ['TMP'] #way to go scons, you can be so stupid sometimes - else: - env["PROGSUFFIX"]=env["PROGSUFFIX"]+".exe" # for linux cross-compilation - - mingw_prefix="" - - def can_build(): if (os.name == "nt"): @@ -416,7 +276,7 @@ def configure(env): env['ENV'] = os.environ # This detection function needs the tools env (that is env['ENV'], not SCons's env), and that is why it's this far bellow in the code - compiler_version_str = detect_visual_c_compiler_version(env['ENV']) + compiler_version_str = methods.detect_visual_c_compiler_version(env['ENV']) # Note: this detection/override code from here onward should be here instead of in SConstruct because it's platform and compiler specific (MSVC/Windows) if(env["bits"] != "default"): @@ -531,7 +391,6 @@ def configure(env): env['is_mingw'] = True env.Append(BUILDERS={'RES': env.Builder(action=build_res_file, suffix='.o', src_suffix='.rc')}) - import methods env.Append(BUILDERS={'GLSL120': env.Builder(action=methods.build_legacygl_headers, suffix='glsl.h', src_suffix='.glsl')}) env.Append(BUILDERS={'GLSL': env.Builder(action=methods.build_glsl_headers, suffix='glsl.h', src_suffix='.glsl')}) env.Append(BUILDERS={'HLSL9': env.Builder(action=methods.build_hlsl_dx9_headers, suffix='hlsl.h', src_suffix='.hlsl')}) diff --git a/platform/winrt/app.cpp b/platform/winrt/app.cpp index 4211976a749..351e6cc6e05 100644 --- a/platform/winrt/app.cpp +++ b/platform/winrt/app.cpp @@ -37,6 +37,8 @@ #include "core/os/file_access.h" #include "core/os/keyboard.h" +#include "main/main.h" + #include "platform/windows/key_mapping_win.h" #include @@ -62,8 +64,7 @@ inline float ConvertDipsToPixels(float dips, float dpi) { } // Implementation of the IFrameworkViewSource interface, necessary to run our app. -ref class GodotWinrtViewSource sealed : Windows::ApplicationModel::Core::IFrameworkViewSource -{ +ref class GodotWinrtViewSource sealed : Windows::ApplicationModel::Core::IFrameworkViewSource { public: virtual Windows::ApplicationModel::Core::IFrameworkView ^ CreateView() { return ref new App(); @@ -71,24 +72,21 @@ public: }; // The main function creates an IFrameworkViewSource for our app, and runs the app. -[Platform::MTAThread] -int main(Platform::Array^) -{ +[Platform::MTAThread] int main(Platform::Array ^) { auto godotApplicationSource = ref new GodotWinrtViewSource(); CoreApplication::Run(godotApplicationSource); return 0; } -App::App() : - mWindowClosed(false), - mWindowVisible(true), - mWindowWidth(0), - mWindowHeight(0), - mEglDisplay(EGL_NO_DISPLAY), - mEglContext(EGL_NO_CONTEXT), - mEglSurface(EGL_NO_SURFACE), - number_of_contacts(0) -{ +App::App() + : mWindowClosed(false), + mWindowVisible(true), + mWindowWidth(0), + mWindowHeight(0), + mEglDisplay(EGL_NO_DISPLAY), + mEglContext(EGL_NO_CONTEXT), + mEglSurface(EGL_NO_SURFACE), + number_of_contacts(0) { } // The first method called when the IFrameworkView is being created. @@ -103,7 +101,6 @@ void App::Initialize(CoreApplicationView ^ applicationView) { // http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh994930.aspx os = new OSWinrt; - } // Called when the CoreWindow object is created (or re-created). @@ -127,30 +124,28 @@ void App::SetWindow(CoreWindow ^ p_window) { #endif window->PointerPressed += - ref new TypedEventHandler(this, &App::OnPointerPressed); + ref new TypedEventHandler(this, &App::OnPointerPressed); window->PointerMoved += - ref new TypedEventHandler(this, &App::OnPointerMoved); + ref new TypedEventHandler(this, &App::OnPointerMoved); window->PointerReleased += - ref new TypedEventHandler(this, &App::OnPointerReleased); + ref new TypedEventHandler(this, &App::OnPointerReleased); window->PointerWheelChanged += - ref new TypedEventHandler(this, &App::OnPointerWheelChanged); + ref new TypedEventHandler(this, &App::OnPointerWheelChanged); mouseChangedNotifier = SignalNotifier::AttachToEvent(L"os_mouse_mode_changed", ref new SignalHandler( - this, &App::OnMouseModeChanged - )); + this, &App::OnMouseModeChanged)); mouseChangedNotifier->Enable(); window->CharacterReceived += - ref new TypedEventHandler(this, &App::OnCharacterReceived); + ref new TypedEventHandler(this, &App::OnCharacterReceived); window->KeyDown += - ref new TypedEventHandler(this, &App::OnKeyDown); + ref new TypedEventHandler(this, &App::OnKeyDown); window->KeyUp += - ref new TypedEventHandler(this, &App::OnKeyUp); - + ref new TypedEventHandler(this, &App::OnKeyUp); unsigned int argc; - char** argv = get_command_line(&argc); + char **argv = get_command_line(&argc); Main::setup("winrt", argc, argv, false); @@ -258,7 +253,7 @@ static int _get_finger(uint32_t p_touch_id) { return p_touch_id % 31; // for now }; -void App::pointer_event(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args, bool p_pressed, bool p_is_wheel) { +void App::pointer_event(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::PointerEventArgs ^ args, bool p_pressed, bool p_is_wheel) { Windows::UI::Input::PointerPoint ^ point = args->CurrentPoint; Windows::Foundation::Point pos = _get_pixel_position(window, point->Position, os); @@ -318,40 +313,37 @@ void App::OnPointerReleased(Windows::UI::Core::CoreWindow ^ sender, Windows::UI: pointer_event(sender, args, false); }; -void App::OnPointerWheelChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args) { +void App::OnPointerWheelChanged(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::PointerEventArgs ^ args) { pointer_event(sender, args, true, true); } -void App::OnMouseModeChanged(Windows::System::Threading::Core::SignalNotifier^ signalNotifier, bool timedOut) { +void App::OnMouseModeChanged(Windows::System::Threading::Core::SignalNotifier ^ signalNotifier, bool timedOut) { OS::MouseMode mode = os->get_mouse_mode(); - SignalNotifier^ notifier = mouseChangedNotifier; + SignalNotifier ^ notifier = mouseChangedNotifier; window->Dispatcher->RunAsync( - CoreDispatcherPriority::High, - ref new DispatchedHandler( - [mode, notifier, this]() { - if (mode == OS::MOUSE_MODE_CAPTURED) { + CoreDispatcherPriority::High, + ref new DispatchedHandler( + [mode, notifier, this]() { + if (mode == OS::MOUSE_MODE_CAPTURED) { - this->MouseMovedToken = MouseDevice::GetForCurrentView()->MouseMoved += - ref new TypedEventHandler(this, &App::OnMouseMoved); + this->MouseMovedToken = MouseDevice::GetForCurrentView()->MouseMoved += + ref new TypedEventHandler(this, &App::OnMouseMoved); - } else { + } else { - MouseDevice::GetForCurrentView()->MouseMoved -= MouseMovedToken; + MouseDevice::GetForCurrentView()->MouseMoved -= MouseMovedToken; + } - } - - notifier->Enable(); - })); + notifier->Enable(); + })); ResetEvent(os->mouse_mode_changed); - - } -void App::OnPointerMoved(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args) { +void App::OnPointerMoved(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::PointerEventArgs ^ args) { Windows::UI::Input::PointerPoint ^ point = args->CurrentPoint; Windows::Foundation::Point pos = _get_pixel_position(window, point->Position, os); @@ -390,7 +382,6 @@ void App::OnPointerMoved(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Cor last_mouse_pos = pos; os->input_event(event); - } void App::OnMouseMoved(MouseDevice ^ mouse_device, MouseEventArgs ^ args) { @@ -418,8 +409,7 @@ void App::OnMouseMoved(MouseDevice ^ mouse_device, MouseEventArgs ^ args) { os->input_event(event); } -void App::key_event(Windows::UI::Core::CoreWindow^ sender, bool p_pressed, Windows::UI::Core::KeyEventArgs^ key_args, Windows::UI::Core::CharacterReceivedEventArgs^ char_args) -{ +void App::key_event(Windows::UI::Core::CoreWindow ^ sender, bool p_pressed, Windows::UI::Core::KeyEventArgs ^ key_args, Windows::UI::Core::CharacterReceivedEventArgs ^ char_args) { OSWinrt::KeyEvent ke; @@ -432,9 +422,9 @@ void App::key_event(Windows::UI::Core::CoreWindow^ sender, bool p_pressed, Windo ke.mod_state = mod; ke.pressed = p_pressed; - + if (key_args != nullptr) { - + ke.type = OSWinrt::KeyEvent::MessageType::KEY_EVENT_MESSAGE; ke.unicode = 0; ke.scancode = KeyMappingWindows::get_keysym((unsigned int)key_args->VirtualKey); @@ -449,26 +439,21 @@ void App::key_event(Windows::UI::Core::CoreWindow^ sender, bool p_pressed, Windo } os->queue_key_event(ke); - } -void App::OnKeyDown(CoreWindow^ sender, KeyEventArgs^ args) -{ +void App::OnKeyDown(CoreWindow ^ sender, KeyEventArgs ^ args) { key_event(sender, true, args); } -void App::OnKeyUp(CoreWindow^ sender, KeyEventArgs^ args) -{ +void App::OnKeyUp(CoreWindow ^ sender, KeyEventArgs ^ args) { key_event(sender, false, args); } -void App::OnCharacterReceived(CoreWindow^ sender, CharacterReceivedEventArgs^ args) -{ +void App::OnCharacterReceived(CoreWindow ^ sender, CharacterReceivedEventArgs ^ args) { key_event(sender, true, nullptr, args); } // Initializes scene resources -void App::Load(Platform::String^ entryPoint) -{ +void App::Load(Platform::String ^ entryPoint) { } // This method is called after the window becomes active. @@ -535,12 +520,12 @@ void App::UpdateWindowSize(Size size) { os->set_video_mode(vm); } -char** App::get_command_line(unsigned int* out_argc) { +char **App::get_command_line(unsigned int *out_argc) { - static char* fail_cl[] = { "-path", "game", NULL }; + static char *fail_cl[] = { "-path", "game", NULL }; *out_argc = 2; - FILE* f = _wfopen(L"__cl__.cl", L"rb"); + FILE *f = _wfopen(L"__cl__.cl", L"rb"); if (f == NULL) { @@ -554,12 +539,12 @@ char** App::get_command_line(unsigned int* out_argc) { uint8_t len[4]; int r = fread(len, sizeof(uint8_t), 4, f); - Platform::Collections::Vector cl; + Platform::Collections::Vector cl; if (r < 4) { fclose(f); wprintf(L"Wrong cmdline length."); - return(fail_cl); + return (fail_cl); } int argc = READ_LE_4(len); @@ -571,7 +556,7 @@ char** App::get_command_line(unsigned int* out_argc) { if (r < 4) { fclose(f); wprintf(L"Wrong cmdline param length."); - return(fail_cl); + return (fail_cl); } int strlen = READ_LE_4(len); @@ -579,17 +564,17 @@ char** App::get_command_line(unsigned int* out_argc) { if (strlen > CMD_MAX_LEN) { fclose(f); wprintf(L"Wrong command length."); - return(fail_cl); + return (fail_cl); } - char* arg = new char[strlen + 1]; + char *arg = new char[strlen + 1]; r = fread(arg, sizeof(char), strlen, f); arg[strlen] = '\0'; if (r == strlen) { int warg_size = MultiByteToWideChar(CP_UTF8, 0, arg, -1, NULL, 0); - wchar_t* warg = new wchar_t[warg_size]; + wchar_t *warg = new wchar_t[warg_size]; MultiByteToWideChar(CP_UTF8, 0, arg, -1, warg, warg_size); @@ -600,7 +585,7 @@ char** App::get_command_line(unsigned int* out_argc) { delete[] arg; fclose(f); wprintf(L"Error reading command."); - return(fail_cl); + return (fail_cl); } } @@ -609,17 +594,16 @@ char** App::get_command_line(unsigned int* out_argc) { fclose(f); - char** ret = new char*[cl.Size + 1]; + char **ret = new char *[cl.Size + 1]; for (int i = 0; i < cl.Size; i++) { int arg_size = WideCharToMultiByte(CP_UTF8, 0, cl.GetAt(i)->Data(), -1, NULL, 0, NULL, NULL); - char* arg = new char[arg_size]; + char *arg = new char[arg_size]; WideCharToMultiByte(CP_UTF8, 0, cl.GetAt(i)->Data(), -1, arg, arg_size, NULL, NULL); ret[i] = arg; - } ret[cl.Size] = NULL; *out_argc = cl.Size; diff --git a/platform/winrt/detect.py b/platform/winrt/detect.py index 2e529e1efcb..0465bac3753 100644 --- a/platform/winrt/detect.py +++ b/platform/winrt/detect.py @@ -150,6 +150,7 @@ def configure(env): 'xaudio2', 'WindowsApp', 'mincore', + 'ws2_32', 'libANGLE', 'libEGL', 'libGLESv2', diff --git a/platform/winrt/export/export.cpp b/platform/winrt/export/export.cpp index 9a99cefc281..ee1c6b8d957 100644 --- a/platform/winrt/export/export.cpp +++ b/platform/winrt/export/export.cpp @@ -67,18 +67,18 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "export.h" #include "bind/core_bind.h" +#include "editor/editor_import_export.h" +#include "editor/editor_node.h" #include "globals.h" -#include "io/base64.h" #include "io/marshalls.h" -#include "io/sha256.h" -#include "io/unzip.h" -#include "io/zip.h" #include "io/zip_io.h" #include "object.h" #include "os/file_access.h" #include "platform/winrt/logo.h" -#include "tools/editor/editor_import_export.h" -#include "tools/editor/editor_node.h" +#include "thirdparty/minizip/unzip.h" +#include "thirdparty/minizip/zip.h" +#include "thirdparty/misc/base64.h" +#include "thirdparty/misc/sha256.h" #include "version.h" #include @@ -92,6 +92,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#endif // OPENSSL_ENABLED // Capabilities static const char *uwp_capabilities[] = { @@ -128,6 +129,7 @@ static const char *uwp_device_capabilites[] = { NULL }; +#ifdef OPENSSL_ENABLED namespace asn1 { // https://msdn.microsoft.com/en-us/gg463180.aspx diff --git a/platform/winrt/os_winrt.cpp b/platform/winrt/os_winrt.cpp index 40bc3f4fea5..be0453905d5 100644 --- a/platform/winrt/os_winrt.cpp +++ b/platform/winrt/os_winrt.cpp @@ -26,14 +26,17 @@ /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#include "os_winrt.h" #include "drivers/gles2/rasterizer_gles2.h" + #include "drivers/unix/memory_pool_static_malloc.h" -#include "os/memory_pool_dynamic_static.h" -#include "thread_winrt.h" -#include "drivers/windows/semaphore_windows.h" +#include "drivers/windows/dir_access_windows.h" +#include "drivers/windows/file_access_windows.h" #include "drivers/windows/mutex_windows.h" +#include "drivers/windows/semaphore_windows.h" #include "main/main.h" +#include "os/memory_pool_dynamic_static.h" +#include "os_winrt.h" +#include "thread_winrt.h" #include "servers/audio/audio_server_sw.h" #include "servers/visual/visual_server_raster.h" @@ -43,13 +46,13 @@ #include "io/marshalls.h" #include "os/memory_pool_dynamic_prealloc.h" +#include "drivers/unix/ip_unix.h" #include "platform/windows/packet_peer_udp_winsock.h" #include "platform/windows/stream_peer_winsock.h" #include "platform/windows/tcp_server_winsock.h" -#include "drivers/unix/ip_unix.h" -#include #include +#include using namespace Windows::ApplicationModel::Core; using namespace Windows::ApplicationModel::Activation; @@ -92,7 +95,7 @@ void OSWinrt::set_window_size(const Size2 p_size) { new_size.Width = p_size.width; new_size.Height = p_size.height; - ApplicationView^ view = ApplicationView::GetForCurrentView(); + ApplicationView ^ view = ApplicationView::GetForCurrentView(); if (view->TryResizeView(new_size)) { @@ -103,7 +106,7 @@ void OSWinrt::set_window_size(const Size2 p_size) { void OSWinrt::set_window_fullscreen(bool p_enabled) { - ApplicationView^ view = ApplicationView::GetForCurrentView(); + ApplicationView ^ view = ApplicationView::GetForCurrentView(); video_mode.fullscreen = view->IsFullScreenMode; @@ -118,7 +121,6 @@ void OSWinrt::set_window_fullscreen(bool p_enabled) { view->ExitFullScreenMode(); video_mode.fullscreen = false; - } } @@ -198,7 +200,7 @@ void OSWinrt::initialize_core() { IP_Unix::make_default(); - cursor_shape=CURSOR_ARROW; + cursor_shape = CURSOR_ARROW; } bool OSWinrt::can_draw() const { @@ -227,7 +229,7 @@ void OSWinrt::initialize(const VideoMode &p_desired, int p_video_driver, int p_a vm.height = gl_context->get_window_height(); vm.resizable = false; - ApplicationView^ view = ApplicationView::GetForCurrentView(); + ApplicationView ^ view = ApplicationView::GetForCurrentView(); vm.fullscreen = view->IsFullScreenMode; view->SetDesiredBoundsMode(ApplicationViewBoundsMode::UseVisible); @@ -301,15 +303,14 @@ void OSWinrt::initialize(const VideoMode &p_desired, int p_video_driver, int p_a managed_object->update_clipboard(); - Clipboard::ContentChanged += ref new EventHandler(managed_object, &ManagedType::on_clipboard_changed); + Clipboard::ContentChanged += ref new EventHandler(managed_object, &ManagedType::on_clipboard_changed); accelerometer = Accelerometer::GetDefault(); if (accelerometer != nullptr) { // 60 FPS accelerometer->ReportInterval = (1.0f / 60.0f) * 1000; accelerometer->ReadingChanged += - ref new TypedEventHandler - (managed_object, &ManagedType::on_accelerometer_reading_changed); + ref new TypedEventHandler(managed_object, &ManagedType::on_accelerometer_reading_changed); } magnetometer = Magnetometer::GetDefault(); @@ -317,8 +318,7 @@ void OSWinrt::initialize(const VideoMode &p_desired, int p_video_driver, int p_a // 60 FPS magnetometer->ReportInterval = (1.0f / 60.0f) * 1000; magnetometer->ReadingChanged += - ref new TypedEventHandler - (managed_object, &ManagedType::on_magnetometer_reading_changed); + ref new TypedEventHandler(managed_object, &ManagedType::on_magnetometer_reading_changed); } gyrometer = Gyrometer::GetDefault(); @@ -326,8 +326,7 @@ void OSWinrt::initialize(const VideoMode &p_desired, int p_video_driver, int p_a // 60 FPS gyrometer->ReportInterval = (1.0f / 60.0f) * 1000; gyrometer->ReadingChanged += - ref new TypedEventHandler - (managed_object, &ManagedType::on_gyroscope_reading_changed); + ref new TypedEventHandler(managed_object, &ManagedType::on_gyroscope_reading_changed); } _ensure_data_dir(); @@ -336,14 +335,13 @@ void OSWinrt::initialize(const VideoMode &p_desired, int p_video_driver, int p_a display_request->RequestActive(); set_keep_screen_on(GLOBAL_DEF("display/keep_screen_on", true)); - } -void OSWinrt::set_clipboard(const String& p_text) { +void OSWinrt::set_clipboard(const String &p_text) { - DataPackage^ clip = ref new DataPackage(); + DataPackage ^ clip = ref new DataPackage(); clip->RequestedOperation = DataPackageOperation::Copy; - clip->SetText(ref new Platform::String((const wchar_t*)p_text.c_str())); + clip->SetText(ref new Platform::String((const wchar_t *)p_text.c_str())); Clipboard::SetContent(clip); }; @@ -362,7 +360,7 @@ void OSWinrt::input_event(InputEvent &p_event) { input->parse_input_event(p_event); - if (p_event.type == InputEvent::MOUSE_BUTTON && p_event.mouse_button.pressed && p_event.mouse_button.button_index>3) { + if (p_event.type == InputEvent::MOUSE_BUTTON && p_event.mouse_button.pressed && p_event.mouse_button.button_index > 3) { //send release for mouse wheel p_event.mouse_button.pressed = false; @@ -423,7 +421,6 @@ void OSWinrt::finalize() { memdelete(physics_2d_server); joystick = nullptr; - } void OSWinrt::finalize_core() { @@ -460,21 +457,21 @@ void OSWinrt::vprint(const char *p_format, va_list p_list, bool p_stderr) { void OSWinrt::alert(const String &p_alert, const String &p_title) { - Platform::String^ alert = ref new Platform::String(p_alert.c_str()); - Platform::String^ title = ref new Platform::String(p_title.c_str()); + Platform::String ^ alert = ref new Platform::String(p_alert.c_str()); + Platform::String ^ title = ref new Platform::String(p_title.c_str()); - MessageDialog^ msg = ref new MessageDialog(alert, title); + MessageDialog ^ msg = ref new MessageDialog(alert, title); - UICommand^ close = ref new UICommand("Close", ref new UICommandInvokedHandler(managed_object, &OSWinrt::ManagedType::alert_close)); + UICommand ^ close = ref new UICommand("Close", ref new UICommandInvokedHandler(managed_object, &OSWinrt::ManagedType::alert_close)); msg->Commands->Append(close); msg->DefaultCommandIndex = 0; - + managed_object->alert_close_handle = true; msg->ShowAsync(); } -void OSWinrt::ManagedType::alert_close(IUICommand^ command) { +void OSWinrt::ManagedType::alert_close(IUICommand ^ command) { alert_close_handle = false; } @@ -486,12 +483,11 @@ void OSWinrt::ManagedType::on_clipboard_changed(Platform::Object ^ sender, Platf void OSWinrt::ManagedType::update_clipboard() { - DataPackageView^ data = Clipboard::GetContent(); + DataPackageView ^ data = Clipboard::GetContent(); if (data->Contains(StandardDataFormats::Text)) { - create_task(data->GetTextAsync()).then( - [this](Platform::String^ clipboard_content) { + create_task(data->GetTextAsync()).then([this](Platform::String ^ clipboard_content) { this->clipboard = clipboard_content; }); @@ -499,36 +495,33 @@ void OSWinrt::ManagedType::update_clipboard() { } void OSWinrt::ManagedType::on_accelerometer_reading_changed(Accelerometer ^ sender, AccelerometerReadingChangedEventArgs ^ args) { - - AccelerometerReading^ reading = args->Reading; + + AccelerometerReading ^ reading = args->Reading; os->input->set_accelerometer(Vector3( - reading->AccelerationX, - reading->AccelerationY, - reading->AccelerationZ - )); + reading->AccelerationX, + reading->AccelerationY, + reading->AccelerationZ)); } void OSWinrt::ManagedType::on_magnetometer_reading_changed(Magnetometer ^ sender, MagnetometerReadingChangedEventArgs ^ args) { - MagnetometerReading^ reading = args->Reading; + MagnetometerReading ^ reading = args->Reading; os->input->set_magnetometer(Vector3( - reading->MagneticFieldX, - reading->MagneticFieldY, - reading->MagneticFieldZ - )); + reading->MagneticFieldX, + reading->MagneticFieldY, + reading->MagneticFieldZ)); } void OSWinrt::ManagedType::on_gyroscope_reading_changed(Gyrometer ^ sender, GyrometerReadingChangedEventArgs ^ args) { - GyrometerReading^ reading = args->Reading; + GyrometerReading ^ reading = args->Reading; os->input->set_magnetometer(Vector3( - reading->AngularVelocityX, - reading->AngularVelocityY, - reading->AngularVelocityZ - )); + reading->AngularVelocityX, + reading->AngularVelocityY, + reading->AngularVelocityZ)); } void OSWinrt::set_mouse_mode(MouseMode p_mode) { @@ -540,7 +533,6 @@ void OSWinrt::set_mouse_mode(MouseMode p_mode) { } else { CoreWindow::GetForCurrentThread()->ReleasePointerCapture(); - } if (p_mode == MouseMode::MOUSE_MODE_CAPTURED || p_mode == MouseMode::MOUSE_MODE_HIDDEN) { @@ -711,8 +703,7 @@ void OSWinrt::process_events() { process_key_events(); } -void OSWinrt::process_key_events() -{ +void OSWinrt::process_key_events() { for (int i = 0; i < key_event_pos; i++) { @@ -727,13 +718,11 @@ void OSWinrt::process_key_events() iev.key.pressed = kev.pressed; input_event(iev); - } key_event_pos = 0; } -void OSWinrt::queue_key_event(KeyEvent & p_event) -{ +void OSWinrt::queue_key_event(KeyEvent &p_event) { // This merges Char events with the previous Key event, so // the unicode can be retrieved without sending duplicate events. if (p_event.type == KeyEvent::MessageType::CHAR_EVENT_MESSAGE && key_event_pos > 0) { @@ -833,7 +822,7 @@ String OSWinrt::get_locale() const { #if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP // this should work on phone 8.1, but it doesn't return "en"; #else - Platform::String ^language = Windows::Globalization::Language::CurrentInputMethodLanguageTag; + Platform::String ^ language = Windows::Globalization::Language::CurrentInputMethodLanguageTag; return String(language->Data()).replace("-", "_"); #endif } @@ -855,7 +844,7 @@ void OSWinrt::swap_buffers() { bool OSWinrt::has_touchscreen_ui_hint() const { - TouchCapabilities^ tc = ref new TouchCapabilities(); + TouchCapabilities ^ tc = ref new TouchCapabilities(); return tc->TouchPresent != 0 || UIViewSettings::GetForCurrentView()->UserInteractionMode == UserInteractionMode::Touch; } @@ -864,15 +853,15 @@ bool OSWinrt::has_virtual_keyboard() const { return UIViewSettings::GetForCurrentView()->UserInteractionMode == UserInteractionMode::Touch; } -void OSWinrt::show_virtual_keyboard(const String & p_existing_text, const Rect2 & p_screen_rect) { +void OSWinrt::show_virtual_keyboard(const String &p_existing_text, const Rect2 &p_screen_rect) { - InputPane^ pane = InputPane::GetForCurrentView(); + InputPane ^ pane = InputPane::GetForCurrentView(); pane->TryShow(); } void OSWinrt::hide_virtual_keyboard() { - InputPane^ pane = InputPane::GetForCurrentView(); + InputPane ^ pane = InputPane::GetForCurrentView(); pane->TryHide(); } diff --git a/platform/winrt/os_winrt.h b/platform/winrt/os_winrt.h index 902adc7c3ab..397c07fb824 100644 --- a/platform/winrt/os_winrt.h +++ b/platform/winrt/os_winrt.h @@ -42,35 +42,32 @@ #include "servers/physics_2d/physics_2d_server_sw.h" #include "servers/spatial_sound/spatial_sound_server_sw.h" #include "servers/spatial_sound_2d/spatial_sound_2d_server_sw.h" -#include "servers/physics_2d/physics_2d_server_sw.h" -#include "audio_driver_winrt.h" #include "gl_context_egl.h" #include "core/math/math_2d.h" #include "core/ustring.h" -#include - #include #include "main/input_default.h" #include #include +#include "audio_driver_winrt.h" #include "joystick_winrt.h" +#include + /** @author Juan Linietsky */ class OSWinrt : public OS { public: - struct KeyEvent { - enum MessageType - { + enum MessageType { KEY_EVENT_MESSAGE, CHAR_EVENT_MESSAGE }; @@ -82,11 +79,9 @@ public: unsigned int unicode; bool echo; CorePhysicalKeyStatus status; - }; private: - enum { JOYSTICKS_MAX = 8, JOY_AXIS_COUNT = 6, @@ -139,34 +134,33 @@ private: InputDefault *input; - JoystickWinrt^ joystick; + JoystickWinrt ^ joystick; - Windows::System::Display::DisplayRequest^ display_request; + Windows::System::Display::DisplayRequest ^ display_request; void _post_dpad(DWORD p_dpad, int p_device, bool p_pressed); - void _drag_event(int idx,UINT uMsg, WPARAM wParam, LPARAM lParam); - void _touch_event(int idx, UINT uMsg, WPARAM wParam, LPARAM lParam); + void _drag_event(int idx, UINT uMsg, WPARAM wParam, LPARAM lParam); + void _touch_event(int idx, UINT uMsg, WPARAM wParam, LPARAM lParam); ref class ManagedType { public: property bool alert_close_handle; - property Platform::String^ clipboard; - void alert_close(Windows::UI::Popups::IUICommand^ command); - void on_clipboard_changed(Platform::Object^ sender, Platform::Object^ ev); + property Platform::String ^ clipboard; + void alert_close(Windows::UI::Popups::IUICommand ^ command); + void on_clipboard_changed(Platform::Object ^ sender, Platform::Object ^ ev); void update_clipboard(); - void on_accelerometer_reading_changed(Windows::Devices::Sensors::Accelerometer^ sender, Windows::Devices::Sensors::AccelerometerReadingChangedEventArgs^ args); - void on_magnetometer_reading_changed(Windows::Devices::Sensors::Magnetometer^ sender, Windows::Devices::Sensors::MagnetometerReadingChangedEventArgs^ args); - void on_gyroscope_reading_changed(Windows::Devices::Sensors::Gyrometer^ sender, Windows::Devices::Sensors::GyrometerReadingChangedEventArgs^ args); + void on_accelerometer_reading_changed(Windows::Devices::Sensors::Accelerometer ^ sender, Windows::Devices::Sensors::AccelerometerReadingChangedEventArgs ^ args); + void on_magnetometer_reading_changed(Windows::Devices::Sensors::Magnetometer ^ sender, Windows::Devices::Sensors::MagnetometerReadingChangedEventArgs ^ args); + void on_gyroscope_reading_changed(Windows::Devices::Sensors::Gyrometer ^ sender, Windows::Devices::Sensors::GyrometerReadingChangedEventArgs ^ args); - internal: - ManagedType() { alert_close_handle = false; } - property OSWinrt* os; + internal : ManagedType() { alert_close_handle = false; } + property OSWinrt *os; }; - ManagedType^ managed_object; - Windows::Devices::Sensors::Accelerometer^ accelerometer; - Windows::Devices::Sensors::Magnetometer^ magnetometer; - Windows::Devices::Sensors::Gyrometer^ gyrometer; + ManagedType ^ managed_object; + Windows::Devices::Sensors::Accelerometer ^ accelerometer; + Windows::Devices::Sensors::Magnetometer ^ magnetometer; + Windows::Devices::Sensors::Gyrometer ^ gyrometer; // functions used by main to initialize/deintialize the OS protected: @@ -197,10 +191,8 @@ public: // Event to send to the app wrapper HANDLE mouse_mode_changed; - void print_error(const char* p_function,const char* p_file,int p_line,const char *p_code,const char*p_rationale,ErrorType p_type); - - virtual void vprint(const char *p_format, va_list p_list, bool p_stderr=false); - virtual void alert(const String& p_alert,const String& p_title="ALERT!"); + virtual void vprint(const char *p_format, va_list p_list, bool p_stderr = false); + virtual void alert(const String &p_alert, const String &p_title = "ALERT!"); String get_stdin_string(bool p_block); void set_mouse_mode(MouseMode p_mode); @@ -210,9 +202,9 @@ public: virtual int get_mouse_button_state() const; virtual void set_window_title(const String &p_title); - virtual void set_video_mode(const VideoMode& p_video_mode,int p_screen=0); - virtual VideoMode get_video_mode(int p_screen=0) const; - virtual void get_fullscreen_mode_list(List *p_list,int p_screen=0) const; + virtual void set_video_mode(const VideoMode &p_video_mode, int p_screen = 0); + virtual VideoMode get_video_mode(int p_screen = 0) const; + virtual void get_fullscreen_mode_list(List *p_list, int p_screen = 0) const; virtual Size2 get_window_size() const; virtual void set_window_size(const Size2 p_size); virtual void set_window_fullscreen(bool p_enabled); @@ -263,7 +255,7 @@ public: virtual bool has_touchscreen_ui_hint() const; virtual bool has_virtual_keyboard() const; - virtual void show_virtual_keyboard(const String& p_existing_text, const Rect2& p_screen_rect = Rect2()); + virtual void show_virtual_keyboard(const String &p_existing_text, const Rect2 &p_screen_rect = Rect2()); virtual void hide_virtual_keyboard(); virtual Error shell_open(String p_uri); diff --git a/drivers/builtin_openssl2/winrt.cpp b/thirdparty/openssl/winrt.cpp similarity index 100% rename from drivers/builtin_openssl2/winrt.cpp rename to thirdparty/openssl/winrt.cpp diff --git a/drivers/builtin_openssl2/winrt_fix.patch b/thirdparty/openssl/winrt_fix.patch similarity index 100% rename from drivers/builtin_openssl2/winrt_fix.patch rename to thirdparty/openssl/winrt_fix.patch